agentleFS
manastalukdarmanastalukdar/ai-devstudio/skills/continuous-learning/SKILL.md

continuous-learning

Skill1 starsChanged 7 months agoMITView on GitHub

Extract repeated patterns from archived sessions and offer to convert them into reusable skills

42 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use project-guidelines-example, clickhouse-io 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.
  • HABUBUSSSkill

    project-guidelines-example

    Also in 7 projects that use this

  • HABUBUSSSkill

    clickhouse-io

    ClickHouse database patterns, query optimization, analytics, and data engineering best practices for high-performance analytical workloads.

    Also in 6 projects that use this

  • mstuder-slalomSkill

    continuous-learning-v2

    Instinct-based learning system that observes sessions via hooks, creates atomic instincts with confidence scoring, and evolves them into skills/commands/agents.

    Also in 7 projects that use this

  • Microsoft AzureSkill

    iterative-retrieval

    Max-3-cycle protocol for agent sub-tasks with WHY context and coordinator validation. Use when spawning sub-agents to complete scoped work.

    Also in 9 projects that use this

  • mstuder-slalomSkill

    django-verification

    Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.

    Also in 4 projects that use this

  • nek1987Skill

    postgres-patterns

    PostgreSQL patterns for reviewing migrations and writing efficient queries. Use when reviewing Alembic migrations, optimizing queries, or debugging database issues.

    Also in 7 projects that use this

  • +4 more from HABUBUSS
  • +1 more from mstuder-slalom

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 37 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If fewer than 3 session files exist, report "Not enough session history yet (need 3+)" and exit.

    line 29
  2. Distinctive:

    Never deletes or modifies existing skills or session files.

    line 150
  3. Very specific:

    Does not commit anything; user must run /commit explicitly.

    line 152

“Common” is measured: kept by at least 6 in 10 of the 37 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

Continuous Learning

Scan archived session logs to surface recurring manual workflows, then offer to convert high-frequency patterns into new SKILL.md stubs so repeated work becomes permanent automation.

Usage

/continuous-learning              # Scan all archived sessions for patterns
/continuous-learning --min 2      # Lower threshold (default: 3 repetitions)
/continuous-learning --generate   # Auto-generate stubs without prompting

Behavior

Phase 1: Discover sessions

# Find all archived session files (not the active .current-session pointer)
find .claude/sessions -name "*.md" -not -name ".current-session" 2>/dev/null | sort

If fewer than 3 session files exist, report "Not enough session history yet (need 3+)" and exit.

Phase 2: Extract commands and workflows

Scan each session file for lines that match invocation patterns:

# Commands invoked (slash commands, skill names)
grep -h -E "^/[a-z]|^\*\*Command\*\*:|Ran:|Invoked:" .claude/sessions/**/*.md 2>/dev/null \
  | sed 's|.*: ||' | sort | uniq -c | sort -rn | head -40

Also extract multi-step sequences: look for clusters of 3+ consecutive commands that appear together in at least --min sessions.

Phase 3: Build pattern registry

Load or create .claude/cache/continuous-learning/patterns.json:

{
  "last_scan": "2026-06-04T00:00:00Z",
  "patterns": [
    {
      "commands": ["/security-scan", "/review", "/test"],
      "frequency": 5,
      "sessions": ["session-a.md", "session-b.md"],
      "candidate_name": "quality-gate"
    }
  ]
}

Merge new findings with prior registry. Patterns that drop below --min threshold are removed.

Phase 4: Present findings

Display a ranked table of patterns that meet the threshold:

Repeated patterns found across your sessions:

  Rank  Frequency  Pattern
  ────  ─────────  ───────────────────────────────────────────
  1     7x         /security-scan → /review → /test
  2     5x         /find-todos → /fix-todos → /commit
  3     4x         /db-diagram → /migration-generate → /seed-data
  4     3x         /brainstorm → /write-plan → /implement

Convert any of these to a skill? (enter rank, or 'none'):

Phase 5: Generate skill stub (if requested)

For the chosen pattern, emit a SKILL.md stub using the skillify template:

---
name: <candidate-name>
description: <inferred one-line description>
disable-model-invocation: false
risk: safe
---

# <Title>

## Usage

\`/<candidate-name>\`

## Behavior

1. Run `/step-one`
2. Run `/step-two`
3. Run `/step-three`

## Token Optimization

**Expected range**: 200–600 tokens (delegates to constituent skills)
**Early exit**: Each constituent skill handles its own early exit.
**Patterns used**: Delegation to existing skills

Save to skills/<candidate-name>/SKILL.md and confirm location to user. Do not commit.

Examples

No patterns yet:

/continuous-learning
→ Scanned 2 session files — need at least 3 to detect patterns.
  Run more sessions, then try again.

Patterns found:

/continuous-learning
→ Scanned 8 sessions. Found 3 repeated patterns (threshold: 3x).
  [table shown]
  Convert #1 to a skill? → User enters "1"
  → Stub written: skills/quality-gate/SKILL.md

Token Optimization

Expected range: 400–900 tokens (initial scan), 150–300 tokens (cache hit)

Caching: Stores pattern registry in .claude/cache/continuous-learning/patterns.json. On subsequent runs, only sessions newer than last_scan are re-processed; old results are merged from cache.

Early exit: Exits immediately if fewer than 3 archived session files exist.

Patterns used: Grep-before-Read (scan with grep, never read full session files into context), Bash for system queries, progressive disclosure (summary table before detail), early exit.

Edge Cases

  • No sessions directory: Reports setup instructions and exits.
  • Sessions with no command lines: Skips those files silently.
  • Candidate name collision with existing skill: Appends -2 suffix and warns user.
  • User declines all patterns: Exits cleanly with "Nothing converted."

Safety

  • Never deletes or modifies existing skills or session files.
  • Skill stubs are written to skills/ only — not installed to ~/.claude/skills/ automatically.
  • Does not commit anything; user must run /commit explicitly.

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.