agentleFS
excattexcatt/superclaude-plusplus/skills/learn/SKILL.md

learn

Skill14 starsChanged 37 days agoMITView on GitHub

Extract reusable patterns from sessions and save them as skills. Use after solving complex problems, discovering useful workarounds, or establishing project-specific conventions. Keywords: learn, pattern, extract, skill, knowledge, save, remember.

195 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-anydoc, add-clidash and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • TomGranotSkill

    add-anydoc

    Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when agents need to read attached Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, or text-based PDF files without uploading them to a hosted parser.

    Also in 5 projects that use this

  • TomGranotSkill

    add-clidash

    Add clidash — a zero-dependency, read-only web dashboard that derives its tabs and tables at runtime from any CLI that lists resources as JSON. Ships pre-wired for NanoClaw's ncl CLI (agent groups, sessions, channels, users, roles), plus message-activity charts, a log tail, and a read-only file viewer for group skills/CLAUDE.md/profiles.

    Also in 5 projects that use this

  • seek888Skill

    open-gstack-browser

    Launch GStack Browser — AI-controlled Chromium with the sidebar extension baked in. Opens a visible browser window where you can watch every action in real time. The sidebar shows a live activity feed and chat. Anti-bot stealth built in. Use when asked to "open gstack browser", "launch browser", "connect chrome", "open chrome", "real browser", "launch chrome", "side panel", or "control my browser". Voice triggers (speech-to-text aliases): "show me the browser".

    Also in 11 projects that use this

  • Saqlain-811Skill

    ios-sync

    Regenerate the iOS debug bridge against the latest upstream gstack templates. (gstack)

    Also in 6 projects that use this

  • MicrosoftSkill

    add-codex

    Use Codex (CLI + AppServer) as the full agent provider — planning, tool orchestration, native compaction, MCP tools, session resume — in place of the Claude Agent SDK. ChatGPT subscription or OPENAI_API_KEY. Per-group via agent_provider. Distinct from using OpenAI as an MCP tool (where Claude remains the planner).

    Also in 6 projects that use this

  • MicrosoftSkill

    add-deltachat

    Add DeltaChat channel integration via @deltachat/stdio-rpc-server. Native adapter — no Chat SDK bridge. Email-based messaging with end-to-end encryption.

    Also in 6 projects that use this

  • +5 more from TomGranot
  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 3

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After solving complex errors

    line 14
  2. Distinctive:

    When discovering useful workarounds

    line 15
  3. Distinctive:

    When establishing project-specific conventions

    line 16

“Common” is measured: kept by at least 6 in 10 of the 170 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Learn Skill

Purpose

Analyze problem-solving patterns, debugging techniques, and workarounds from sessions to save them as reusable skills.

Core Principle: Recurring problem-solving → Pattern extraction → Skill creation → Reuse in future sessions

Activation Triggers

  • After solving complex errors
  • When discovering useful workarounds
  • When establishing project-specific conventions
  • Session end knowledge consolidation
  • Explicit user request: /learn, remember this, save pattern

Pattern Extraction Focus

Gate question: Would a future session, starting cold, save real time because this was written down? If the answer is "it would have figured this out from the code or from general knowledge in under a minute", do not save it. Every saved line is prompt context; it has to earn its place.

Include ✅

CategoryExamplesWhy it earns its place
Commands/workflows discoveredThe build variant that actually works, the test invocation with the required flag (--runInBand for shared DB state)Saves re-discovery on every session
Error Resolution PatternsTypeScript type error fixes, build failure repairsPrevents repeating a debugging session
Debugging TechniquesSpecific tool combinations, log analysis methodsNot derivable from code
Library QuirksUndocumented behaviors, version-specific differencesInvisible in the codebase
API / Config QuirksRate-limit workarounds, NEXT_PUBLIC_* must be set at build time, Redis needs ?family=0 for IPv6Environment knowledge that costs an outage to learn
Module Relationships"auth needs crypto initialized first; import order in bootstrap.ts matters"Architecture knowledge the code does not state
Testing approaches that workedWhich helper/factory to use instead of inline mocksEstablishes a pattern others will follow
Project ConventionsNaming rules, file structure, code style beyond what CONVENTIONS.md already saysOnly the project-specific delta
Architecture DecisionsPattern selection rationale, trade-offsThe "why" is never in the code

Exclude ❌

CategoryReasonBad example
Obvious from codeThe name or signature already says it"UserService handles user operations"
Generic best practiceUniversal advice, not project-specific; the model already knows it"Always write tests", "use meaningful names"
One-off fixesWill not recur; clutters the file"Fixed login button bug in commit abc123"
Verbose explanationsA one-liner carries the same informationA paragraph on what JWT is → Auth: JWT HS256, Bearer header
Simple typo / syntax fixesNo reuse value—
Transient external issuesService outage, flaky network—
Machine-specific paths/secretsNot generalizable; secrets never/Users/me/..., tokens
Already in CLAUDE.md / RULES.md / CONVENTIONS.mdDuplicate context is pure cost—

Where it goes

Learning typeDestination
Reusable across projects (library quirk, debugging technique)~/.claude/skills/<name>/SKILL.md (this skill)
Project-specific command, gotcha, module relationshipProject CLAUDE.md (team) or CLAUDE.local.md (personal, gitignored) — one line per concept, <command or pattern> - <why>
Must survive compaction in this session onlyBuilt-in auto memory (~/.claude/projects/<slug>/memory/)

Workflow

Step 1: Session Analysis

/learn

🔍 Analyzing session...
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Messages: 47
Tool calls: 89
Errors resolved: 3 cases
Main task: Auth system implementation
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Step 2: Pattern Identification

💡 Extractable patterns found
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. [HIGH VALUE] NextAuth + Prisma Session Type Extension
   - Problem: userId missing in Session type
   - Solution: Type extension in next-auth.d.ts
   - Reusability: ⭐⭐⭐⭐⭐

2. [MEDIUM VALUE] Supabase RLS Debugging Pattern
   - Problem: Empty results due to RLS policy
   - Solution: Test with service_role key, then fix policy
   - Reusability: ⭐⭐⭐⭐

3. [LOW VALUE] ESLint Rule Disable
   - Problem: unused-vars warning
   - Solution: .eslintrc modification
   - Reusability: ⭐⭐ (project-specific)

Select patterns to save [1,2,3 or all]:

Step 3: Skill Document Generation

📝 Generating skill document...

File: ~/.claude/skills/nextauth-prisma-session-type/SKILL.md
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# NextAuth + Prisma Session Type Extension

## Problem
Type error when accessing userId in NextAuth session
`Property 'userId' does not exist on type 'Session'`

## Solution
Create `types/next-auth.d.ts`:
\`\`\`typescript
import { DefaultSession } from "next-auth"

declare module "next-auth" {
  interface Session {
    user: {
      id: string
    } & DefaultSession["user"]
  }
}
\`\`\`

## When to Apply
- When using NextAuth + Prisma combination
- When adding custom fields to session

## Related
- NextAuth official docs: TypeScript section
- Prisma adapter configuration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

✅ Skill saved

Step 4: Confirmation

View saved skill? [y/N]

Learned Skills Storage

Storage Location

One directory per learned skill, so the harness discovers it like any other skill (a flat .md under a shared folder is never loaded):

~/.claude/skills/
├── nextauth-prisma-session-type/SKILL.md
├── supabase-rls-debugging/SKILL.md
├── react-hydration-mismatch-fix/SKILL.md
└── vercel-edge-function-timeout/SKILL.md

Skill File Structure

---
name: pattern-name
description: Brief description
source: learn
learned_at: 2025-01-26
source_project: project-name
tags: [nextauth, prisma, typescript]
---

# Pattern Name

## Problem
Problem situation description

## Cause
Root cause analysis

## Solution
Resolution method (with code examples)

## When to Apply
Situations where this pattern applies

## Caveats
Warnings, edge cases

## Related
Related documentation, resource links

Auto-Learning (Stop Hook)

Automatic Session End Analysis

.claude/settings.json:

{
  "hooks": {
    "Stop": [
      {
        "type": "command",
        "command": "~/.claude/scripts/evaluate-session.sh"
      }
    ]
  }
}

Auto-Learning Configuration

.claude/learn.config.json:

{
  "auto_learn": {
    "enabled": true,
    "min_session_length": 10,
    "extraction_threshold": "medium",
    "auto_approve": false
  },
  "storage": {
    "path": "~/.claude/skills/",
    "max_skills": 100
  },
  "filters": {
    "ignore_patterns": [
      "typo",
      "syntax_error",
      "one_time_fix"
    ],
    "focus_patterns": [
      "error_resolution",
      "debugging_technique",
      "workaround",
      "architecture_decision"
    ]
  }
}

Integration

With PM Agent

Integration with PM Agent's self-improvement layer:

Session complete
    │
    ├─→ /learn (pattern extraction)
    │
    └─→ PM Agent (documentation, knowledge base update)

With /checkpoint

/checkpoint create "before-experiment"
... experimental resolution attempts ...
... success! ...
/learn  # Save successful pattern

With Future Sessions

Saved skills auto-referenced when similar problems occur:

🔍 Similar pattern detected
━━━━━━━━━━━━━━━━━━━━━━━━━━
Previously learned pattern available:
- nextauth-prisma-session-type

Apply? [y/N]

Quality Filters

Value Assessment

CriterionWeight
Reusability potential40%
Resolution complexity30%
Time-saving impact20%
Documentation value10%

Pre-save Checklist (all must be true)

  • Project- or library-specific — not generic advice
  • Not already obvious from the code, and not already in CLAUDE.md / RULES.md / CONVENTIONS.md
  • Commands were actually run and work; file paths are real
  • Expressed in the most concise form (one line per concept where possible)
  • A new session would find it before needing it (name and tags are searchable)

Extraction Threshold

  • Low: Extract most patterns (noisy)
  • Medium: Medium+ value only (recommended)
  • High: High-value patterns only (strict)

Commands

CommandDescription
/learnAnalyze current session and extract patterns
/learn listList saved skills
/learn show <name>View specific skill content
/learn delete <name>Delete skill
/learn search <keyword>Search skills

Best Practices

Good Pattern Example

# React Server Component Data Fetching

## Problem
Waterfall issue when fetching server data
in client components

## Solution
Fetch data in server component, pass as props
or use Suspense + parallel fetch

## Code Example
\`\`\`tsx
// ✅ Good: Server Component
async function Page() {
  const data = await fetchData()
  return <ClientComponent data={data} />
}
\`\`\`

Patterns to Avoid

# Fix Typo in Config  ❌
## Problem
Build failure due to typo
## Solution
Fix typo

→ No reuse value, do not save
# UserService  ❌
The `UserService` class handles user operations.

→ Obvious from the code, do not save
# JWT Authentication  ❌
JWT (JSON Web Tokens) are an open standard (RFC 7519) that defines a compact
and self-contained way for securely transmitting information ... (12 lines)

→ Verbose; the useful residue is one line: `Auth: JWT HS256, Bearer header`

Include/Exclude criteria and the bad examples above are adapted from Anthropic's claude-md-management plugin (update-guidelines.md, Apache 2.0) — see NOTICE.md.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.