claude-md-refactorer
Modularize large CLAUDE.md files with path-scoped rules. Use when CLAUDE.md is too large and needs modularization.
от nimbalyst★ 29 звёзд на GitHub
Установить claude-md-refactorer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
You are helping refactor a CLAUDE.md file to reduce its size while preserving guidance through dedicated documentation files and path-scoped rules.
Process
Read and analyze the current CLAUDE.md file in its entirety
Identify extraction candidates - sections that are:
- Cross-cutting patterns (not core setup/architecture)
- Specific to certain file types or components
- Large sections with detailed patterns
- Content that would benefit from contextual loading
For each candidate section, recommend:
- Doc name: What to call the extracted file in
docs/ - Content scope: What to include in the doc
- Path-scoped rule: Glob patterns that should trigger loading this doc
- Replacement text: Brief reference to keep in CLAUDE.md
- Doc name: What to call the extracted file in
Suggest documentation table structure:
- Recommend which docs should be in the main reference table
- Provide detailed descriptions for the "Description" column
- Provide specific triggers for the "Read when..." column
Create the files in this order:
- Extract content to
docs/[NAME].md - Create
.claude/rules/[name].mdwith appropriate globs and@imports - Update CLAUDE.md to replace extracted content with brief reference
- Update the Documentation Reference table if it exists
- Extract content to
For path-scoped rules, use this format:
--- globs: - "pattern1/**/*" - "pattern2/**/*" imports: - docs/DOC_NAME.md --- Brief reminder text with 2-3 key points referencing the imported doc.
Key Principles
- Only extract sections that are specific to certain contexts (not universal patterns)
- Preserve critical info in CLAUDE.md (database rules, setup, architecture overview)
- Use meaningful glob patterns that accurately capture when guidance is needed
- Keep replacements brief - just enough to know where to look
- Documentation table entries should have 2-3 sentence descriptions and specific triggers
Good Extraction Candidates
- UI/styling patterns (CSS variables, Tailwind, responsive design)
- State management patterns (Jotai, persistence, migration safety)
- Architecture patterns for specific systems (IPC, editors, extensions)
- Testing patterns (E2E, unit test guidelines)
- Feature-specific guides (walkthroughs, dialogs, permissions)
Keep in CLAUDE.md
- Critical warnings (database access, security)
- Development setup and commands
- High-level architecture overview
- General development guidelines
- Package structure
- Release process basics
After Extraction
- Show the size reduction (old lines → new lines, percentage)
- List all files created
- Offer to commit the changes
Ask the user which CLAUDE.md file to refactor (default to ./CLAUDE.md if not specified).
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл claude-md-refactorer?
Modularize large CLAUDE.md files with path-scoped rules. Use when CLAUDE.md is too large and needs modularization.
Как установить скилл claude-md-refactorer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл claude-md-refactorer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…