Clain plan recreate
Use when the developer wants a delete-and-recreate plan for cache-managed / ephemeral / bytecode subtrees of their dev workspaces — e.g. "show me a recreate plan", "what would clain delete and rebuild?", "plan to wipe node_modules and reinstall via pnpm". Always runs in --dry mode; never executes deletions. Surfaces unsafe actions (ambiguous toolchain, missing lockfile) prominently so the developer can review before any execution is enabled.From its SKILL.md
npx -y skills add drai-inn/clain --skill clain-plan-recreateAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
- runs commandsInstructs the agent to run 5 commands, including `clain plan recreate --here "$WORKSPACE_PATH" --dry` and 4 more.
SKILL.md
3.3 KB, 647 tokens by cl100k_base, as published. Nobody here has run it
Run the clain CLI to produce a delete-and-recreate plan in dry mode for a developer-supplied root, then render the result.
Steps
-
Pick the mode (matches the classify mode the developer used). Single-workspace: pass
--here. Tree of workspaces: omit it. -
Ensure a classify cache exists. If the developer has not run
clain classify(orclain classify --here) for the path recently, do that first (or invoke theclain-classifyskill). Without a matching cache,clain plan recreateexits non-zero with a clear error. -
Always pass
--dry. This is the safe-preview mode and is required for normal use until the project's development-phase gate is lifted by a future named spec.
clain plan recreate --here "$WORKSPACE_PATH" --dry # single-workspace mode
clain plan recreate "$ROOT" --dry # tree mode
- Or for machine-readable output:
clain plan recreate --here "$WORKSPACE_PATH" --dry --json
clain plan recreate "$ROOT" --dry --json
For copy-paste into a spreadsheet, use --table (mutually exclusive with --json):
clain plan recreate --here "$WORKSPACE_PATH" --dry --table
The default render groups actions by workspace into Rich panels with the workspace path shown once in the panel title (targets and commands relative to that path); the --table render is a single flat table with absolute paths.
-
Surface the plan to the developer with these emphases:
- The total action count and the unsafe count (look for
Unsafe:in the footer orsummary.unsafe_countin JSON). - Any actions flagged with
safe_to_execute: false— list them, with theirunsafe_reason, before any safe actions. - The plan path under
$XDG_STATE_HOME/clain/plans/recreate-<UTC>.json. The plan is the audit artefact; tell the developer where it lives.
- The total action count and the unsafe count (look for
-
If the developer asks "can you just run it for me?", explain that execution is blocked by the project's development-phase gate. The plan is the deliverable; the developer reviews it and runs the commands themselves until the gate is lifted by a future spec.
Notes
- Never omit
--drywhen invoking this skill. Without it, the command attempts execution, hits the phase gate, and emits an error. - Unsafe actions cover real cases: a Python workspace with
pyproject.tomlbut no toolchain lockfile, a Node workspace withpackage.jsonbut no lockfile, a workspace with no recognised manifest at all. Treat each as a request for developer judgement, not a flaw in the tool. - If the command fails (
clain: command not found, no classify cache, root does not exist), report the failure verbatim. Do not work around it; do not invent a recreate command from your own knowledge.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.