intense-visions/harness-engineering/naming-craft
Claude Code and agent skill by intense-visions/harness-engineering
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install intense-visions/harness-engineering/naming-craftSKILL.md
The same SKILL.md was published earlier as intense-visions/harness-engineering/naming-craft.
Naming Craft
LLM-judgment skill that critiques identifier names — variables, functions, types, and files — for clarity, concreteness, weight, and predictive power. First member of the craft-pipeline initiative. Uses a curated rubric catalog seeded from Martin / Beck / Karlton. Emits 3-axis findings (tier × impact × confidence per ADR 0019).
When to Use
- During PR review on code that adds or renames identifiers
- When onboarding a new contributor (audit names they introduced)
- When refactoring a module (verify renamed names earn their letters)
- As the cross-cutting naming critic for other craft skills (docs-craft, test-craft, code-craft will call into this)
- NOT for code-convention enforcement (use ESLint rules — this is ceiling, those are floor)
- NOT for autofix / rename codemod (this is judgment-only; the v2 sibling
align-namingships the fix path) - NOT for module / branch / commit-subject naming (v1.x — different infrastructure)
- NOT for languages beyond TS/JS in v1 (Python/Go/Rust idiom catalogs are v1.x)
Capability Roles
<!-- Capability seam: this skill participates in a real extension point whose three roles are named and concrete. A seam with only one role filled is accidental single-implementation lock-in. See harness-skill-authoring Phase 1C. -->
- Defines (Service Definition): the shared craft critique contract (
packages/cli/src/shared/craft/) —LlmProvider+ finding/axes schema + run store — shared across all*-craftskills. This skill implements, and does not own, that contract. - Provides (Provider): this skill — a identifier-naming critique implemented over the shared contract (
packages/cli/src/naming-craft/). - Consumes (Consumer):
craft-fleet(the craft-pipeline elevation sweep) and theharnessnatural-language router, which invoke every*-craftprovider uniformly through the shared critique/finding shape
Process
Phase 1: EXTRACT — Identifier walk
- Read project configuration. Check
harness.config.jsonfor:
craft.naming.enabled— gate (defaulttrue)craft.naming.maxFiles— file count cap (default 100)craft.naming.maxIdentifiersPerFile— per-file sampling cap (default 15)
- Walk project files (.ts / .tsx / .js / .jsx). Skip
node_modules,dist,build,coverage, dotdirs.
- Extract identifiers per file via TS Compiler API:
- variable —
const x =,let x =, destructuring binders - function —
function x(),const x = () =>, class methods, arrow functions assigned to a name - type —
type X,interface X,class X - For each: capture file, line, exported status, scope size (
short= body ≤10 lines;long= otherwise), and ±2 context lines for LLM prompt construction.
Phase 2: SAMPLE — Convention inference
For each identifier kind, sample up to N=500 identifiers across the project and infer the dominant convention via majority-rule:
- variables / functions — camelCase / snake_case / PascalCase
- types — PascalCase / camelCase
- files — kebab-case / camelCase / PascalCase (basenames sans extension)
>50% majority threshold per kind. Below threshold → null (no dominant convention) and the convention-conformance rubric silently skips.
Phase 3: CRITIQUE — Per-rubric LLM loop
For each file:
- Sample identifiers weighted by importance:
- Exported identifiers first
- Then long-scope (file-level, methods on long classes)
- Then short-scope random fill
- Cap at
maxIdentifiersPerFileper file (default 15).
- For each (identifier, rubric) in the cross-product:
- Build a prompt with rubric description + identifier + context lines + project convention.
- LLM returns fenced JSON: either
null(rubric doesn't apply / name is fine) or{ tier, impact, confidence, message }. - On non-null: emit a
NamingFindingwithcite.rubricIdpopulated for ADR 0020 traceability.
- v1 rubric catalog (6 seed rubrics):
NAME-R001predictive power (Martin) — does the name predict the contract?NAME-R002concreteness (Martin / Beck) — concrete > vagueNAME-R003verb/noun honesty (Beck) — verb for functions; noun for types; questions for booleansNAME-R004convention conformance (Karlton) — matches project conventionNAME-R005scope match (Beck) — length proportional to scopeNAME-R006encoded measure (Pragmatic Programmer) — silent units cause real bugs
Phase 4: REPORT — Aggregate + cost telemetry
Emit NamingCraftOutput:
Harness Integration
- `harness naming-craft` — CLI entry.
--files <glob>/--kinds <variable|function|type|file>/--max-files <n>/--max-identifiers-per-file <n>/--json/--verbose. - `mcp__harness__naming_craft` — MCP tool. Two modes (see "In-session flow" below).
- `mcp__harness__naming_craft_finalize` — MCP tool that completes the in-session flow.
- Cross-cutting API:
critiqueNamesInFile(file, opts)exported frompackages/cli/src/naming-craft/index.ts. Future craft skills (docs-craft, test-craft, code-craft) import and invoke this when they want naming critique on a file they're already processing — no project re-walk needed. - LLM provider: configured in
harness.config.json. The shared selector inpackages/cli/src/shared/craft/llm/provider.tsreads two blocks: - `agent.backends` — named backend definitions, shared with the orchestrator. Supported types:
claude,anthropic,openai,local,pi,mock. (localandpiare OpenAI-compatible — point them at Ollama / LM Studio / vLLM / LiteLLM / any compliant server.) - `craft.llm` — either
{ "backend": "<name>" }to route through one of the entries above, or{ "mode": "in-session" | "mock" }for the non-backend modes. Default when nothing is set:in-session(host chat answers prompts via the two-step MCP flow). - `HARNESS_CRAFT_LLM` env var overrides the file. Accepts
in-session,mock, or the name of any entry inagent.backends.
Migration from harness.orchestrator.md
If you already declared agent.backends in harness.orchestrator.md, the craft selector reads from it as a fallback and emits a one-time warning on first run. Run harness migrate backends (preview with --dry-run) to copy the entries into harness.config.json so both files share a single source of truth.
Example
Example config snippet for routing craft skills to a local Ollama:
Invoked as a review hook
naming-craft auto-activates as an advisory review hook whenever a diff touches the surface it owns — harness-autopilot at after:REVIEW / after:FINAL_REVIEW, and harness-code-review at after:mechanical. The domain table is CRAFT_REVIEW_DOMAINS and the per-host events are CRAFT_REVIEW_EVENTS_BY_HOST, both in packages/core/src/hooks/craft-review-hooks.ts. The host forwards the subset of the diff this domain owns:
- `files` — this domain's owned subset of the changed files, as ABSOLUTE paths. The host
reads it from plan.files["naming-craft"], which holds repo-relative POSIX paths, and resolves each entry against the project root before calling mcp__harness__naming_craft. Absolute is the recommended form, not a correctness requirement for this domain: its collector resolves a relative entry against the tool's path (never the process CWD), so a repo-relative entry forwarded unresolved still reads the in-diff file (pinned by packages/cli/tests/shared/craft/relative-files-scope.test.ts). Only mcp__harness__design_craft still requires absolute paths.
- `promptBudget` — accepted; raises the prompt ceiling for the forwarded scope when the diff subset is large.
Findings from a hook-triggered run are advisory: reported, never blocking, never counted toward review severity, and never entered into a host's mechanical exclusion set. A hook-triggered run that fails is a missing opinion, not a broken gate.
In-session flow (default)
When HARNESS_CRAFT_LLM is unset (or set to in-session), the MCP tool does not call any LLM. Instead it returns a list of prompts for the calling agent to answer with its own model. This is a two-step protocol:
Step 1 — `mcp__harness__naming_craft({ path, ... })` returns:
If projection.promptCount > budget, status is "budget-exceeded" and pendingPrompts is empty — re-invoke with smaller maxFiles / maxIdentifiersPerFile, or pass promptBudget to raise the ceiling.
Step 2 — for each pending prompt, generate the fenced-JSON response as if you were a senior engineer applying the rubric to the identifier. The required response shape (per prompt) is:
null
if the rubric does not apply or the name is fine, OR:
{ "tier": "foundational|polish|aspirational", "impact": "small|medium|large", "confidence": "high|medium|low", "message": "<critique with suggested rename when possible>" }
Step 3 — `mcp__harness__naming_craft_finalize({ path, runId, responses: [{ promptId, raw }, ...] })` parses the responses, applies the same validation the inline path uses, and returns the standard NamingCraftOutput.
If you want the inline behavior (skill calls an LLM directly), pass mode: 'inline' to step 1 and set HARNESS_CRAFT_LLM to a non-in-session provider.
Success Criteria
See docs/changes/craft-pipeline/naming-craft/proposal.md for the full 34 success criteria. Highlights:
- 6 seed rubrics ship in
catalog/rubrics/<id>.ts(file-per-rubric matches design-craft pattern) - 3-axis output preserved (tier × impact × confidence, never collapsed) per ADR 0019
cite.rubricIdpopulated on every finding per ADR 0020- Convention sampler returns
nullwhen no dominant convention (>50% threshold) - Cross-cutting
critiqueNamesInFileAPI exported for future craft skills - LlmProvider / MockLlmProvider IMPORTED from design-craft (no duplication)
- MCP tool count bumps (running total maintained by parallel PRs)
Rationalizations to Reject
These are common rationalizations that sound reasonable but lead to incorrect results. When you catch yourself thinking any of these, stop and follow the documented process instead.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 78 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingagents/skills/cursor/naming-craft/SKILL.md
Popularity
- Repository stars
- 18
- Repository forks
- 11
- 7-day trend score
- 15
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/intense-visions/harness-engineering/naming-craft)