shio-console-ui
Skill3 starsChanged 8 days agoApache-2.0View on GitHub
Read before touching Shio's React console or its security config. Triggers on shio-react/**, shadcn/ui components, the 15 form widgets and WIDGET_MAP, widgetSettings, postFormSchema, post-type.edit.page.tsx, post.edit/new pages, PostFormFields, the content browser, widget colors, sticky save bars, i18n en/pt, ShPostAttr/ShRelatorItem/ShPostType models, CSRF, ShCsrfHeaderFilter, ShStatelessRequestMatcher, and CORS.
In this repository14 other files it gives its agents.
- agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- roadkeepSkill
- shio-agent-surfaceSkill
- shio-build-testSkill
- shio-console-reviewSkill
- shio-content-apiSkill
- shio-content-filesSkill
- shio-databaseSkill
- shio-docs-syncSkill
- shio-docs-writeSkill
- shio-rendererSkill
- shio-replication-testSkill
- shio-roadmap-docsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 24
tsc -bfails on unused imports (TS6133): When you swap a component, remove the import.
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Shio console (React) + security config
Read docs/agents/console-ui.md (service layer, context providers, the widget system, editor page patterns, the data model, widget colours, i18n, theme) and docs/agents/security.md (CSRF, auth, CORS).
The traps that bite here
- Always guard a
widgetSettingsparse. The backend sends the literal string"null";JSON.parse("null")returnsnull, which passes a truthy check and crashes on property access. Use theparseSettings()helper. postFormSchema()is the one exported entry point for projecting a post-type'sfieldsinto form widgets (SH178). There used to be a second export with no fallback, which is why creating a post worked and editing it did not.- A post-type has no
idand a field has noid. The editor routes onnameand mints an editor-localkeyper row for React/dnd identity, stripping it before save —nameis what the user is typing and cannot double as identity. tsc -bfails on unused imports (TS6133). When you swap a component, remove the import.- After
pnpm add/remove, clearnode_modules/.viteor you get 504 "Outdated Optimize Dep". - Use the shared
@/lib/axiossingleton. A privateaxios.create()silently opts out of every shared interceptor — including CSRF, which is required of a session-bearing caller (SH167). That was the Visual Editor save bug (SH233). - Add i18n keys to
enandptsimultaneously.
Security rules that are guarded
ShCsrfExemptionLintTest fails the build on a new blanket CSRF exemption —
narrow it with ShStatelessRequestMatcher instead (exempt for a caller holding no
session cookie, checked for one that does). The same lint fails the day a Mutation
appears in schema.graphqls, carrying the decision made in advance. Do not widen an
exemption back to a blanket one: the failure mode is a future caller, which no
functional test can watch for.
Design system
Available shadcn components and the per-widget colour table are in the area file.
Not available — do not import: accordion, collapsible, popover, command, calendar.
Switch for settings toggles, Checkbox only inside form widgets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

