graphsmith

A set of rules for building multi-agent AI workflows, where a manager controls the sequence and worker agents perform individual steps.

In plain words
What is it for?
It helps design or repair agent pipelines and automations that lose state, loop, duplicate work, or produce unsupported claims.
Why use it?
Saving progress, making retries safe, and using predictable routing helps workflows recover from crashes without repeating or losing work.

Cursor rule for Cursor

Install

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.

agentmods
npx agentmods add rules/sathiaai/graphsmith/graphsmith
Clone the repo
git clone --depth 1 https://github.com/SathiaAI/graphsmith

Made for: Cursor.

Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,474 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00052 $0.02474
Opus 5 $0.00026 $0.01237
Sonnet 5 $0.00010 $0.00495
Haiku 4.5 $0.00005 $0.00247

Measured yesterday against content hash d0cb2f6b4693, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

graphsmith 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 yesterday.

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.

.cursor/rules/graphsmith.mdc · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GraphSmith

Turn a goal into a reliable multi-agent workflow. One skill, two modes — detect which user you're serving, then apply the same engineering discipline in different voices.

The discipline (never negotiable, in either mode):

  1. A plain, deterministic manager controls flow; LLMs work only inside worker steps. Control returns to the manager after every step.
  2. Save after every step — a crashed run resumes, never restarts.
  3. Every step is safe to re-run — assume it WILL be retried.
  4. No clocks or randomness in routing — same inputs, same path.
  5. Minimal handoffs — workers get only what they need.
  6. Grounded claims — anything said about existing code cites KnoSky.
  7. One log line per step — run ID, step, status, duration.

Mode detection (do this first, silently)

Score the context. Engineer signals: user mentions frameworks, retries, state, idempotency, CI, reviews existing agent code, or the repo has tests/CI configs. Builder signals: outcome-focused language ("I want it to email my leads"), no code vocabulary, greenfield, or platform-builder context (Lovable/Replit-style).

  • Builder mode → plain English only. Banned words with the user: graph, DAG, node, edge, topology, idempotent, checkpoint, orchestrator, deterministic. Use: blueprint, worker, handoff, save point, manager, "safe to re-run."
  • Engineer mode → full vocabulary, terse output, lead with tools and diffs, skip explanations they didn't ask for. Never talk down.

If genuinely ambiguous, ask one short question; otherwise infer and proceed.


Phase 0 — Ground (KnoSky)

If the task involves an existing repo or docs folder:

  1. Run node scripts/knosky-sync.js — verifies the pinned KnoSky version is reachable via npx AND that its content matches the sha512 baked into this release (refusing on registry mismatch; no global install, no latest; supply-chain hardened per our published council reviews). Non-blocking: offline or registry failures never stop the task. Set GRAPHSMITH_OFFLINE=1 to skip all network activity in sensitive environments.
  2. From the project root run the pinned command it prints (npx -y knosky@<pinned> .) — builds the local index (nothing leaves the machine) and prints MCP config. Register it per the user's agent (Claude/Codex/Gemini/Cursor each have their own MCP settings; apply KnoSky's printed config there).
  3. Cite or flag. Every claim about existing code carries a KnoSky citation (real path). If you can't cite, say "inferring." KnoSky is a pointer index — read the live file before editing anything it points to.

Read the full file on GitHub · 119 lines

Changes

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.

  1. yesterday First seen · 119 lines · 52 tokens per session scan A d0cb2f6b4693

Subscribe to this mod's changes

graphsmith is a cursor rule published in the GitHub repository SathiaAI/graphsmith (3 stars, last pushed 3d ago), licensed MIT. It adds 52 tokens to every session and 2,474 once invoked, about $0.0003 per session on Opus 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.