/neo:train — turn repeated workflows into skills
Candidates: !grep -c '^## candidate:' .neo/brain/WORKFLOWS.md 2>/dev/null || echo "0 (no WORKFLOWS.md — run /neo:init or wait for neo-shadow to record some)" · Existing project skills: !ls .claude/skills 2>/dev/null || echo "none"
Steps
Guard: if
.neo/brain/WORKFLOWS.mdis missing or has no entries, stop — nothing to train on yet. Tell the user neo-shadow records candidates automatically at save time.Review the ledger: read
.neo/brain/WORKFLOWS.md. List entries to the user,proposedfirst (3+ sightings), thencandidate. Skipskilled— already promoted. If the user named a workflow, go straight to it; a user request overrides the 3-sighting threshold.Draft the skill for the chosen workflow:
- Directory name = the candidate's kebab-name (that becomes the command name).
- Frontmatter:
namematching the directory,descriptionbuilt from the entry'striggerline — concrete enough that auto-invocation fires on the right requests. - Body: the steps from the ledger, generalized (strip session-specific paths/values into placeholders), each step with its verify command where one exists.
- Keep it under a screen. A skill that needs scrolling needs splitting.
Approval gate: show the user the full draft and the target path
.claude/skills/<name>/SKILL.md(the project's skills directory — never the plugin's). Do not write without a yes.Write + record: on approval, write the file yourself (you, NEO, on the main thread — this is outside the shadow's jail, like
/neo:initwriting BRIEF.md). Then spawn neo-shadow with a one-line delta: mark the entrystatus: skilledinWORKFLOWS.mdand add a pointer to the new skill path.Report: "Trained: / — invoke it directly or let auto-delegation pick it up. Restart or /reload-plugins not needed for project skills."