Generate File Name Gate
Emit a standalone bash file-name gate checker + test suite (inlined rule, roots, exemptions; --rule; no overwrite without --force; unwired steps). Use when…
от melodic-software★ 34 звезды на GitHub
Установить Generate File Name Gate в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Generate File Name Gate
Purpose
A naming rule that nothing enforces decays back into a mixed tree, one file at a time. This skill writes the thing that enforces it: a checker over the tracked set, plus the suite that proves the checker still means what it says.
The checker is the consumer's file, not this plugin's. The rule, the roots, and every exemption are inlined at emission, so a checkout with the plugin uninstalled, or a CI runner that never had it, still enforces what the team agreed.
The gate is the deliverable. Whether a path-scoped rule file should also carry
the naming rule is a separate choice: when /corrections:codify (if enabled) is among the
available skills, hand it the choice of mechanism; it picks the strongest rung
of the enforcement ladder that can decide the rule and proves the check. Name
the call, /corrections:codify "<the naming rule>" (if enabled), for the operator to run;
never make it. When the corrections plugin is not enabled, propose the strongest mechanism that can decide the
rule: a change that makes the mistake impossible first, then a check that blocks
it, then a test, and an instruction only when nothing a machine runs can decide
it. Say that the corrections plugin was not available, so the proposal is
unproven.
- Pointer: when weighing whether a rule could stand in for the gate, fetch memory § Path-specific rules live.
Emit
${CLAUDE_SKILL_DIR}/scripts/emit-gate.sh --root <repo> --user-config '<option>' [--out-dir <dir>] [--rule] [--force]
--user-configtakes this plugin'sfile_namesoption,${user_config.file_names}, on every call, as one single-quoted argument (escape any single quote in it). An empty value or the literal${user_config.…}placeholder means unset. Pointer: when checking where a saved option value reaches, fetch plugins manifest reference § Reference a saved value live.--out-dirplaces the pair somewhere other thanscripts/. The emitted checker resolves the repository from its own location, so any depth works.--rulealso writes.claude/rules/file-names.md.--forceoverwrites. Without it an existing target refuses the run and nothing is written, including the files that did not exist yet.
The output is EMITTED rows for what it wrote, possibly a REINDEX row, and
NOT-WIRED rows for what it did not. Report all three kinds; the NOT-WIRED
rows are the point of the run as much as the files are.
What the templates render
| Template | Emitted as | Carries |
|---|---|---|
templates/check-file-names.sh.tmpl |
<out-dir>/check-file-names.sh |
the rule, the roots, the exemptions, and the case-collision pass |
templates/check-file-names.test.sh.tmpl |
<out-dir>/check-file-names.test.sh |
one case per declared exemption, seeded with a name the rule would reject |
templates/file-names-rule.md.tmpl |
.claude/rules/file-names.md, only with --rule |
the rule in prose, scoped to the roots, naming the gate |
Read a template only when a rendered file looks wrong; the emitted files are what the operator reviews.
After emitting, say what is left
Emission writes files. It does not wire them, because each of these is a repository-shaped decision with no single right answer:
- A CI step invoking the checker. Name the emitted path and let the operator place it in their own workflow.
- A registry row, if the repository keeps a list of its gates.
- An architecture decision record for the rule itself. Offer
/architecture:adr(if enabled); do not write one unprompted.
If a REINDEX row appeared, the repository's AGENTS.md or CLAUDE.md carries
a generated instruction-placement rules index, and the new rule file is not in
it yet. Say so and name /instruction-placement:check (if enabled); do not edit the block.
Verify before handing back
Run the emitted pair once, from the consumer's root:
bash <out-dir>/check-file-names.sh --check
bash <out-dir>/check-file-names.test.sh
The checker's exit is the answer about the tree, not about the emission: a 1
here means the repository already has offenders, which is a finding to report
and route to /docs-naming:audit-file-names, not a failed run.
Completion criteria
The run is done when the EMITTED rows name files that exist, the emitted suite
exits 0, the checker has been run once and its verdict reported, and every
NOT-WIRED row has been said out loud to the operator.
What this skill does NOT do
- Wire the gate into CI, a registry, or a decision record. It names each one and stops.
- Edit a generated rules index. It reports that one needs re-rendering.
- Rename anything. An existin
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
- 01
Bash(${CLAUDE_SKILL_DIR}/scripts/emit-gate.sh:*) - 02
Bash(git rev-parse:*) - 03
Bash(git status --porcelain:*) - 04
Read
Вложенные файлы
- scripts/emit-gate.sh
- scripts/emit-gate.test.sh
- templates/check-file-names.sh.tmpl
- templates/check-file-names.test.sh.tmpl
- templates/file-names-rule.md.tmpl
FAQ
Что делает скилл Generate File Name Gate?
Emit a standalone bash file-name gate checker + test suite (inlined rule, roots, exemptions; --rule; no overwrite without --force; unwired steps). Use when: 'generate the file-name gate', 'add a CI check for doc filenames', 'enforce the naming rule'. Not for auditing: /docs-naming:audit-file-names; renaming: /docs-naming:realign-file-names.
Как установить скилл Generate File Name Gate?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Generate File Name Gate запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis 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…