| name | auto-skill |
| description | You just completed a complex task that required 8+ distinct tool calls, or you noticed you are solving the same type of problem for the third time. Create a skill candidate draft so this workflow can be reused in future sessions without rediscovery. Draft goes to skills/drafts/ — never auto-activates until the user approves. |
| triggers | ["create skill","draft skill","skill candidate","auto-skill","I've done this before","skill from task","save this workflow","make this a skill","approve skill","reject skill","activate skill"] |
Auto-Skill Creation
When you complete a complex task with 8+ tool calls, or recognise a repeating pattern, draft a skill candidate. Drafts stage in skills/drafts/ until approved — they are never auto-loaded into live sessions.
Step 1: Post-Task Detection Check
After completing any task, run this self-check:
- Tool call count: Did this task require 8+ distinct tool calls for a coherent workflow?
- Recurrence: Does your daily memory show this same task type appearing 3+ times across different dates?
- Existing skill: Does a skill for this already exist in
.claude/skills/? If yes, stop — consider proposing a patch instead.
- Repeatability: Is this task type likely to recur, or was it a one-off?
If yes to 1 or 2, AND no to 3, AND yes to 4 → create a draft.
Do NOT draft for:
- Routine heartbeat operations
- One-off research tasks
- Tasks already covered by existing skills
- Simple single-step operations
Step 2: Draft the Skill
Create the draft at skills/drafts/[skill-name]/SKILL.md:
mkdir -p skills/drafts/[skill-name]
Use this template:
---
name: skill-name-here
description: One sentence, max 100 chars. What this skill does and when to use it.
created: YYYY-MM-DD
created_by: auto
trigger: "Natural language description of when this skill fires"
source_task_id: TASK-ID-THAT-GENERATED-THIS
version: 1
status: draft
---
## Purpose
[What this skill does. 2-3 sentences max.]
## When to Use
[Specific conditions that should trigger this skill. Be concrete.]
## Inputs Required
- `$PARAM_1` — description
- `$PARAM_2` — description (optional)
## Steps
1. [Step 1 — specific, actionable]
2. [Step 2]
3. ...
## Output
[What gets created or sent when this skill completes.]
## Approval Gate
[Does any step require user approval? Specify exactly which step.]
## Notes / Edge Cases
[Known failure modes, dedup considerations, platform quirks.]
Step 3: Self-Review Before Saving
Before writing the file, check:
If any check fails, revise before saving.
Step 4: Log and Notify
After saving the draft:
cortextos bus log-event action skill_draft_created info --meta "{\"skill\":\"[skill-name]\",\"source_task\":\"[task_id]\",\"agent\":\"$CTX_AGENT_NAME\"}"
cortextos bus send-message $CTX_ORCHESTRATOR_AGENT normal "Skill candidate drafted: [skill-name] — source task [task_id]. Check skills/drafts/[skill-name]/SKILL.md. Awaiting digest review."
The orchestrator includes it in the next morning briefing for the user. The user replies approve [skill-name], reject [skill-name] [reason], or revise [skill-name] [feedback].
Step 5: Handling Approval Responses
When you receive an inbox message with a skill decision:
Approved
mv skills/drafts/[skill-name]/ .claude/skills/[skill-name]/
sed -i '' 's/status: draft/status: active/' .claude/skills/[skill-name]/SKILL.md
cortextos bus log-event action skill_activated info --meta "{\"skill\":\"[skill-name]\",\"agent\":\"$CTX_AGENT_NAME\"}"
cortextos bus send-telegram $CTX_TELEGRAM_CHAT_ID "Skill activated: [skill-name] is now live and will be used in future sessions."
cortextos bus ack-inbox [msg_id]
Rejected
mkdir -p skills/archive/[skill-name]
mv skills/drafts/[skill-name]/SKILL.md skills/archive/[skill-name]/SKILL.md
echo "\n## Rejection\nReason: [reason]\nDate: $(date -u +%Y-%m-%d)" >> skills/archive/[skill-name]/SKILL.md
cortextos bus log-event action skill_rejected info --meta "{\"skill\":\"[skill-name]\",\"reason\":\"[reason]\"}"
cortextos bus ack-inbox [msg_id]
Revise
cortextos bus send-message $CTX_ORCHESTRATOR_AGENT normal "Skill candidate [skill-name] revised per feedback. Ready for re-review."
cortextos bus ack-inbox [msg_id]
Draft Lifecycle
| State | Location | Loaded at boot? |
|---|
| draft | skills/drafts/[name]/SKILL.md | No |
| active | .claude/skills/[name]/SKILL.md | Yes |
| archived | skills/archive/[name]/SKILL.md | No |
Drafts older than 14 days with no action: move to skills/archive/ and log skill_expired.
Critical Rules
- No automated commits — skill files are never committed without explicit user approval
- Draft means invisible — agents do NOT load or execute skills from
skills/drafts/
- No self-modification — skills never modify other skills (v2 feature)
- No external calls without gates — any skill step with external side effects must document its own approval requirement