|
| 1 | +--- |
| 2 | +name: claudeception |
| 3 | +description: | |
| 4 | + Continuous learning system that extracts reusable knowledge from work sessions. |
| 5 | + Triggers: (1) /claudeception command to review session learnings, (2) "save this as a skill" |
| 6 | + or "extract a skill from this", (3) "what did we learn?", (4) After any task involving |
| 7 | + non-obvious debugging, workarounds, or trial-and-error discovery. Creates new skills |
| 8 | + when valuable, reusable knowledge is identified. Integrates with Open Brain to prevent |
| 9 | + duplicates and share knowledge across sessions. |
| 10 | +author: Jared Irish |
| 11 | +version: 2.0.0 |
| 12 | +--- |
| 13 | + |
| 14 | +# Claudeception |
| 15 | + |
| 16 | +A continuous learning system that extracts reusable knowledge from work sessions and |
| 17 | +codifies it into new skills. This enables autonomous improvement over time. |
| 18 | + |
| 19 | +## Core Principle |
| 20 | + |
| 21 | +When working on tasks, continuously evaluate whether the current work contains extractable |
| 22 | +knowledge worth preserving. Not every task produces a skill. Be selective about what's truly |
| 23 | +reusable and valuable. |
| 24 | + |
| 25 | +## When to Extract |
| 26 | + |
| 27 | +Extract when you encounter: |
| 28 | + |
| 29 | +1. **Non-obvious Solutions**: Debugging that required significant investigation and wouldn't |
| 30 | + be immediately apparent to someone facing the same problem. |
| 31 | +2. **Error Resolution**: Specific error messages and their actual root causes, especially |
| 32 | + when the error message is misleading. |
| 33 | +3. **Tool Integration Knowledge**: How to properly use a tool, library, or API in ways |
| 34 | + that documentation doesn't cover well. |
| 35 | +4. **Workflow Optimizations**: Multi-step processes that can be streamlined. |
| 36 | +5. **Project-Specific Patterns**: Conventions or decisions specific to a codebase. |
| 37 | + |
| 38 | +## Quality Criteria |
| 39 | + |
| 40 | +Before extracting, verify: |
| 41 | + |
| 42 | +- **Reusable**: Will this help with future tasks, not just this one instance? |
| 43 | +- **Non-trivial**: Does this require discovery, not just documentation lookup? |
| 44 | +- **Specific**: Can you describe exact trigger conditions and solution? |
| 45 | +- **Verified**: Has this solution actually worked? |
| 46 | + |
| 47 | +## Extraction Process |
| 48 | + |
| 49 | +### Step 1: Search Open Brain for Existing Knowledge |
| 50 | + |
| 51 | +Before creating anything, check if this knowledge already exists: |
| 52 | + |
| 53 | +``` |
| 54 | +search_thoughts({ "query": "[keywords from the discovery]", "match_count": 5 }) |
| 55 | +``` |
| 56 | + |
| 57 | +| Search Result | Action | |
| 58 | +|---------------|--------| |
| 59 | +| Strong match found | Update the existing skill instead of creating new | |
| 60 | +| Partial match | Create new, add "See also" cross-reference | |
| 61 | +| No match | Create new | |
| 62 | + |
| 63 | +### Step 2: Check for Existing Skills |
| 64 | + |
| 65 | +Search local skill directories for related skills: |
| 66 | + |
| 67 | +``` |
| 68 | +Look in: |
| 69 | + .claude/skills/ (project-level) |
| 70 | + ~/.claude/skills/ (user-level) |
| 71 | +``` |
| 72 | + |
| 73 | +| Found | Action | |
| 74 | +|-------|--------| |
| 75 | +| Nothing related | Create new | |
| 76 | +| Same trigger, same fix | Update existing (bump version) | |
| 77 | +| Same trigger, different cause | Create new, link both ways | |
| 78 | +| Partial overlap | Update existing with new variant subsection | |
| 79 | + |
| 80 | +### Step 3: Research Current Best Practices |
| 81 | + |
| 82 | +When the topic involves specific technologies or tools, search the web for current documentation |
| 83 | +and best practices before creating the skill. Include a References section if external sources |
| 84 | +were consulted. Skip this for project-specific internal patterns. |
| 85 | + |
| 86 | +### Step 4: Structure the Skill |
| 87 | + |
| 88 | +```markdown |
| 89 | +--- |
| 90 | +name: [descriptive-kebab-case-name] |
| 91 | +description: | |
| 92 | + [Precise description with: (1) exact use cases, (2) trigger conditions like |
| 93 | + specific error messages, (3) what problem this solves.] |
| 94 | +author: [your name] |
| 95 | +version: 1.0.0 |
| 96 | +--- |
| 97 | + |
| 98 | +# [Skill Name] |
| 99 | + |
| 100 | +## Problem |
| 101 | +[Clear description of the problem] |
| 102 | + |
| 103 | +## Context / Trigger Conditions |
| 104 | +[When should this fire? Include exact error messages, symptoms, scenarios] |
| 105 | + |
| 106 | +## Solution |
| 107 | +[Step-by-step solution] |
| 108 | + |
| 109 | +## Verification |
| 110 | +[How to verify it worked] |
| 111 | + |
| 112 | +## Example |
| 113 | +[Concrete example of applying this skill] |
| 114 | + |
| 115 | +## Notes |
| 116 | +[Caveats, edge cases, related considerations] |
| 117 | + |
| 118 | +## References |
| 119 | +[Links to docs or resources, if any] |
| 120 | +``` |
| 121 | + |
| 122 | +### Step 5: Save the Skill |
| 123 | + |
| 124 | +Save to the appropriate location: |
| 125 | +- **Project-specific**: `.claude/skills/[skill-name]/SKILL.md` |
| 126 | +- **User-wide**: `~/.claude/skills/[skill-name]/SKILL.md` |
| 127 | + |
| 128 | +### Step 6: Capture to Open Brain |
| 129 | + |
| 130 | +After creating the skill, save it to Open Brain so future sessions can find it: |
| 131 | + |
| 132 | +``` |
| 133 | +capture_thought({ |
| 134 | + "content": "New skill created: [skill-name]. [1-2 sentence summary of what it solves]. |
| 135 | + Trigger: [exact trigger condition]. Location: ~/.claude/skills/[name]/SKILL.md" |
| 136 | +}) |
| 137 | +``` |
| 138 | + |
| 139 | +### Step 7: Quality Gate Checklist |
| 140 | + |
| 141 | +Before finalizing, verify: |
| 142 | + |
| 143 | +- [ ] Description contains specific trigger conditions |
| 144 | +- [ ] Solution has been verified to work |
| 145 | +- [ ] Specific enough to be actionable |
| 146 | +- [ ] General enough to be reusable |
| 147 | +- [ ] No credentials or internal URLs included |
| 148 | +- [ ] Doesn't duplicate existing skills |
| 149 | +- [ ] Open Brain searched before creating |
| 150 | +- [ ] Open Brain captured after creating |
| 151 | + |
| 152 | +## Retrospective Mode |
| 153 | + |
| 154 | +When `/claudeception` is invoked at session end: |
| 155 | + |
| 156 | +1. Review the session for extractable knowledge |
| 157 | +2. List candidates with brief justifications |
| 158 | +3. Focus on highest-value, most reusable knowledge |
| 159 | +4. Extract skills for top candidates (typically 1-3 per session) |
| 160 | +5. Report what was created and why |
| 161 | + |
| 162 | +## Self-Reflection Prompts |
| 163 | + |
| 164 | +Use during work to spot extraction opportunities: |
| 165 | + |
| 166 | +- "What did I just learn that wasn't obvious before starting?" |
| 167 | +- "If I faced this exact problem again, what would I wish I knew?" |
| 168 | +- "What error message led me here, and what was the actual cause?" |
| 169 | +- "Is this pattern specific to this project, or would it help elsewhere?" |
| 170 | + |
| 171 | +## Example: Complete Extraction Flow |
| 172 | + |
| 173 | +**Scenario**: While deploying n8n workflows via API, you discover that the POST endpoint |
| 174 | +rejects requests containing a `tags` field (returns "request/body/tags is read-only"), |
| 175 | +even though the GET response includes tags. The API also uses a different key than |
| 176 | +what's stored in the server's .env file. |
| 177 | + |
| 178 | +**Step 1 - Search Open Brain**: `search_thoughts("n8n workflow API tags read-only")` |
| 179 | +No match found. |
| 180 | + |
| 181 | +**Step 2 - Check existing skills**: Search `~/.claude/skills/` for n8n-related skills. |
| 182 | +Found `n8n-docker-troubleshooting` but it covers different issues (Code node sandbox). |
| 183 | + |
| 184 | +**Step 3 - Structure the skill**: |
| 185 | + |
| 186 | +```markdown |
| 187 | +--- |
| 188 | +name: n8n-workflow-api-quirks |
| 189 | +description: | |
| 190 | + Fix n8n REST API issues when importing/updating workflows. Use when: |
| 191 | + (1) POST /api/v1/workflows returns "tags is read-only", |
| 192 | + (2) API key from .env returns 401 but MCP config key works, |
| 193 | + (3) PATCH doesn't update workflow code (need delete + recreate). |
| 194 | +author: Jared Irish |
| 195 | +version: 1.0.0 |
| 196 | +--- |
| 197 | +# n8n Workflow API Quirks |
| 198 | +## Problem |
| 199 | +n8n's REST API has undocumented constraints... |
| 200 | +``` |
| 201 | + |
| 202 | +**Step 4 - Save**: `~/.claude/skills/n8n-workflow-api-quirks/SKILL.md` |
| 203 | + |
| 204 | +**Step 5 - Capture to Open Brain**: Records the skill's existence for cross-session discovery. |
| 205 | + |
| 206 | +## Anti-Patterns |
| 207 | + |
| 208 | +- **Over-extraction**: Not every task deserves a skill. Mundane solutions don't need preserving. |
| 209 | +- **Vague descriptions**: "Helps with React" won't surface when needed. |
| 210 | +- **Unverified solutions**: Only extract what actually worked. |
| 211 | +- **Documentation duplication**: Don't recreate official docs. Link to them, add what's missing. |
| 212 | +- **Skill hoarding**: If you have 30+ skills, review the 5 least-recently-modified for deprecation. |
| 213 | + |
| 214 | +## Skill Lifecycle |
| 215 | + |
| 216 | +1. **Creation**: Initial extraction with verified solution |
| 217 | +2. **Refinement**: Update when additional use cases or edge cases are discovered |
| 218 | +3. **Deprecation**: Mark deprecated when tools or patterns change |
| 219 | +4. **Archival**: Remove skills that are no longer relevant |
| 220 | + |
| 221 | +## Automatic Triggers |
| 222 | + |
| 223 | +Invoke this skill after completing a task when ANY of these apply: |
| 224 | + |
| 225 | +1. Solution required >10 minutes of investigation not found in documentation |
| 226 | +2. Fixed an error where the error message was misleading |
| 227 | +3. Found a workaround for a tool limitation that required experimentation |
| 228 | +4. Discovered configuration that differs from standard patterns |
| 229 | +5. Tried multiple approaches before finding what worked |
| 230 | + |
| 231 | +Also invoke when the user runs `/claudeception`, says "save this as a skill", or asks "what did we learn?" |
0 commit comments