Use when the user wants to create, edit, list, or manage Claude Code rules in .claude/rules/. Provides guided elicitation to configure path-specific rules with proper YAML frontmatter and glob patterns. Can list all available rules from user-level and project directories.
/plugin marketplace add rafaelcalleja/claude-market-place/plugin install rules-builder@claude-market-placeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/glob-patterns.mdschemas/rule-frontmatter.schema.jsonscripts/list_rules.pyscripts/validate_frontmatter.pytests/fixtures/invalid/invalid-values/description-too-long.mdtests/fixtures/invalid/invalid-values/priority-negative.mdtests/fixtures/invalid/invalid-values/priority-too-high.mdtests/fixtures/invalid/malformed-yaml/bad-indentation.mdtests/fixtures/invalid/malformed-yaml/unclosed-quote.mdtests/fixtures/invalid/unknown-fields/extra-field.mdtests/fixtures/invalid/unknown-fields/multiple-unknown.mdtests/fixtures/invalid/wrong-types/description-number.mdtests/fixtures/invalid/wrong-types/enabled-string.mdtests/fixtures/invalid/wrong-types/paths-number.mdtests/fixtures/invalid/wrong-types/paths-object.mdtests/fixtures/invalid/wrong-types/priority-string.mdtests/fixtures/valid/all-fields/complete.mdtests/fixtures/valid/global/empty-frontmatter.mdtests/fixtures/valid/global/no-frontmatter.mdtests/fixtures/valid/optional-fields/disabled.mdInteractive skill for creating and managing Claude Code modular rules using guided elicitation with AskUserQuestion.
.claude/rules/Use AskUserQuestion throughout the workflow to guide the user through all available options. Present relevant choices based on context and let the user shape the rule configuration step by step.
| Scope | Description |
|---|---|
| Global | Applies to all files in the project (no paths frontmatter) |
| Path-specific | Only applies to files matching glob patterns |
| Location | Path | Applies To |
|---|---|---|
| User-level | ~/.claude/rules/ | All your projects (personal preferences) |
| Project root | .claude/rules/ | Current project only |
| Subdirectory | .claude/rules/frontend/ | Current project, organized by domain |
| Subdirectory | .claude/rules/backend/ | Current project, organized by domain |
Priority: User-level rules load first, project rules load after and can override.
| Pattern | Matches |
|---|---|
**/*.ts | All TypeScript files |
**/*.{ts,tsx} | TypeScript and React files |
src/**/* | All files under src/ |
src/api/**/*.ts | API files only |
**/*.{test,spec}.ts | Test files only |
*.config.{js,ts,json} | Config files in root |
{src,lib}/**/*.ts | Multiple directories |
See ${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/references/glob-patterns.md for complete reference.
Common categories to organize rules:
Valid YAML frontmatter fields:
---
paths: "src/**/*.ts" # Glob pattern(s) - string or array
description: "API rules" # Optional description (max 200 chars)
priority: 75 # Optional priority 0-100 (default 50)
enabled: true # Optional enable/disable (default true)
---
Validate against schema: ${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/schemas/rule-frontmatter.schema.json
| Operation | Description |
|---|---|
| Create | New rule file with guided configuration |
| Edit | Modify existing rule (scope, content, frontmatter) |
| Delete | Remove a rule file |
| List | Show all rules in project or user directory |
| Validate | Check frontmatter against schema |
| Move | Change rule location (project ↔ user-level) |
AskUserQuestion to gather:
Personal rules in ~/.claude/rules/ apply to all projects:
~/.claude/rules/
├── preferences.md # Personal coding preferences
├── workflows.md # Preferred workflows
└── shortcuts.md # Personal shortcuts
Use cases:
.claude/rules/
├── frontend/
│ ├── react.md
│ └── styles.md
├── backend/
│ ├── api.md
│ └── database.md
└── general.md
---
paths: src/api/**/*.ts
---
# API Rules
ln -s ~/shared-rules .claude/rules/shared
ln -s ~/company-standards/security.md .claude/rules/security.md
code-style.md not rules1.mdTo show all available rules from both user-level and project directories:
python3 ${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/scripts/list_rules.py [project_path]
Examples:
# List rules for current directory
python3 ${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/scripts/list_rules.py
# List rules for specific project
python3 ${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/scripts/list_rules.py /path/to/project
Output includes:
~/.claude/rules/<project>/.claude/rules/Before saving, validate frontmatter against the JSON schema:
| Field | Type | Constraints |
|---|---|---|
paths | string or string[] | Valid glob pattern(s) |
description | string | Max 200 characters |
priority | integer | 0-100, default 50 |
enabled | boolean | default true |
${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/references/glob-patterns.md${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/schemas/rule-frontmatter.schema.json${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/scripts/list_rules.py${CLAUDE_PLUGIN_ROOT}/skills/rules-builder/scripts/validate_frontmatter.pyCreate API-specific rules
User: "I want rules for my API endpoints"
-> Elicit scope, patterns, location, category
-> Create .claude/rules/api.md with paths: src/api/**/*.ts
Edit existing rule scope
User: "Update testing rules to include integration tests"
-> List rules, elicit selection
-> Show current config, elicit changes
-> Update paths to **/*.{test,spec,integration}.ts
Create personal preferences
User: "Add my coding preferences for all projects"
-> Elicit location (user-level)
-> Create ~/.claude/rules/preferences.md
Organize by domain
User: "Organize my frontend rules"
-> Elicit subdirectory structure
-> Create .claude/rules/frontend/ with react.md, styles.md
List all rules
User: "Show me all my rules"
-> Run list_rules.py script
-> Display user-level and project rules with metadata
-> Offer to edit, delete, or create new rules
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.