Meta-skill. Analyzes the current session’s lessons and saves them as a permanent reusable skill.
Take the “lessons learned” from the current conversation and crystallize them into a new SKILL.md file so the agent doesn’t make the same mistakes again.
Look back at the last 10-20 turns of conversation. Identify:
Generate a file at .agent/skills/<skill-name>/SKILL.md using this exact structure:
---
name: <skill-name>
description: <One sentence summary of what this skill does>
---
## Goal
<What problem does this skill solve?>
## Critical Rules
<The strict constraints identified in the chat>
## Workflow
<The step-by-step process we followed to get the right result>
Before saving, ask the user to verify any specific library versions, commands, or critical rules identified. Present them clearly.
Present the generated Markdown to the user in a code block.
Ask: “Does this accurately capture what we just did?”
If confirmed, save the file to .agent/skills/<skill-name>/SKILL.md (or the appropriate skills directory for the user’s project).
User: “Capture this as deploy-protocol.” Agent Action: Thinking: User corrected me to use force: true and check the dist/ folder. Drafting: Creates deploy-protocol with “Always check dist/ folder” as a rule.