A cross-platform /learn command that turns any input — code, papers, articles, sessions — into reusable agent skills with entrepreneurial-level quality judgment.
Run /learn <source> in any supported agent and it will:
- Parse the source (file, URL, session, pasted text)
- Gather content via existing tools
- Extract a reusable pattern
- Score it using the F.L.E.C.D. rubric — a 5-dimension entrepreneurial scoring system
- Decide whether to INVEST, DEFER, MERGE, or REJECT
- Store in a universal intermediate representation
- Sync to platform-native skill format
- Report the decision with full scoring breakdown
| Dimension | Weight | What It Measures |
|---|---|---|
| Frequency | 0.20 | How often this pattern recurs in your work |
| Leverage | 0.25 | How many agent turns it saves per use |
| Edge | 0.25 | How unique/non-reproducible the knowledge is |
| Compounding | 0.15 | How connected it is to your existing skills |
| Decay | 0.15 | How stable the knowledge is over time |
Decision thresholds:
- ≥ 8.0 → INVEST — create a full skill
- 5.0–7.9 → DEFER — store as lightweight memory, promote after 3+ matches
- 3.0–4.9 → MERGE — append to most similar existing skill
- < 3.0 → REJECT — not worth learning
| Source | Example |
|---|---|
| File path | /learn ~/projects/api/src/auth |
| URL | /learn https://arxiv.org/abs/2401.12345 |
| Session | /learn 刚才的操作 or /learn what I just did |
| Pasted text | Paste content, then /learn |
| Requirements | /learn https://... focus on implementation |
┌─────────────────────────────────────────────────────────┐
│ /learn SKILL.md — drives the agent through 8 steps │
├─────────────────────────────────────────────────────────┤
│ │
│ Universal Store (~/.agent-skills/) │
│ ├── skills/<name>/skill.json ← source of truth (IR) │
│ ├── ledger.jsonl ← usage events │
│ ├── deferred.jsonl ← DEFERred skills │
│ ├── decisions.log ← audit trail │
│ └── config.json ← thresholds & weights │
│ │
│ Platform Adapters │
│ ├── Claude Code → ~/.claude/skills/<name>/SKILL.md │
│ ├── Codex → (post-MVP) │
│ ├── OpenCode → (post-MVP) │
│ ├── QwenCode → (post-MVP) │
│ └── Gemini CLI → (post-MVP) │
│ │
│ Stop Hook (session_end.sh) │
│ └── AUTO-PRUNE / AUTO-PROMOTE every 24h │
│ │
└─────────────────────────────────────────────────────────┘
| Event | Trigger | Action |
|---|---|---|
| AUTO-PRUNE | 90 days unused | Move to .deprecated/ |
| AUTO-PROMOTE | 3+ matches in deferred | Promote to full skill |
| AUTO-DEMOTE | 60 days declining usage | Reduce priority |
openspec/— Full OpenSpec change with proposal, design, specs, and tasks.claude/skills/openspec-*/— OpenSpec commands for Claude Code.codex/skills/openspec-*/— OpenSpec commands for Codex.gemini/skills/openspec-*/— OpenSpec commands for Gemini CLI.opencode/skills/openspec-*/— OpenSpec commands for OpenCode.pi/skills/openspec-*/— OpenSpec commands for Pi.qwen/skills/openspec-*/— OpenSpec commands for QwenCode
The actual /learn skill lives at ~/.claude/skills/learn/SKILL.md (installed at runtime).
See openspec/changes/learn-skill-system/ for:
proposal.md— Strategic visiondesign.md— Technical architecturetasks.md— Implementation tasksspecs/— 5 capability specs
Inspired by Hermes Agent's /learn — extended with entrepreneurial scoring, universal IR, cross-platform sync, and automatic portfolio lifecycle management.