Potpie is a tool that turns a software repository and its development history into a context graph for AI coding agents. Agents use that graph to answer codebase questions, plan changes, debug problems, and write code with project-specific information. The catalogue includes skills, hooks, commands, and a plugin for integrating Potpie into coding-agent workflows.
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.
npx agentmods add skills/potpie-ai/potpie/graph-mutation-plannpx skills add potpie-ai/potpie --skill graph-mutation-plangit clone --depth 1 https://github.com/potpie-ai/potpieWrote 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/skills/potpie-ai/potpie/graph-mutation-plan)<a href="https://agentmods.dev/skills/potpie-ai/potpie/graph-mutation-plan"><img src="https://agentmods.dev/badge/skills/potpie-ai/potpie/graph-mutation-plan.svg" alt="Measured on agentmods" 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.00051 | $0.01271 |
| Opus 5 | $0.00026 | $0.00635 |
| Sonnet 5 | $0.00010 | $0.00254 |
| Haiku 4.5 | $0.00005 | $0.00127 |
Grade A, and why
graph-mutation-plan 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 6d 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 — 111 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Composing an apply_graph_mutations plan
Call apply_graph_mutations(plan, event_id, summary) once per logical group of
mutations. The plan is idempotent on stable entity_keys, so a retried plan
converges rather than duplicating. Every structural mutation must stay inside
the given pot_id — never reference another pot.
Plan fields
summary: one-line description of what this plan records.episodes:{name, episode_body, source_description, reference_time?}— narrative/source text to retain (e.g. a PR body, a note).entity_upserts:{entity_key, labels, properties}.edge_upserts:{edge_type, from_entity_key, to_entity_key, properties}.edge_deletes:{edge_type, from_entity_key, to_entity_key}.invalidations:{reason, target_entity_key?, edge_type?, from_entity_key?, to_entity_key?}.evidence:{kind, ref, metadata?}— what grounds this plan.confidence: float | null.warnings: list[str] — anything you could not confirm.
Stable entity_key cookbook
Use these so re-ingestion (and a later live webhook for a backfilled artifact) upserts the same node:
| Artifact | Key pattern |
|---|---|
| Repository | github:repo:<owner>/<repo> |
| Pull request | github:pr:<owner>/<repo>:<n> |
| Issue | github:issue:<owner>/<repo>:<n> |
| Module / package | module:<repo>:<dotted.path> |
| Feature | feature:<repo>:<slug> |
| External ticket / issue | ticket:<source>:<identifier> |
| Activity (timeline) | timeline:activity:<verb>:<short_hex> |
| Period bucket | timeline:period:daily:<pot_id>:<YYYY-MM-DD> |
When no pattern fits, mint a deterministic key from stable identifiers in the source (never a random id, never a timestamp), so the same fact re-keys the same way.
Canonical vocabulary
Always give an entity at least one canonical label — never only generic
Entity. Labels/edges outside the canonical vocabulary are downgraded
automatically (entities → Document / Observation, edges → RELATED_TO), so
prefer a canonical type when one fits.
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.
- 6d ago First seen · 111 lines · 51 tokens per session scan A a7e3c0a39b7a
graph-mutation-plan is a skill published in the GitHub repository potpie-ai/potpie (5,711 stars, last pushed 2d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,271 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-30.
Other skills, from other repositories
langchain_patterns
Implement Retrieval-Augmented Generation (RAG) systems with LangChain4j. Build document ingestion pipelines, embedding stores, vector search strategies, and knowledge-enhanced AI applications. Use when creating question-answering systems over document collections or AI assistants with external knowledge bases.
langchain_patterns
Implement Retrieval-Augmented Generation (RAG) systems with LangChain4j. Build document ingestion pipelines, embedding stores, vector search strategies, and knowledge-enhanced AI applications. Use when creating question-answering systems over document collections or AI assistants with external knowledge bases.
fix-security-vulnerabilities-with-strix
Fix security vulnerabilities found by a Strix pentest (open-source CLI or app.strix.ai cloud) — triage by severity, patch the root cause rather than the symptom, and re-run Strix to prove each fix actually closes the exploit. Handles injection, XSS, SSRF, broken access control, IDOR, and other validated findings. Use…
find-security-vulnerabilities-in-code
Find security vulnerabilities in a codebase or repository with Strix — a white-box AI security review that reads your source, reasons about the actual data flow and authorization model, then exploits what it finds in a live sandbox so every reported issue has a working proof-of-concept instead of a noisy…
managed-pentesting-with-strix
Run a managed pentest of a web app, API, repository, or local workspace on the app.strix.ai platform with the strix cloud CLI or REST API — no local Docker or LLM key needed. Safely review and upload local source, register assets, launch and poll scans, triage vulnerabilities, export SARIF, download compliance…
ci-security-scanning-with-strix
Add security scanning to CI/CD with Strix — GitHub Actions, GitLab CI, or any pipeline — so every pull request gets a diff-scoped AI pentest that blocks vulnerable code before it merges, with results as PR comments and SARIF uploaded to code scanning. Covers both the self-hosted open-source CLI (runs in your runner)…