agentleFS
Sagargupta16Sagargupta16/agent-brain/skills/harness-audit/SKILL.md

harness-audit

Skill2 starsChanged 12 days agoMITView on GitHub

Audit the local Claude Code setup end to end and report before changing anything. Plugins installed vs enabled, MCP servers configured vs connected vs unauthenticated, skills installed vs actually invoked (counted from the transcripts), duplicate tool servers, hooks and whether any mirrored hook copies are byte-identical, brain index vs files, settings model vs the model actually running. Use when the user says "analyze my complete local claude setup", "list all plugins", "see all our skills that we use", "which skills we use", "dirty setup", "consolidate", "I installed some plugin, see and list all", or "why so many / commands". Read-only by default; every proposed change is stated as "X from A to B because C" and applied only on "do it", and it never removes plugins from a marketplace the user publishes or reads .credentials.json.

  • Reads credentials

22 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use project-init, autopilot and 3 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.
  • u9401066Skill

    project-init

    Initialize new projects using this template. Triggers: init, new, 新專案, 初始化, create project, 建立專案, bootstrap, scaffold project.

    Also in 3 projects that use this

  • ibahgatSkill

    autopilot

    Run autonomous multi-stage execution loops until acceptance criteria pass or blockers are reached.

    Also in 3 projects that use this

  • Microsoft AzureSkill

    test

    Also in 3 projects that use this

  • nicolasestremSkill

    brainstorm

    Structured idea generation and solution exploration with systematic analysis.

    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 3 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 18 edited versions we read keep these.

  • 2

    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. Very specific:

    Never read ~/.claude/.credentials.json, .env*, or print any header, key or token value from any config file.

    line 95
  2. Distinctive:

    Never uninstall or remove a plugin from a marketplace the user publishes.

    line 97
  3. Very specific:

    Never change model, effortLevel, alwaysThinkingEnabled or permission rules as part of an audit.

    line 99
  4. Very specific:

    Never edit settings.json without a dated backup and a JSON validity check.

    line 101
  5. Distinctive:

    Never treat a low invocation count alone as grounds to remove a skill.

    line 102

“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

harness-audit

Harness configuration tends to follow an install, forget, purge, reinstall cycle: "remove all mcp or plugin that need auth and are not authed", "I see a lot of / commands and unnecessary stuff, dirty setup", "disable never used and fix dupes". A typical audit finds a burst of plugins installed in a few minutes adding a hundred skill descriptions to every session, most user skills never invoked, and the same MCP server loaded twice. This skill makes that audit repeatable so the cycle stops.

Read first

  • Prior harness decisions in the brain: brain recall harness, brain recall plugin, brain recall mcp (what was already decided and why; do not re-litigate)
  • Any note on marketplaces you publish: never remove plugins from your own public marketplace because you do not use them locally
  • ~/.claude/CLAUDE.md and the workspace CLAUDE.md Skills and Hooks sections (the documented state to diff against)

Sources

LayerWhere the truth is
Plugins~/.claude/plugins/installed_plugins.json (installed, with installedAt), ~/.claude/settings.json enabledPlugins (true/false), ~/.claude/plugins/known_marketplaces.json
MCP servers~/.claude.json mcpServers (global) and .projects[<cwd>].mcpServers; plugin-provided servers under ~/.claude/plugins/cache/*/*/.mcp.json; live state from the session listing (connected, connecting, auth required, failed)
Skills~/.claude/skills/*/SKILL.md (user), plugin skills in the cache, any retired-skills archive dir you keep, and the skills section of each CLAUDE.md
Invocations~/.claude/projects/*/*.jsonl: count "name":"Skill" tool uses by skill, and Base directory for this skill: user turns; both undercount, report both
Hooksjq '.hooks' ~/.claude/settings.json; scripts in ~/.claude/hooks/; if you keep a checked-in source copy of the hooks elsewhere, the two copies must be byte-identical (md5sum)
Rules and memory~/.claude/rules/*.md; $AGENT_BRAIN_DIR/INDEX.md (default ~/.agent-brain) pointer lines vs files on disk; brain lint
Modelsettings.json model and availableModels vs the model named in the session's own environment

Procedure

  1. Inventory each layer into a table. Counts first, names second. Never print a token, key or header value; server names and transports only.
  2. Cross-check:
    • plugins installed but absent from enabledPlugins (state unknown), and enabled plugins whose skills were never invoked in the transcripts
    • MCP servers provided by two plugins at once (duplicate tool schemas), and servers in an auth-required or failed state for more than one session
    • skills present on disk but not in any CLAUDE.md, and skills documented in CLAUDE.md but gone from disk with no archived copy
    • hook scripts that differ between mirrored locations, or hook events with no script
    • INDEX.md pointer count vs brain file count (brain lint reports both)
    • skills whose description is longer than 700 chars (each description loads into every session)
  3. Rank findings: duplicate servers and dead auth first (they cost every session), then never-invoked plugins by skill count, then documentation drift, then cosmetic.
  4. Propose, do not apply: for each finding one line X from A to B because C. Disabling a plugin means enabledPlugins[key] = false, never uninstall, never a marketplace change.
  5. On "do it": apply with jq into a temp file, validate with python -c "import json; json.load(...)", back up settings.json first, then diff key counts before and after. Re-run step 1 and show the delta.

Output

| layer | count | notes |
| plugins installed / enabled / disabled | 60 / 26 / 34 | 12 installed within 6 minutes on <date> |
| MCP servers configured / connected / auth needed / failed | 4 / 9 / 5 / 6 | <server> provided twice |
| skills user / plugin / retired | 12 / ~105 / 14 | 7 user skills never invoked |
| hooks | 4 events, 5 scripts | all byte-identical |
| brain index | 45 / 45 | in sync |

findings, ranked:
1. <finding> -> propose: <X from A to B because C>
2. ...

invocations (all transcripts): <skill: count, ...>

Must not

  • Never read ~/.claude/.credentials.json, .env*, or print any header, key or token value from any config file.
  • Never uninstall or remove a plugin from a marketplace the user publishes; disable locally at most, and only on "do it".
  • Never change model, effortLevel, alwaysThinkingEnabled or permission rules as part of an audit; report them, the user decides.
  • Never edit settings.json without a dated backup and a JSON validity check.
  • Never treat a low invocation count alone as grounds to remove a skill; skills work through their description line too. Report the count, state the inference, let the user choose.

Non-goals

Creating or rewriting skills (a skill-authoring skill, if installed), adding hooks (update-config, if available), MCP server authoring, memory consolidation (save-session and memory-router).

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.