mcpbeat Sign in

Refactor Claude MD Skill for Claude

Use when refactoring a user-level or project-level CLAUDE.md for progressive disclosure

853 tokens
context cost
the whole folder, loaded on every use
1
files
instructions only
0
copies elsewhere
how many repositories repackaged it
123
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/vinta/hal-9000 --skill refactor-claude-md

What it tells the agent to use

found in the instruction text
WebFetch fetches pages from the network

The instruction itself

2 sections, as written by the author

Overview

Refactor a CLAUDE.md toward progressive disclosure. Every line it keeps is loaded into every session the file covers, and a frontier model follows only around 150 to 200 standing instructions consistently, so each line competes for that budget. Everything else moves down the ladder or out of the file.

Instructions

  • Pick the target. If the invocation names one, use it. Otherwise ask with AskUserQuestion, one option per file that exists, with the resolved path in the label:
  • The user-level CLAUDE.md at ~/.claude/CLAUDE.md
  • The current project's CLAUDE.md
  • Fetch the yardsticks. Fetch these pages. They calibrate the delete and rewrite verdicts below:
  • https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
  • https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5
  • https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5
  • https://www.aihero.dev/a-complete-guide-to-agents-md
  • Audit. Read the file and give every instruction exactly one verdict, judged against the target's bar below. Done when no instruction lacks one.
  • contradiction: conflicts with another instruction. Record both sides.
  • delete: fails the no-op test, meaning the agent would behave the same without it. Covers instructions the agent already follows by default, instructions too vague to act on, and platitudes like "write clean code".
  • demote: real instruction that only applies to some paths or tasks. Pick its destination from the bar. If it describes a multi-step workflow, propose a skill instead. Name the destination in the sign-off.
  • rewrite: right meaning, phrasing falls short of the fetched best practices.
  • keep: earns its always-loaded cost as written.

The bar per target:

  • User-level (loaded into every session in every project): a keep must apply across all projects. Demote destination: a paths:-scoped file in ~/.claude/rules/.
  • Project-level (loaded into every session in this project): a keep must be underivable from the code: a one-sentence project description, commands the agent would guess wrong, domain concepts, gotchas. Lines restating what the code already shows, and volatile detail like file trees, are deletes because they go stale and stale lines poison the context. Demote destinations: a paths:-scoped file in .claude/rules/, or a doc file linked from CLAUDE.md.
  • Get decisions. One AskUserQuestion per contradiction, with each conflicting version as an option. Then present the delete and demote lists for sign-off. The file stays untouched until sign-off.
  • Rewrite. Apply the signed-off verdicts in one pass. When creating a new rules file, fetch https://code.claude.com/docs/en/memory#path-specific-rules for the paths: frontmatter syntax. Done when every audited instruction landed where its verdict says: kept, rewritten, demoted, or deleted.

Other skills for the same job

different authors, same section of the catalogue
Receiving Code Review
by ZhanlinCui
×7

Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation

2k tokens
Requesting Code Review
by ZhanlinCui
×6

Use when completing tasks, implementing major features, or before merging to verify work meets requirements

2k tokens
Git Commit
by github
vendor ×3

Execute git commit with conventional commit message analysis, intelligent staging, and message generation. Use when user asks to commit changes, create a git commit, or mentions "/commit". Supports: (1) Auto-detecting type and scope from changes, (2) Generating conventional commit messages from diff, (3) Interactive commit with optional type/scope/description overrides, (4) Intelligent file staging for logical grouping

799 tokens
Github Code Review
by ComeOnOliver
×3

Comprehensive GitHub code review with AI-powered swarm coordination

13k tokens
Karpathy Guidelines
by hyyhf
×3

Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid overcomplication, make surgical changes, surface assumptions, and define verifiable success criteria.

629 tokens
Code Reviewer
by google-gemini
vendor ×2

Use this skill to review code. It supports both local changes (staged or working tree) and remote Pull Requests (by ID or URL). It focuses on correctness, maintainability, and adherence to project standards.

795 tokens
Agent MD Refactor
by softaworks
×2

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

4k tokens
Commit Work
by softaworks
×2

Create high-quality git commits: review/stage intended changes, split into logical commits, and write clear commit messages (including Conventional Commits). Use when the user asks to commit, craft a commit message, stage changes, or split work into multiple commits.

2k tokens

How to use it

Copy the folder

Take vinta/refactor-claude-md from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.