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/potpie-graphnpx skills add potpie-ai/potpie --skill potpie-graphgit 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/potpie-graph)<a href="https://agentmods.dev/skills/potpie-ai/potpie/potpie-graph"><img src="https://agentmods.dev/badge/skills/potpie-ai/potpie/potpie-graph.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.00094 | $0.02860 |
| Opus 5 | $0.00047 | $0.01430 |
| Sonnet 5 | $0.00019 | $0.00572 |
| Haiku 4.5 | $0.00009 | $0.00286 |
Grade A, and why
potpie-graph 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 — 236 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Potpie Graph Workbench
The graph is project memory: preferences, prior bugs and their fixes, infra topology, decisions, and a timeline of changes. You are the intelligence that reads it before acting and writes durable learnings after. Potpie validates, lowers, commits, audits, and ranks. It does not scan a repository or infer rich facts from prose for you.
Use text output for routine context reads. Add --json when a workflow needs
exact machine parsing, mutation plans, commits, history verification, or full
evidence/debug payloads.
1. Check Status And Discover The Contract
potpie graph status
potpie graph catalog --task "<task>" --profile read
Returns contract + ontology versions, the readable views, and active
match_mode (vector vs lexical). Start graph-aware work here instead of
reading docs. Use full JSON catalog output when you need mutation operation
partitions, entity types, predicates, or exact machine parsing. Trust the
catalog's current operation partition over any example in a skill file.
Describe the subgraph/view before a non-trivial read or write:
potpie graph describe debugging --view prior_occurrences --examples
2. Read - graph read --subgraph --view
potpie graph read --subgraph debugging --view prior_occurrences --query "refund race timeout" --limit 8
potpie graph read --subgraph debugging --view prior_occurrences --query "refund race timeout" --query-threshold 0.55 --limit 8
potpie graph read --subgraph decisions --view preferences_for_scope --scope repo:acme/x,path:src/payments/client.py
potpie graph read --subgraph recent_changes --view timeline --time-window 7d --limit 20 --format table
potpie graph read --subgraph recent_changes --view timeline --source-ref <github-pr-or-issue-ref> --format table
potpie graph read --subgraph infra_topology --view service_neighborhood --scope service:payments-api --depth 2 --direction out --environment prod
potpie graph neighborhood --entity service:payments-api --predicate USES --detail summary --limit 20
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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 · 236 lines · 94 tokens per session scan A c5015c129adb
potpie-graph is a skill published in the GitHub repository potpie-ai/potpie (5,711 stars, last pushed 2d ago), licensed Apache-2.0. It adds 94 tokens to every session and 2,860 once invoked, about $0.0005 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
mistake-reflection
Use when you discover you made a mistake — caught by the user, by a tool result, by your own re-reading, or by a failed check. Appends a structured entry to docs/ai/ailearnings.md and re-reads recent entries to avoid repeats.
brainctl
Unified agent memory CLI — read, write, search, and maintain the shared memory spine (brain.db). Use for persistent cross-session memory, knowledge graph, event logging, decisions, affect tracking, and consolidation.
cortex-memory
Persistent cognitive memory for AI agents — query, record, review, and consolidate knowledge across sessions with spreading activation, FSRS scheduling, and NLI contradiction detection.
chainabit-operator
The Chainabit-owned operator lenser that runs weekly reviews, async standups, PR triage, and launch content kits.
memharness-memory
Use whenever the conversation could depend on or produce durable knowledge about the user or a project. Recall stored memory before answering context-dependent questions or starting a task, and store durable facts (decisions, preferences, corrections, stable properties, gotchas) as they emerge. Triggers on "remember"…
learn
Store a learning into MinnsDB for cross-session recall.