agentleFS
UnfoldCRO-OrganizationUnfoldCRO-Organization/cro-agent-skills/skills/context-audit/SKILL.md

context-audit

Skill0 starsChanged 22 days agoMITView on GitHub

Audit Claude Code configuration for oversized startup context, unnecessary imports, duplicated rules, duplicated workflows and incorrectly loaded capability information.

20 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use skillify, refactor and 1 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.
  • MicrosoftSkill

    skillify

    Capture a repeatable process from the current session into a reusable Amplifier SKILL.md skill file. Use when the user wants to create a skill, save a workflow as a skill, turn a process into a reusable skill, or mentions "skillify", "create skill", "make a skill", "save as skill", "capture workflow", "turn this into a skill", "new skill", or wants to automate a repeatable process they just performed.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 3 projects that use this

  • MicrosoftSkill

    handoff

    Compact the current conversation into a handoff document for another agent to pick up.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

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

  • 0

    Common

    Most of the 20 edited versions we read keep these.

  • 4

    Distinctive

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not invoke agents, MCP servers, plugins, external packs or gstack.

    line 17
  2. Distinctive:

    Do not bulk-read installed skill bodies.

    line 18
  3. Distinctive:

    Do not modify application source code.

    line 19
  4. Distinctive:

    Do not deploy, push, tag, release, merge or commit.

    line 20
  5. Very specific:

    No empty / placeholder slots.

    line 44
  6. Very specific:

    No legacy files left beside a map (rule.md, context.md, tasks.md, memory.md, agent.md, root DESIGN.md, docs/deploy.md, docs/changelog.md…).

    line 45
  7. Very specific:

    No secret patterns in tracked docs.

    line 47
  8. Very specific:

    Do not flag a missing slot that is marked unwritten or does not apply to the type.

    line 49

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

Audit Claude Code Context Usage

Target: $ARGUMENTS

Objective

Identify unnecessary startup context and duplicated configuration while preserving useful instructions and safety rules.

Restrictions

  • Do not invoke agents, MCP servers, plugins, external packs or gstack.
  • Do not bulk-read installed skill bodies.
  • Do not modify application source code.
  • Do not deploy, push, tag, release, merge or commit.

Audit Checks

Global Startup Context

  • Count lines in ~/.claude/CLAUDE.md (target: 35–55 lines).
  • Identify imports loading large files at startup (any @file references).
  • Identify capability inventories incorrectly stored in startup context.
  • Identify workflow procedures that should live in skills.
  • Confirm cross-project data rule and deployment approval rule remain concise.
  • Confirm "read these files on every session start" instruction is absent.

Project Startup Context

  • Count lines in project CLAUDE.md files (target: ≤70 lines, no floor).
  • Identify specifications, histories, scope records, proposal text, task logs, changelogs, deploy processes or duplicated global rules stored in startup files.
  • Identify imported detailed documents (@spec.md, @DESIGN.md, etc.).

Project Docs Standard (~/.claude/references/project-docs-standard.md)

  • Fleet view: which projects are v2 (the index — CLAUDE.md, or .claude/CLAUDE.md in a repo with a remote — has ## Docs map) and which are legacy.
  • v2 projects (or run python3 -I ~/.claude/skills/setup-project-context/scripts/docsmig.py audit <project>):
    • Docs map rows match the files on disk and the project type (unwritten = absent, +local = .local.md present).
    • No empty / placeholder slots; no slot over 300 lines without a docs/ref/ split.
    • No legacy files left beside a map (rule.md, context.md, tasks.md, memory.md, agent.md, root DESIGN.md, docs/deploy.md, docs/changelog.md…).
    • *.local.md ignored and untracked; repos with a remote track no project docs (CLAUDE*.md, AGENTS*.md, docs/NN-*, docs/ref/, .claude/skills/) — docsmig.py audit checks this.
    • No secret patterns in tracked docs; deploy excludes listed in 16-DEPLOYMENT.md when the project root is uploaded.
    • Project skills that touch live systems set disable-model-invocation: true.
  • Do not flag a missing slot that is marked unwritten or does not apply to the type.

Rules

  • Identify duplicated rules between global and project files.
  • Identify path-specific rules suitable for .claude/rules/.
  • Identify universal rules that must remain always available.

Capabilities and Agents

  • Identify custom workflows duplicating existing approved workflows.
  • Identify project skills duplicating global custom skills.
  • Identify capability registry entries that do not affect actual work.
  • Confirm agent.md is on-demand only (not imported at session start).
  • Confirm complexity 80+ requires two independent reviews.
  • Confirm external cleanup inventory is not inside startup context.

Data and Deployment Safety

  • Confirm cross-project data policy reference exists in CLAUDE.md.
  • Confirm deploy policy prevents push, tag, release or deployment without approval.
  • Confirm major release tag rule exists.

Required Output Format

Startup Context Issues:
- <file>: <issue>

Duplicate Content:
- <file or location>: <duplicate>

Documentation Split Issues:
- <project or file>: <issue>

Capability Routing Issues:
- <issue or None>

Safety Issues:
- <issue or None>

Recommended or Applied Changes:
- <change>

Validation:
- Global CLAUDE.md lines: <count>
- Project CLAUDE.md files above target (70 lines): <count>
- Projects on docs v2 / legacy: <count> / <count>
- Large startup imports found: <yes/no>
- Full capability inventory stored in startup context: <yes/no>
- Cross-project data rule present: <yes/no>
- Deployment approval rule present: <yes/no>
- Agent routing kept on demand: <yes/no>
- Application source modified: No
- Production actions performed: No

Git Summary:
- Modified configuration or Markdown files: <file paths>
- Commit created: No
- Push performed: No

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.