Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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 files
  • src/**/* — everything under src/
  • {src,lib}/**/*.ts — multiple directories
  • Omit paths entirely 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), без исполняемых скриптов.

Похожие скиллы

Сравнить rules-authoring с