precedent
Conform work to the precedent a project already sets: naming, API shape, error handling, test style, document structure, and terminology. Use when the user…
от Integralist★ 31 звезда на GitHub
Установить precedent в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Match the work to patterns established by the surrounding project. Precedent
comes from peer files, not personal preference or a style guide; without a
cited sibling, a finding is an invention. Explicit conventions outrank
emergent precedent, so defer where a guide answers the question:
conventions-go,
conventions-markdown,
conventions-mermaid,
conventions-python,
conventions-sql, and the project's
GLOSSARY.md for domain terms. If there is only a legacy CONTEXT.md, use
it and warn with ⚠️ that it should be renamed to GLOSSARY.md. This skill
owns the patterns a codebase grew that no guide records.
Scope. --target=<path|glob> audits those files. --uncommitted, or
"what I'm working on", means files listed by git status --porcelain. With no
target, ask which path to check.
- Find peers for every file. Look for files doing the same job: package siblings, other implementations of an interface, tests of the same shape, or documents at the same level. Two peers can establish a pattern; one may be coincidence, so widen the search after finding one. If a file has no peers, record that it has nothing to conform to and move on.
- Compare applicable patterns. Compare every file with its peers.
Consider:
- Code: identifier, file, test, and package naming; API shape (signatures, return types, receivers, constructors, options); error wrapping, sentinels, and where errors surface; logger, levels, keys, and spans; file placement and package layout; test style, helpers, fixtures, assertions, case names; and existing libraries for the job.
- Documents: section names, order, and heading depth; expected sections; frontmatter fields and value style; table, list, or prose for similar content; and the words, person, and mood used by the glossary and neighbouring documents.
- Report before changing anything. Rank findings by blast radius: patterns other code will copy first, one-off cosmetics last. Each finding must state the divergence, the precedent, and cite at least two peers. If the target is better, say so and offer the inverse—changing the project to match—plus the cost in call sites moved. Conformance is the default; the goal is one pattern.
- Apply with the user, one finding at a time. The user accepts, skips, or inverts each finding. Apply an accepted fix before moving to the next, so each edit stays steerable.
Large paths. Read-only peer-finding on a large path may be delegated to subagents on the cheapest adequate tier. Follow SUBAGENT-STEERABILITY.md, including its completion and retry protocol. Report and apply in the main thread.
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл precedent?
Conform work to the precedent a project already sets: naming, API shape, error handling, test style, document structure, and terminology. Use when the user asks whether a change fits the codebase, or another skill needs to judge project conformance.
Как установить скилл precedent?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл precedent запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
AnthropicUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
xlsx
AnthropicUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
pptx
AnthropicUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…