rules-authoring
БесплатноБез исполняемых скриптовНе проверенGuide to writing .claude/rules/*.md files — auto-applied constraints scoped by file patterns. Use when creating or updating rules for code conventions…
от crouton-labs★ 25 звёзд на GitHubОб этом скилле
Writing Rules
Rules are constraints Claude follows automatically when working with matching files. They live in .claude/rules/ or a plugin's rules/ directory.
Structure
---
paths:
- "src/api/**/*.ts"
- "**/*.test.ts"
---
Declarative constraints here.
Path Patterns
**/*.ts— all TypeScript filessrc/**/*— everything under src/{src,lib}/**/*.ts— multiple directories- Omit
pathsentirely for rules that apply everywhere
Rules without paths load every session. Rules with paths only load when Claude works with matching files.
Writing Constraints
Be declarative — state what should/shouldn't be done, not step-by-step procedures.
Be specific — "Use 2-space indentation" not "format properly."
Skip the obvious — don't restate best practices Claude already knows. Only specify what's unique to your project.
One topic per file — testing.md, security.md, not everything.md. Organize with subdirectories for grouping.
Provide alternatives — never write "Don't do X" without saying what to do instead.
When to Use Rules vs Other Tools
- Rules: File-type-specific conventions that are advisory (Claude should follow but there's no hard enforcement)
- CLAUDE.md: Universal project context loaded every session
- Hooks: Must be enforced deterministically — cannot be ignored
- Skills: Reference material loaded on-demand, not automatically
Anti-Patterns
- Procedural instructions (use commands or skills instead)
- Rules that apply to every file type (use CLAUDE.md or omit
paths) - Duplicating CLAUDE.md content
- Over-broad path patterns that match unrelated files
- Rules longer than ~30 lines (split into multiple files or use a skill)
Установить rules-authoring в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл rules-authoring?
Guide to writing .claude/rules/*.md files — auto-applied constraints scoped by file patterns. Use when creating or updating rules for code conventions, quality standards, or file-specific guidance.
Как установить скилл rules-authoring?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rules-authoring запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision…
от Anthropicacademy-guide
Stop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials…
от Anthropicinternal-comms
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill…
от Anthropicskill-development
This skill should be used when the user wants to "create a skill", "add a skill to plugin", "write a new skill", "improve skill description", "organize skill…
от Anthropic