Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/Vedthakar/swamrWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/vedthakar/swamr/swamr-state-manager)<a href="https://agentmods.dev/rules/vedthakar/swamr/swamr-state-manager"><img src="https://agentmods.dev/badge/rules/vedthakar/swamr/swamr-state-manager/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/rules/vedthakar/swamr/swamr-state-manager"><img src="https://agentmods.dev/badge/rules/vedthakar/swamr/swamr-state-manager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00037 | $0.01033 |
| Opus 5.5 | $0.00015 | $0.00413 |
| Sonnet 5.5 | $0.00007 | $0.00207 |
| Haiku 4.5 | $0.00004 | $0.00103 |
Grade A, and why
swamr-state-manager scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 140 lines — stays where its author put it; the contents beside it link to each section on GitHub.
📊 Swamr State Manager
You manage the execution state of the Swamr pipeline. You are the memory of the swarm.
State File: swamr/state.json
{
"project": {
"name": "MyApp",
"description": "A SaaS dashboard with...",
"tech_stack": {
"frontend": "Next.js 15",
"backend": "Supabase",
"styling": "Tailwind + shadcn/ui",
"hosting": "Vercel"
},
"started_at": "2024-01-01T00:00:00Z",
"status": "building"
},
"phases": [
{
"id": "foundation",
"name": "Foundation",
"status": "completed",
"tasks": ["F1", "F2", "F3", "F4", "F5", "F6"]
},
{
"id": "build",
"name": "Core Build",
"status": "in_progress",
"tasks": ["B1", "B2", "B3", "B4", "B5"]
}
],
"tasks": {
"F1": {
"description": "Scaffold Next.js project",
"agent": "devops-automator",
"status": "completed",
"attempts": 1,
"depends_on": [],
"output_files": ["package.json", "next.config.js", "tsconfig.json"],
"completed_at": "2024-01-01T01:00:00Z"
},
"B1": {
"description": "Build dashboard page",
"agent": "frontend-developer",
"status": "in_progress",
"attempts": 1,
"depends_on": ["F4", "F6"],
"qa_feedback": null
}
},
"current_task": "B1",
"metrics": {
"tasks_total": 20,
"tasks_completed": 6,
"tasks_failed": 0,
"tasks_in_progress": 1,
"total_attempts": 7,
"avg_attempts_per_task": 1.17
}
}
Operations
Initialize State
When starting a new project from a plan:
- Read
swamr/plan.md - Parse all tasks with their dependencies
- Create the initial
state.json - Set first foundation task as
current_task
Update Task Status
After each agent completes work:
update_task(task_id, {
status: "completed" | "failed" | "in_progress",
attempts: N,
output_files: [...],
qa_feedback: "..." | null,
completed_at: ISO timestamp
})
Get Next Task
Find the next task to execute:
- Filter tasks where
status != "completed" - Filter by dependency resolution (all
depends_onmust becompleted) - Sort by phase order, then task order
- Return the first eligible task
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 140 lines · 37 tokens per session scan A 7ade1be8875c
swamr-state-manager is a cursor rule published in the GitHub repository Vedthakar/swamr (13 stars, last pushed 19d ago), licensed MIT. It adds 37 tokens to every session and 1,033 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other cursor rules, from other repositories
monorepo-and-tooling
Rules for projects that may use a monorepo, a single repository containing multiple applications or shared packages. They also define Taskfile commands and how to keep environment settings outside the code.
implement-task-list
Implement Task List — guidance-first implementation for planr-pipeline.
minimax-mcp-tools
MCP and web-tool guidance: current-doc retrieval, direct-tool preference, MCP Apps structured content, and version-aware external lookups.
project-onboarding-rule
Automatically onboards existing projects into the AI-driven development workflow.
github-repo-triage
Triage and maintain GitHub repos — issues, PRs, cherry-picks, releases, publishing.
task-tracking-advanced
Cursor rule "task-tracking-advanced" from giang6283623/cursor-tip, covering advanced task tracking for level 4 tasks, 🔍 advanced task tracking overview, 📋 task tracking principles, 📋 task hierarchy structure and levels of hierarchy.