From etchwp
Manages .etch-components/ folder and registry.json. Handles initialization, reading, writing, and updating component metadata. Every command reads the registry before operating and writes back after completing.
How this skill is triggered — by the user, by Claude, or both
Slash command
/etchwp:persistenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Manages the `.etch-components/` folder at the project root. All cross-session state — component catalog, page compositions, project configuration — lives here.
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-level ACSS token overrides (optional, future use)
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 indentationWhen 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, customtags: array of descriptive tags derived from the description and component typefiles.js: set to the JS file path if hasJs is true, null if falsehasJs: 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.
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.
npx claudepluginhub flyingwebie/skills --plugin etchwpCreates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.