maintain-project-rules
Audit and maintain project rules in .cursor/rules/. Use when auditing project rules, checking prefix convention, syncing doc/rules.md, or when the user asks about .cursor/rules or prefix convention.
Best use case
maintain-project-rules is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Audit and maintain project rules in .cursor/rules/. Use when auditing project rules, checking prefix convention, syncing doc/rules.md, or when the user asks about .cursor/rules or prefix convention.
Teams using maintain-project-rules should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/maintain-project-rules/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How maintain-project-rules Compares
| Feature / Agent | maintain-project-rules | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Audit and maintain project rules in .cursor/rules/. Use when auditing project rules, checking prefix convention, syncing doc/rules.md, or when the user asks about .cursor/rules or prefix convention.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# maintain-project-rules
## Activation gate
Use if:
- User asks to audit or maintain project rules, check prefix convention, or sync doc/rules.md.
- Context involves `.cursor/rules/`, rule files (`.mdc`), or conventions from cursor-rules-principles / retro.
## Source of truth
- **cursor-rules-principles.md** (in repo or ~/.cursor) – prefix table 000–500, general principles. See [reference.md](reference.md) for full prefix table.
- **commands/retro.md** (PROJECT RULES section) – prefixes 000/050/100/200/900, flat .mdc, no subfolders in rules.
## Procedure
1. **Resolve paths**
- PROJECT_ROOT: `git rev-parse --show-toplevel`
- PROJECT_CURSOR_DIR: `${PROJECT_ROOT}/.cursor`
- PROJECT_RULES_DIR: `${PROJECT_CURSOR_DIR}/rules`
- If PROJECT_RULES_DIR does not exist, report "No .cursor/rules in this repo" and stop.
2. **Audit**
- List all `*.mdc` in PROJECT_RULES_DIR (flat; no subfolders per convention).
- For each file: name, prefix vs principles/retro, frontmatter (`description`, `alwaysApply`, `globs`), line count (~<50 preferred), overlap with other rules (duplicate or near-duplicate content).
- Flag: missing prefix, wrong prefix slot, missing/invalid frontmatter, oversized file, duplicate content.
3. **Proposals**
- RENAME: file without numeric prefix → suggest prefix from reference.md / retro.
- MERGE: two or more rules with overlapping scope → suggest target file and sections.
- DELETE: only with clear justification (obsolete, fully merged); do not execute without user confirmation.
- Do not delete, move, or rename until user confirms.
4. **Sync doc/rules.md**
- If repo has `doc/rules.md` or `docs/rules.md`: update the "Context-Specific Rules" (or equivalent) list to match current `.mdc` files and their globs/scope. Keep doc and rules directory in sync.
## Output
- **Report:** table of files (path, prefix OK?, frontmatter OK?, lines, notes); list of proposals (RENAME/MERGE/DELETE with reason and target).
- **Closing line:** "Do zastosowania: potwierdź zmiany lub wywołaj agenta rules-keeper."
- No destructive changes without explicit user confirmation.
## Reference
For full prefix table and conventions, see [reference.md](reference.md).Related Skills
writing-rules
Use when creating rule files in .claude/rules/, adding project conventions, or scoping guidelines to specific paths. Use when user says "add rule", "create convention", "scope guideline". NOT for laws (use <law> in CLAUDE.md).
startup-business-analyst-financial-projections
Create detailed 3-5 year financial model with revenue, costs, cash flow, and scenarios
project-specification-writer
Generate a complete software specification document for the current project/repo, including architecture, data model, key processes, pseudocode, and Mermaid diagrams (context, container/deployment, module relations, sequence, ER, class, flowchart, state).
project-scaffolding
Project type detection matrix, template recommendations per project type, post-scaffolding checklist, Harness integration patterns, and testing recommendations
project-knowledge
CEI architecture, modules, data flows, conventions, tech stack decisions
[PROJECT]-deployment-patterns
[PROJECT] CI/CD pipeline and deployment automation patterns
fiber-logging-and-project-structure
Applies best practices for logging, project structure, and environment variable usage specifically to the main application file.
dependencies-management-rules
Mandates the usage of UV when installing dependencies to ensure consistency and efficiency across all environments.
azure-ai-projects-java
Azure AI Projects SDK for Java. High-level SDK for Azure AI Foundry project management including connections, datasets, indexes, and evaluations.
azure-ai-projects-dotnet
Azure AI Projects SDK for .NET. High-level client for Azure AI Foundry projects including agents, connections, datasets, deployments, evaluations, and indexes.
alerting-rules-agent
Designs and configures alerting rules for monitoring systems
adf-validation-rules
Comprehensive Azure Data Factory validation rules, activity nesting limitations, linked service requirements, and edge-case handling guidance