/etchwp:persistencefrom etchwp
Manages .etch-components/ folder and registry.json for cross-session state of component catalog, pages, and config. Handles init, read, write, and validation.
Ships in etchwp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Manages the .etch-components/ folder at the project root. All cross-session state — component catalog, page compositions, project configuration — lives here.
.etch-components/
registry.json # Master catalog of all generated components and pages
config.json # Project config: ACSS mode (written by acss-detection) + optional token overrides
Location: Project root — wherever the user runs Claude Code from. This is NOT the plugin directory. If the user runs Claude Code from /Users/jane/projects/client-site/, the persistence folder is at /Users/jane/projects/client-site/.etch-components/.
When a command is about to read the registry, check whether .etch-components/ exists:
Check for folder existence:
ls .etch-components/
If the directory exists and registry.json is present, proceed to Read Registry.
If .etch-components/ does not exist, create it:
mkdir -p .etch-components
Seed registry.json with an empty structure:
{
"projectName": "",
"createdAt": "<current ISO 8601 datetime>",
"updatedAt": "<current ISO 8601 datetime>",
"components": [],
"pages": []
}
Write this file to .etch-components/registry.json.
Inform the user:
"Created
.etch-components/with an empty registry. All generated components will be tracked here."
To read the current registry state:
.etch-components/registry.jsonIf the file is missing (directory exists but registry.json does not), re-seed as per the Initialization section above.
If the JSON is malformed, report: ".etch-components/registry.json appears to be corrupted. Please review or delete it and re-run the command to reinitialize."
After any operation that modifies the registry:
updatedAt field to the current ISO 8601 datetime@${CLAUDE_PLUGIN_ROOT}/skills/persistence/schemas/registry.json.etch-components/registry.json with 2-space indentationconfig.json)Project-level settings, merged (never clobbered) on write:
{
"acss": {
"present": true,
"version": "4.x",
"detectedAt": "<ISO 8601>",
"method": "connector-skill | connector-vars | cdp | filesystem | user-confirmed"
}
}
The acss block is owned by the acss-detection skill; generation skills read it to resolve the ACSS mode. Missing file or missing acss key means the mode is undetermined — run detection before generating.
When a component has been successfully generated, add an entry to the components array:
{
"name": "pricing-table",
"description": "3-tier pricing section with monthly/annual toggle",
"type": "section",
"tags": ["pricing", "toggle", "interactive"],
"files": {
"html": "components/pricing-table/index.html",
"css": "components/pricing-table/style.css",
"js": "components/pricing-table/script.js"
},
"hasJs": true,
"variants": [],
"acssTokensUsed": ["--primary", "--action", "--space-m", "--text-l"],
"createdAt": "<current ISO 8601 datetime>"
}
Field rules:
name: kebab-case, matches the component folder namedescription: the natural language description used during generationtype: one of section, card, form, nav, footer, hero, custom (schema enum). Generation types like pricing / features / header are not valid here — map them first (/generate Step 3 table) and keep the generation type in tags.tags: array of descriptive tags derived from the description and component typefiles.js: set to the JS file path if hasJs is true, null if falsefiles: {} when no local files exist — a component built live with /etch, or /section output printed without --save. Never invent paths that were not written: /library --paste reads these paths and reports "File missing" for phantoms. Live-only components are still fully usable via /library (metadata + the etch push-state); --paste simply reports that this component has no local files and suggests /etch or regenerating with /generate.hasJs: true if JS was generated, false if --no-js was usedvariants: empty array on initial creation; populated when /generate is run with variant flagsacssTokensUsed: list of ACSS custom property names referenced in the generated CSS and HTMLAfter adding the entry, follow the Write Registry procedure above.
When /etch (or /library's push action) has pushed a component/section to a live builder tab, set the optional etch object on that component's registry entry:
{
"etch": {
"pushedAt": "<ISO 8601>",
"siteUrl": "https://client-site.com",
"componentRef": "12",
"blockRefs": ["a1b2c3d", "e4f5a6b"],
"stylesheetId": null,
"verified": true
}
}
componentRef: Etch component id (string) when a component definition was created, else nullblockRefs: ids of top-level blocks created in the documentstylesheetId: id of any stylesheet created for residual CSS, else nullverified: true only after the CDP (or user-screenshot) verification loop passedEntries without etch are components that have never been pushed — the schema keeps the property optional, so registries created before v2.0.0 remain valid. Note: older installs may have an orphaned registry at <plugin>/output/.etch-registry.json (pre-2.0 scripts/registry.js location) — if the user asks about missing components, check there and offer to merge it into the project registry.
Before generating a component, check whether a component with the same name already exists:
components array for an entry with name matching the requested component name (case-insensitive, after normalizing to kebab-case)When a page has been successfully composed (via future /page command), add an entry to the pages array:
{
"name": "homepage",
"sections": ["hero-split", "features-grid", "pricing-table", "testimonials", "cta"],
"createdAt": "<current ISO 8601 datetime>"
}
After adding the entry, follow the Write Registry procedure above.
The registry is validated against the JSON Schema at:
@${CLAUDE_PLUGIN_ROOT}/skills/persistence/schemas/registry.json
This schema enforces: required top-level fields, component entry shape (name pattern, type enum, files object), and page entry shape.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub flyingwebie/skills --plugin etchwp9 skills in this plugin
/acss-detectionDetects whether AutomaticCSS (ACSS) is installed for the current project/site and persists the result as the project's ACSS mode. When ACSS is present, generation is FORCED to use ACSS tokens and utility classes. Run before any generation when .etch-components/config.json is missing or has no acss key, and re-run when a new site/tab connects via the Etch Connector.
/css-generationGenerates BEM-scoped CSS with ACSS custom property references for Etch components. Uses &__/&-- stemming compatible with Etch CSS panel. ACSS mode ON: hard gate -- every design value a verified ACSS token, custom CSS only where no utility exists. ACSS mode OFF: local custom-property fallback. Container queries via :has(> &) pattern.
/etch-connectorTransport layer for driving a live Etch builder tab through the Etch Connector CLI (@digital-gravy/etch-connector). Owns the connection lifecycle, the eval contract, persistence (saveAsync) rules, exit-code handling, and the post-push verification loop. Never decides what markup/classes to build -- it receives output from the generation skills and maps it to etch.* API calls. Used by /etch and /library's push action.
/etch-conventionsEtch best practices for component generation. Encodes Section > Container hierarchy, AutoBEM naming alignment, container-query responsive approach, and accessibility defaults. Consult this skill before generating any HTML, CSS, or JS for Etch components.
/etchwpBuild accessible Etch and AutomaticCSS components in Codex, either through a connected Etch builder or as paste-ready sections and standalone files./html-generationGenerates semantic HTML for Etch components. Handles element mapping, landmark selection, heading hierarchy, placeholder content, and accessibility attributes. Class output is ACSS-mode-aware: BEM hooks always; ACSS utility classes added when AutomaticCSS is detected, BEM-only markup (styling in CSS) when it is not.
Other plugins' skills for the same job