This skill should be used when the user asks to "update rules", "add a rule", "edit a rule", "remove a rule", "manage rules", or "add rules for a new module". Provides guidance for viewing, adding, modifying, and removing project rules in `.claude/rules/`.
From dev-standardsnpx claudepluginhub standardbeagle/standardbeagle-tools --plugin dev-standardsThis skill uses the workspace's default tool permissions.
Manage the project's development rules in .claude/rules/. Support adding, modifying, and removing rule files, including glob-scoped rules for specific modules or directories.
Read the .claude/rules/ directory and list every rule file with its metadata.
For each file found:
paths glob patterndescription frontmatter fieldPresent a summary table to the user:
Current rules in .claude/rules/:
File Glob Scope Description
version-control.md (always loaded) Version control standards
typescript.md **/*.ts, **/*.tsx TypeScript guidelines
testing.md **/*.test.*, ... Testing standards
...
If .claude/rules/ does not exist or is empty, report that no rules are configured and ask if the user wants to run /setup-project first.
Ask the user which operation to perform:
Wait for the answer before proceeding.
If the user chose "add":
Ask what the rule covers. Examples:
services/payments/")Based on the scope, suggest an appropriate glob pattern for the rule's paths frontmatter. Ask the user to confirm or adjust.
Guidelines for glob patterns:
**/*.ext (e.g., **/*.graphql, **/*.tf)path/to/module/** (e.g., services/payments/**)**/*.test.*, **/*.spec.*, **/*_test.*paths field entirelyAsk what specific standards, guidelines, or constraints the rule should encode. Prompt with focused questions:
Create the rule file at .claude/rules/<rule-name>.md with this structure:
---
paths:
- "<glob-pattern>"
description: "<one-line description>"
---
# <Rule Title>
<Rule content organized into clear sections>
Choose a kebab-case filename that matches the scope (e.g., graphql.md, payments-service.md, logging.md).
Check if a matching template exists at ${CLAUDE_PLUGIN_ROOT}/assets/templates/rules/. If one exists, offer to use it as a starting point. If not, generate from the user's answers.
If the user chose "modify":
If the user did not specify which rule, present the list from Step 1 and ask which rule to modify.
Read and display the full content of the selected rule file.
Ask the user what to change. Common modifications:
Edit the rule file with the requested changes. Preserve the existing structure and frontmatter unless the user explicitly asks to change them.
Show the user a summary of what changed.
If the user chose "remove":
If the user did not specify which rule, present the list from Step 1 and ask which rule to remove.
Show the rule's description and glob scope. Ask the user to confirm deletion. Warn that this cannot be undone (unless version-controlled).
Delete the rule file from .claude/rules/.
Report the deletion to the user.
After completing an operation, ask if the user wants to perform another operation (add, modify, or remove another rule) or finish.
If finishing, present the updated summary table from Step 1 showing the current state of all rules.