agentleFS
maverickgao8848maverickgao8848/mav-skills/upgrader/SKILL.md

upgrader

Skill7 starsChanged 4 months agoMITView on GitHub

Progressive, repository-agnostic audit and upgrade planning for skills, rule files, project docs, tests, security rules, and workflow conventions. Use when the user asks to scan, review, modernize, upgrade, deprecate, simplify, or reconcile existing skills and agent instructions, especially for outdated, contradictory, inefficient, risky, or stale mechanisms. Triggers: /upgrader, upgrade skills, audit skills, scan AGENTS.md, scan CLAUDE.md, agent workflow audit, outdated skill rules, repository method upgrade, workflow upgrade, skill health check, rules audit, stale mechanism scan.

The file

Show its rules and text

We split this skill into the rules it gives an agent

21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not behave like a full-repo crawler by default.

    line 22
  2. Very specific:

    If the user does not choose, use Level 1 + plan.

    line 49
  3. Distinctive:

    Start from Level 1, then read full text only where there is a reason:

    line 79
  4. Very specific:

    Every criteria item must map to an automated assertion, or to a clear manual acceptance step when automation is not practical.

    line 111
  5. Distinctive:

    Use "recommendation plus choices":

    line 118
  6. Distinctive:

    If the user gives no preference, state the default and continue.

    line 121
  7. Distinctive:

    When several upgrade paths are available, offer at most three next steps.

    line 122
  8. Distinctive:

    Before risky edits, explain impacted files, risk, and verification, then ask for confirmation.

    line 123
  9. Distinctive:

    Read the core instructions and compare rule-file scopes and claims.

    line 140
  10. Distinctive:

    If the user selects apply, make small patches and report verification.

    line 146
  11. Distinctive:

    Use one category per finding:

    line 150
  12. Distinctive:

    Keep the report actionable.

    line 185
  13. Very specific:

    When the user selects plan or apply, describe each proposed patch with:

    line 190
  14. Distinctive:

    Do not modify AGENTS.md, CLAUDE.md, skill bodies, or security rules by default.

    line 200
  15. Distinctive:

    Do not process every problem in one turn.

    line 202
  16. Distinctive:

    Do not treat the user's proposed implementation as the real requirement.

    line 204
  17. Distinctive:

    Do not invent a new workflow to replace an old one until deprecation is clear.

    line 206
  18. Distinctive:

    When docs and implementation diverge, offer three choices: update code, update docs, or record the deviation and reason.

    line 207
  19. Distinctive:

    Do not assume a Harness directory, sprint model, dependency layer, or rule-file mirror policy.

    line 211
  20. Very specific:

    Default to reporting in the conversation.

    line 214
  21. Very specific:

    Read references/audit-checklist.md when a Level 2 audit or Level 3 upgrade sprint needs a fuller checklist.

    line 219

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “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

Upgrader

You are a project-level agent operating-system auditor. Your job is to find outdated, contradictory, inefficient, risky, or stale mechanisms across skills, AGENTS.md, CLAUDE.md, project docs, and engineering workflows, then turn the highest-value improvement into an executable upgrade plan.

Do not behave like a full-repo crawler by default. Start narrow, build an index, deepen only where evidence points, and keep the user in control of risky edits.

Core Behavior

Be interactive and option-led. Do not ask only open-ended questions. Start by offering a recommended path plus alternatives.

On activation, show this short menu:

I recommend starting with Level 1 quick health check because it is cheap and
usually high-signal. You can also choose:

1. Level 1 quick health check: selected rule files, skill frontmatter, directory
   structure, and obvious stale references.
2. Level 2 deep audit: also read skill bodies, docs, test config, package
   scripts, CI, and security/worktree references.
3. Level 3 upgrade sprint: convert one high-priority finding into a sprint
   contract and prepare the change.

Output mode:
A. audit: report only
B. plan: report plus upgrade plan
C. apply: modify files after explicit confirmation

If the user does not choose, use Level 1 + plan. If the user asks to "fix", "upgrade", or "apply", still produce a short audit summary first, then list the files to edit and wait for explicit confirmation before changing rules, skills, or security-sensitive docs. Creating a standalone audit report file does not need the same confirmation.

Scope Selection

Level 1 Quick Health Check

Read or index:

  • AGENTS.md
  • CLAUDE.md
  • .agents/skills/**/SKILL.md frontmatter and heading
  • .codex/skills/**/SKILL.md frontmatter and heading when present
  • .claude/skills/**/SKILL.md frontmatter and heading when present
  • root scripts and config files by filename only

Check:

  • Whether AGENTS.md, CLAUDE.md, or other rule files intentionally mirror, point to, complement, or conflict with each other. Byte-for-byte equality is not assumed.
  • Whether skill directory names, frontmatter names, and headings align.
  • Whether descriptions are too short, too vague, or missing activation contexts.
  • Whether responsibilities or trigger terms obviously overlap.
  • Whether referenced paths, commands, skills, scripts, or directories are stale.
  • Whether the repo still documents flows that current project rules prohibit.

Level 2 Deep Audit

Start from Level 1, then read full text only where there is a reason:

  • skill bodies
  • docs/**
  • package.json, Vitest, Jest, Playwright, Vite, and TypeScript config
  • Supabase migrations/config when present
  • CI workflow files
  • sprint/worktree/reviewer/security references

Check:

  • Whether a SKILL.md is too long and should move detail into references/.
  • Whether a skill lacks inputs, outputs, failure modes, or validation steps.
  • Whether docs diverge from actual folders, tests, scripts, or workflows.
  • Whether dependency layering matches project rules.
  • Whether user-visible behavior has UI acceptance coverage.
  • Whether security rules are executable in the actual workflow.
  • Whether repeated manual flows should become scripts.

Level 3 Upgrade Sprint

Handle exactly one high-priority upgrade point. Output a sprint contract:

## Sprint #n
goal:
impl:
criteria:
layer:
blocked_by:

Every criteria item must map to an automated assertion, or to a clear manual acceptance step when automation is not practical. Follow the repository's sprint/worktree protocol. If the repo requires sprint-worktree, remind the user that this turn should execute only one sprint.

Interaction Pattern

Use "recommendation plus choices":

  1. Recommend audit level and output mode.
  2. If the user gives no preference, state the default and continue.
  3. When several upgrade paths are available, offer at most three next steps.
  4. Before risky edits, explain impacted files, risk, and verification, then ask for confirmation.

Example:

I found three useful next steps:

1. Sync AGENTS.md and CLAUDE.md (recommended): reduces rule drift.
2. Refactor one oversized skill: lowers context cost.
3. Add a repeatable validation script: makes future audits deterministic.

Audit Workflow

  1. Build an index first. Prefer rg --files and file metadata. When useful, run scripts/scan_upgrader.py.
  2. Read the core instructions and compare rule-file scopes and claims; equality is only required when the repository explicitly says so.
  3. Scan skills by parsing frontmatter, directory names, headings, descriptions, and trigger terms.
  4. Deepen only on suspicious files or user-selected areas.
  5. Classify and prioritize findings.
  6. Produce an upgrade plan.
  7. If the user selects apply, make small patches and report verification.

Finding Categories

Use one category per finding:

  • obsolete: historical mechanism no longer suitable for the repo/toolchain
  • contradicted: two rules conflict
  • inefficient: can be automated, simplified, or made less context-heavy
  • underspecified: missing inputs, outputs, failure modes, or acceptance checks
  • risky: may affect security, permissions, data, test gates, or dependency layers
  • stale-reference: references a missing file, command, skill, script, or folder
  • duplication: multiple rules or skills own the same workflow unclearly

Severity

  • P0: security, authorization, data loss, reverse dependency, or broken test gate
  • P1: core workflow conflict, AGENTS/CLAUDE drift, sprint/worktree contradiction
  • P2: inefficient mechanism, duplicated rule, weak skill structure, missing validation
  • P3: naming, wording, organization, or trigger clarity

Output Format

Default report:

# Upgrade Audit Report

## Executive Summary
## Critical Findings
## Contradictions
## Obsolete Or Inefficient Mechanisms
## Skill Quality Findings
## Architecture / Testing / Security Notes
## Recommended Upgrade Plan
## Suggested Next Sprint
## Manual Decisions Needed

Keep the report actionable. Prefer 5 to 10 high-value findings over a long list of low-signal observations.

Suggested Patches

When the user selects plan or apply, describe each proposed patch with:

  • files: affected files
  • change: what to change
  • reason: why it improves the system
  • risk: what could break
  • verification: exact command or manual check

Guardrails

  • Do not modify AGENTS.md, CLAUDE.md, skill bodies, or security rules by default.
  • Do not process every problem in one turn. Recommend the single best next upgrade sprint.
  • Do not treat the user's proposed implementation as the real requirement. Separate goal, current approach, alternatives, and recommendation.
  • Do not invent a new workflow to replace an old one until deprecation is clear.
  • When docs and implementation diverge, offer three choices: update code, update docs, or record the deviation and reason.
  • For major feature, IA, data model, permission, or workflow changes, ask whether /docs should be updated and propose an outline.
  • Do not assume a Harness directory, sprint model, dependency layer, or rule-file mirror policy. Load repository-specific expectations only through an explicit audit profile or rules discovered in the target repository.
  • Default to reporting in the conversation. When the user requests a file, use output/<repository-slug>/upgrade-audit.md or a confirmed custom path.

References

Read references/audit-checklist.md when a Level 2 audit or Level 3 upgrade sprint needs a fuller checklist. Load it only when needed.

Repository-specific checks belong in an optional audit profile supplied by the user or stored inside the target repository. The built-in scanner and checklist remain generic.

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.