naming-refactor
БесплатноЗапускает вложенные скриптыНе проверенRefactor naming and repository structure exhaustively while preserving behavior and external contracts.
от PaulRBerg★ 109 звёзд на GitHubОб этом скилле
Naming Refactor
If a slash or dollar invocation already added these instructions to the conversation, follow them directly. In that case, do not invoke this skill again through a skill tool.
Make every name in the current repository communicate one coherent domain model, regardless of refactor cost.
Contract
- Cover the complete current Git repository. Do not narrow the run to selected files or stop after a candidate cap.
- Preserve features, runtime behavior, side effects, performance-sensitive characteristics, and externally consumed contracts. Large diffs, path moves, and repository-controlled interface migrations are allowed.
- Treat an exported surface as repository-controlled only when every consumer is in scope and can migrate atomically. Preserve other API names, CLI flags, environment variables, configuration keys, wire fields, routes, database names, and import paths unless the user explicitly authorizes a breaking migration.
- Fix a bug discovered during the refactor only when the defect and intended behavior are clear and a regression check can prove the fix. Keep bug fixes in a distinct change wave and report them separately.
- Preserve pre-existing work. Local edits, file moves, directory restructuring, and non-destructive validation are authorized. Do not commit, push, publish, or write externally unless the user or repository instructions require it.
- Serialize implementation and verification against intersecting repository writes. Complete codebase analysis and the refactor plan first, then claim the cumulative write set before each wave as defined under Acquire the Implementation Scope.
- A verified no-op is valid only after exhaustive coverage. Do not rename a clear, conventional name merely to create churn, but do not retain a weak name to minimize diff size.
Coverage Ledger
Resolve scripts/naming-ledger.py relative to this SKILL.md and create its ledger outside the repository:
uv run "<skill-dir>/scripts/naming-ledger.py" init --root <repo> --ledger <scratch.json>
The helper maps every tracked and non-ignored untracked path and records pre-existing worktree state. Account for a path only after inspecting its name, relevant contents, and role:
uv run "<skill-dir>/scripts/naming-ledger.py" mark \
--ledger <scratch.json> --status <pending|retained|renamed|excluded|blocked> \
--path <path> [--path <path>...] [--reason <text>]
Use retained when the current name is justified, renamed when the path or its contents joined a verified rename,
excluded for generated, vendored, binary, or bulk artifacts validated through their source or invariant, and blocked
when behavior or contract safety cannot be established. excluded and blocked require reasons.
For delegated runs, have each subagent write a dispositions TSV outside the repository with one record per line:
status<TAB>repo-relative-path<TAB>reason. Concurrent mark and refresh calls serialize on a sidecar
<scratch.json>.lock. From the coordinating session, apply each file in one batch:
uv run "<skill-dir>/scripts/naming-ledger.py" mark \
--ledger <scratch.json> --from-file <dispositions.tsv>
A subagent reports a planned but unverified rename as pending. After the wave is verified, apply its file with
--pending-as renamed (or another final status) instead of rewriting the TSV. Reasons remain unchanged, and excluded
or blocked still require one.
Dispositions paths are relative to the repository root and must match ledger entries exactly. The ledger maps only
tracked and non-ignored untracked files. Gitignored artifacts, cache files, and bare directories are never ledger paths.
Unknown paths fail the batch closed. Rerun with --skip-unknown only after reviewing the reported paths and confirming
that every skip is intentional, then verify the result's skipped list.
uv run "<skill-dir>/scripts/naming-ledger.py" pending --ledger <scratch.json> [--limit <n>]
uv run "<skill-dir>/scripts/naming-ledger.py" refresh --ledger <scratch.json>
uv run "<skill-dir>/scripts/naming-ledger.py" summary --ledger <scratch.json>
Refresh after path moves and before final validation. New paths become pending. A removed retained path returns to
pending. Removed paths remain in the ledger and must be accounted as renamed, excluded, or blocked. The run is complete
only when the helper reports no pending or blocked paths.
Ground the Refactor
- Read applicable repository instructions. Record the repository root, starting commit and status, build and check commands, generated sources, and ownership boundary for pre-existing changes.
- Initialize the ledger and establish baseline format, lint, type, test, build, codegen, API-snapshot, or smoke checks appropriate to the repository. Attribute existing failures before editing.
- Identify external contracts, repository-controlled consumers, reflection and serialization surfaces, dynamic imports,
Установить naming-refactor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл naming-refactor?
Refactor naming and repository structure exhaustively while preserving behavior and external contracts.
Как установить скилл naming-refactor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл naming-refactor запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic