agentleFS
Twodragon0Twodragon0/claudesec/.cursor/rules/claude-agents-and-practices.mdc

claudesec / rules

Cursor rule16 starsChanged 6 months agoMITView on GitHub

Lead agent roles, handoff format, and best practices for Claude/Cursor work in ClaudeSec

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
  1. Very specific:

    When doing Claude-related or multi-step work in ClaudeSec, follow these roles and practices.

    line 8
  2. Distinctive:

    Use for inter-agent or context switches:

    line 19
  3. Distinctive:

    Traceability: Document handoffs and key decisions in repo (CONTRIBUTING, ADR, or comments).

    line 31
  4. Distinctive:

    Single owner per task: Only one agent accountable for completion.

    line 32
  5. Very specific:

    Follow claudesec-project.mdc (layout, conventions), security-citations.mdc, no-sensitive-paths.mdc, markdown-quality.mdc.

    line 38

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
claude-agents-and-practices.mdc
---
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`.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.