بنقرة واحدة
auto-skill-extractor
Automatically learn from your AI's work and turn repeated subagent tasks into reusable skills
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Automatically learn from your AI's work and turn repeated subagent tasks into reusable skills
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | auto-skill-extractor |
| description | Automatically learn from your AI's work and turn repeated subagent tasks into reusable skills |
Turn your agent's work into reusable skills. Automatically.
✅ You run complex subagent tasks repeatedly
✅ You want to build a skill library without manual authoring
✅ You run multi-domain tasks (files + system + web)
✅ You want your agent to learn from its own patterns
❌ Simple 1-2 tool tasks (not worth skilling)
❌ One-off exploratory work
❌ You prefer manually authoring every skill
clawhub install auto-skill-extractor
mkdir -p skills/auto-draft skills/auto skills/manual
Add to AGENTS.md after subagent completion:
# Auto-skill extraction trigger
import subprocess
import json
# Write trigger input
trigger_data = {
"completion_status": "success",
"tool_calls": tool_call_count, # from subagent result
"transcript_summary": brief_summary, # Keep brief, avoid secrets
"session_id": session_key,
"multi_domain": True # if applicable
}
# RECOMMENDED: Pipe via stdin (no file on disk)
result = subprocess.run(
["python3", "scripts/auto-skill-trigger.py"],
input=json.dumps(trigger_data),
capture_output=True,
text=True
)
# ALTERNATIVE: File-based (delete immediately after)
# with open("/tmp/trigger.json", "w") as f:
# json.dump(trigger_data, f)
# result = subprocess.run(
# ["python3", "scripts/auto-skill-trigger.py", "/tmp/trigger.json"],
# capture_output=True, text=True
# )
# os.remove("/tmp/trigger.json") # SECURITY: Delete after use
output = json.loads(result.stdout)
if output.get("action") == "extract":
print(f"🔄 Created DRAFT skill: {output['skill_name']}")
Run a subagent with complex work:
Spawn subagent to analyze codebase...
- Read 5 config files ✓
- Check processes ✓
- Write summary report ✓
Result: skills/auto-draft/codebase-analyzer-abc123/ created automatically
After every subagent completion:
| Check | Must Pass |
|---|---|
| Status | success |
| Tool calls | ≥ 3 |
| Complexity | ≥ 4 |
Base: tool_calls × 0.7 (max 5 pts)
3 tools = 2 pts, 5 tools = 4 pts
Bonus: +2 multi-domain (files + system + web)
+2 error recovery (retry logic)
+1 fail-then-succeed
Threshold: 4 points = extract
skills/auto-draft/my-skill-abc123/
├── SKILL.md ← Template with metadata
└── meta.json ← Invocation tracking
meta.jsonskills/auto/Promoted skills are:
/skills auto listEdit scripts/auto-skill-trigger.py:
COMPLEXITY_THRESHOLD = 4 # Lower = more drafts, more curation
MAX_QUEUE_SIZE = 50 # Pending extraction limit
PROMOTE_THRESHOLD = 3 # Invocations before promotion
Ignore thresholds:
#skill: force
python3 scripts/skill-lifecycle.py drafts
python3 scripts/skill-lifecycle.py promote my-skill-name
python3 scripts/skill-lifecycle.py process
# Removes drafts unused for 7+ days
../../../etc → blockedCheck extraction worked:
# See recent DRAFTs
ls -la skills/auto-draft/
# Check extraction queue
cat scripts/skill-extraction-queue.json
# View specific skill
cat skills/auto-draft/my-skill-abc123/SKILL.md
| Problem | Cause | Fix |
|---|---|---|
| No DRAFTs created | Threshold too high | Lower COMPLEXITY_THRESHOLD |
| Too many DRAFTs | Threshold too low | Raise threshold, manually curate |
| Promotion never happens | Not using DRAFTs | Run /skills promote manually |
| Skills not useful | Noise in extraction | Tune thresholds, review DRAFTs weekly |
Subagent completes
↓
auto-skill-trigger.py
↓
Score complexity (0-10)
↓
If ≥ 4: Create DRAFT
↓
skill-lifecycle.py
↓
After 3 uses: PROMOTE → skills/auto/
↓
After 7 days: ARCHIVE