agentleFS
thorwhalenthorwhalen/skill/skills/skill-sync/SKILL.md

skill-sync

Skill1 starsChanged 5 months agoMITView on GitHub

Skill maintenance tooling for the skill package. Keep AI agent skills in sync with their source package code. Use this skill when a package's code, API, or behavior has changed and its skills may be outdated, when the user says "update the skills", "skills are stale", "sync skills with code", "refresh skills", or when you notice that skill instructions reference functions/classes/patterns that no longer exist in the codebase. Also use after major refactors, API changes, or version bumps.

21 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use session-handoff, verification-before-completion and 2 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.
  • wpankSkill

    session-handoff

    WHAT: Create comprehensive handoff documents that enable fresh AI agents to seamlessly continue work with zero ambiguity. Solves long-running agent context exhaustion problem.

    Also in 3 projects that use this

  • OpenAISkill

    verification-before-completion

    Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always

    Also in 3 projects that use this

  • OpenAISkill

    test-driven-development

    Use when implementing any feature or bugfix, before writing implementation code

    Also in 3 projects that use this

  • GoogleSkill

    tdd

    Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After significant code changes (new features, renamed functions, changed signatures, removed modules)

    line 25
  2. Distinctive:

    Before a release (skills should match the version being shipped)

    line 27
  3. Very specific:

    When a user reports that a skill's instructions don't match reality

    line 28
  4. Distinctive:

    Do the functions/classes mentioned still exist?

    line 54
  5. Distinctive:

    Do the code examples still run correctly?

    line 60
  6. Distinctive:

    Do imports still resolve?

    line 61
  7. Distinctive:

    Do referenced file paths still exist?

    line 65
  8. Very specific:

    Keep the existing structure and style — don't rewrite the whole skill.

    line 87
  9. Distinctive:

    Update specific claims, examples, and references.

    line 88
  10. Distinctive:

    Add notes about new features or changed behavior.

    line 89
  11. Distinctive:

    Remove references to things that no longer exist.

    line 90
  12. Very specific:

    Update the description in frontmatter if the skill's scope has changed.

    line 91

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

Skill Sync

Detect and fix drift between a package's code and the skills that describe it.

Why this matters

Skills are documentation for AI agents. Like any documentation, they rot when the code they describe changes. A stale skill is worse than no skill — it confidently tells the agent to do things that no longer work.

When to sync

  • After significant code changes (new features, renamed functions, changed signatures, removed modules)
  • Before a release (skills should match the version being shipped)
  • When a user reports that a skill's instructions don't match reality
  • Periodically as maintenance (e.g., monthly, or when touching the package)

Process

1. Inventory current skills

Find all skills associated with this package:

# Check project-local skills
ls -la .claude/skills/

# Check if the package ships skills in data/
ls -la {pkg_name}/data/skills/ 2>/dev/null

# Check for symlinks from the global store
skill list-skills

2. Diff skills against code

For each skill, read its SKILL.md and check every claim against the current codebase:

API references:

  • Do the functions/classes mentioned still exist? (grep for them)
  • Have their signatures changed? (read the source)
  • Have default values or behaviors changed?
  • Are there new parameters the skill should mention?

Code examples:

  • Do the code examples still run correctly?
  • Do imports still resolve?
  • Are there deprecated patterns the skill still recommends?

File paths:

  • Do referenced file paths still exist?
  • Have modules been moved or renamed?

Behavioral claims:

  • Does the skill describe behavior that has changed?
  • Are there new edge cases or gotchas?

3. Categorize findings

Group issues by severity:

  • Breaking — Skill references something that no longer exists or has changed in a way that would cause errors (wrong function name, removed parameter, changed return type). Fix these immediately.
  • Stale — Skill is technically correct but incomplete (new features not mentioned, new options not documented). Update when convenient.
  • Cosmetic — Minor wording issues, formatting. Low priority.

4. Apply updates

Edit each skill's SKILL.md to fix the issues found. When updating:

  • Keep the existing structure and style — don't rewrite the whole skill.
  • Update specific claims, examples, and references.
  • Add notes about new features or changed behavior.
  • Remove references to things that no longer exist.
  • Update the description in frontmatter if the skill's scope has changed.

After editing, validate:

skill validate .claude/skills/{name}

5. Report

Summarize what changed:

## Skill Sync Report

### my-skill
- FIXED: `search()` now takes `backends` parameter (was `sources`)
- ADDED: New `link_skills()` function documentation  
- REMOVED: Reference to deprecated `AGENT_TARGETS` dict (now a Registry)

### other-skill  
- No changes needed ✓

Automation tip

For packages with CI, consider adding a step that checks skill freshness:

from skill import validate
import subprocess

# Validate all skills
for skill_dir in Path(".claude/skills").iterdir():
    if skill_dir.is_dir():
        issues = validate(str(skill_dir))
        if issues:
            print(f"⚠ {skill_dir.name}: {issues}")

This won't catch semantic drift (the skill says "returns a list" but now it returns a generator), but it catches structural issues like missing fields.

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.