agentleFS
paulo-yamagishipaulo-yamagishi/claude-code-setup/.claude/skills/evolve/SKILL.md

evolve

Skill2 starsChanged 9 months agoMITView on GitHub

Auto-maintain Claude Code config files as your codebase evolves

41 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use instinct-export, instinct-import 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.
  • TheKREATORSSkill

    instinct-export

    Export instincts from project/global scope to a file

    Also in 4 projects that use this

  • TheKREATORSSkill

    instinct-import

    Import instincts from file or URL into project/global scope

    Also in 4 projects that use this

  • AWSSkill

    map

    Map verified service capabilities against customer-provided control framework and threat model. Produces mapping-results.json, controls-catalog.md, and framework-mapping.md. Supports pluggable frameworks: CCMv4, NIST 800-53, CIS Benchmarks, ISO 27001, etc. Split into 4 focused sub-skills for better accuracy; this skill orchestrates them.

    Also in 5 projects that use this

  • diego-tobalinaSkill

    build-fix

    Fix build and compilation errors systematically. Run when build fails.

    Also in 3 projects that use this

  • launch52-aiSkill

    skill-create

    Create and validate Claude Code skills with proper structure, checklists, and validation scripts. Use when creating a new skill, auditing existing skills, or ensuring skills meet quality standards. Generates complete skill scaffolds with SKILL.md, check scripts, guides, and templates.

    Also in 3 projects that use this

  • qtzx06Skill

    eval

    Evaluate trained YOLO model accuracy with mAP metrics and per-class error analysis. Identifies failure cases for targeted improvement. Use after training.

    Also in 5 projects that use this

  • +1 more from TheKREATORS

The file

We split this skill into the rules it gives an agent

10 rules. 0 are common, 4 are distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 36 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check whether the Stop hook is registered, and ask the user before installing:

    line 19
  2. Very specific:

    Read .claude/settings.json (if missing or empty, start with {})

    line 21
  3. Very specific:

    Check if any existing Stop hook prompt already contains "evolve" or "config maintenance"

    line 22
  4. Very specific:

    If hooks key is missing, create {"hooks": {"Stop": [{"hooks": [<entry>]}]}}

    line 33
  5. Very specific:

    If hooks.Stop exists, append the new hook entry to the existing array's hooks list

    line 34
  6. Distinctive:

    No meaningful changes detected

    line 52
  7. Very specific:

    ALL changed files are under .claude/ (avoid self-referential loops)

    line 53
  8. Distinctive:

    Only flag files where the content is actually inconsistent with the current codebase state.

    line 69
  9. Distinctive:

    New skills: create only if a clear repeatable pattern was found (at least 2 similar operations in the current session)

    line 76
  10. Very specific:

    CHANGELOG: add a concise one-line entry under the appropriate subsection in [Unreleased]

    line 77

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

/evolve — Auto-Maintain Claude Code Configuration

Automatically keep Claude Code config files accurate as a codebase evolves. Run after completing a task or wire into a Stop hook for hands-free maintenance.

Phase 0 — Self-Install (with consent)

Check whether the Stop hook is registered, and ask the user before installing:

  1. Read .claude/settings.json (if missing or empty, start with {})
  2. Check if any existing Stop hook prompt already contains "evolve" or "config maintenance"
  3. If already present: continue silently to Phase 1
  4. If not found: show the user the hook JSON that would be added:
    {
      "type": "prompt",
      "prompt": "Before finishing, silently evaluate if any Claude Code configuration files need updating based on the work just completed. Check CLAUDE.md accuracy, CHANGELOG.md Unreleased entries, skill/rule/agent validity, and settings alignment. Only edit files that are actually stale. Report changes in one line or stay silent."
    }
  5. Ask the user: "Install Stop hook for automatic config maintenance? (y/n)"
  6. If confirmed: merge the hook into settings and save:
    • If hooks key is missing, create {"hooks": {"Stop": [{"hooks": [<entry>]}]}}
    • If hooks.Stop exists, append the new hook entry to the existing array's hooks list
    • Preserve all other keys in the settings file
    • Report: [evolve] Installed: Stop hook added for automatic config maintenance
  7. If declined: report [evolve] Skipped: Stop hook not installed. Run /evolve manually when needed. and continue to Phase 1

Phase 1 — Detect What Changed

Gather recent changes to understand what work was done:

git diff --name-only
git diff --staged --name-only
git log --oneline -5

Categorize every changed file into: source code, tests, configs, dependencies, docs, new files/dirs.

Exit silently if:

  • No meaningful changes detected
  • ALL changed files are under .claude/ (avoid self-referential loops)

Phase 2 — Evaluate Each Config File

For each Claude Code config file that exists in the project, check whether it is stale:

Config FileWhat to Check
CLAUDE.mdStructure section matches actual dirs; Commands section has correct test/lint/build commands; Architecture reflects current state; any new key conventions emerging
CHANGELOG.mdUnreleased section has entry for work just done; skip if no CHANGELOG exists
.claude/skills/*/SKILL.mdCommands referenced still work; file paths still valid; any repeated workflow in this session that deserves a new skill
.claude/rules/*.mdConventions still match actual code patterns; scoped paths still valid
.claude/agents/*.mdTool lists still valid; model choices still appropriate
.claude/settings.jsonNew commands used that should be in allow list; formatter/linter commands still correct in hooks
.mcp.jsonExisting config still valid (don't auto-add servers)

Only flag files where the content is actually inconsistent with the current codebase state.

Phase 3 — Apply Minimal Updates

  • Only edit files that are actually stale — skip everything else
  • Use targeted edits — never rewrite an entire file
  • Respect existing style — match the formatting of the file being edited
  • New skills: create only if a clear repeatable pattern was found (at least 2 similar operations in the current session)
  • CHANGELOG: add a concise one-line entry under the appropriate subsection in [Unreleased]

Phase 4 — Report

  • Changes made: [evolve] Updated: CLAUDE.md (new dir documented), CHANGELOG.md (added feature entry)
  • New skill suggested: [evolve] Suggestion: consider creating /deploy skill for the deployment workflow used today
  • Nothing needed: complete silence — no output at all

Rules

  1. NEVER commit — only edit files, let the user decide when to commit
  2. NEVER create files without clear justification — threshold: repeatable pattern seen at least 2 times in the session
  3. Skip if only .claude/ files changed — avoids self-referential loops
  4. Conservative — when uncertain, suggest instead of edit
  5. Fast — no sub-skill invocations, no web fetches, just local file reads and edits
  6. Respect existing style — match formatting of the file being edited
  7. Project-agnostic — no hardcoded paths, languages, or tools; all detection-based

Stop Hook

The /evolve skill offers to install its Stop hook on first run (Phase 0). You will be asked for consent before any settings are modified.

To remove it, delete the Stop hook entry containing "config maintenance" from .claude/settings.json.

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.