claudesec / rules
Cursor rule16 starsChanged 6 months agoMITView on GitHub
Lead agent roles, handoff format, and best practices for Claude/Cursor work in ClaudeSec
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 4,157 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/AGENTS.mdAGENTS.md
- scanner/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/claudesec-project.mdcCursor rule
- .cursor/rules/markdown-quality.mdcCursor rule
- .cursor/rules/no-sensitive-paths.mdcCursor rule
- .cursor/rules/security-citations.mdcCursor rule
- ci-config-guard-claudesecSkill
- kcov-debugSkill
- lychee-redirect-triageSkill
- omc-referenceSkill
The file
We split this claude-agents-and-practices.mdc into the rules it gives an agent
5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When doing Claude-related or multi-step work in ClaudeSec, follow these roles and practices.
- Distinctive: line 19
Use for inter-agent or context switches:
- Distinctive: line 31
Traceability: Document handoffs and key decisions in repo (CONTRIBUTING, ADR, or comments).
- Distinctive: line 32
Single owner per task: Only one agent accountable for completion.
- Very specific: line 38
Follow claudesec-project.mdc (layout, conventions), security-citations.mdc, no-sensitive-paths.mdc, markdown-quality.mdc.
≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
--- description: Lead agent roles, handoff format, and best practices for Claude/Cursor work in ClaudeSec alwaysApply: true --- # Claude Lead Agents and Practices When doing Claude-related or multi-step work in ClaudeSec, follow these roles and practices. ## Lead Agent Roles - **Lead Orchestrator (1)**: Decomposes tasks, assigns ownership, sets priorities, accepts completion. Resolves priority and design conflicts. - **Researcher (1..N)**: Gathers code evidence and external refs (OWASP, NIST, CIS). Evidence before edits. - **Implementer (1..N)**: Applies changes, runs verification (tests, scanner, markdownlint). One owner per task. - **Reviewer (1)**: Checks correctness, security risk, regression. Proposes options on design; Lead finalizes. ## Handoff Format Use for inter-agent or context switches: ```txt [Task] Goal: / Scope: / Constraints: [Done] Files Changed: / Key Changes: / Validation: [Open] Risks: / Next Actions: ``` ## Best Practices 1. **Security-first**: Cite OWASP/NIST/CIS for security advice. No company paths, PII, IPs, account IDs, or secrets in repo. Least privilege for agent/tool access. 2. **Small increments**: One clear goal per task; verifiable (tests, scanner, lint). Prefer small commits. 3. **Traceability**: Document handoffs and key decisions in repo (CONTRIBUTING, ADR, or comments). 4. **Single owner per task**: Only one agent accountable for completion. Split file ownership by module to avoid conflicts. 5. **Definition of done**: Behavior implemented; no unresolved diagnostics; tests/checks pass; Reviewer sign-off. 6. **Conflict**: Priority → Lead decides. Design → Reviewer options, Lead finalizes. Deadlock → escalate with two options and tradeoffs. ## Alignment - Follow **claudesec-project.mdc** (layout, conventions), **security-citations.mdc**, **no-sensitive-paths.mdc**, **markdown-quality.mdc**. - Full guide: `docs/guides/claude-lead-agents-and-best-practices.md`.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

