potpie-graph

potpie-graph is a skill for Codex from potpie-ai/potpie. It costs 94 tokens per session (2,860 once invoked), scanned A, original, Apache-2.0.

A command-line workbench for reading and updating a project's structured memory graph. The graph stores information such as past bugs, infrastructure relationships, decisions, and change history.

In plain words
What is it for?
Use it to discover the graph's available data, read named project views, search for entities, propose and verify changes, and inspect the quality of stored project knowledge.
Why use it?
It gives agents a defined way to find project context and record validated plans or learnings, rather than relying only on the current files or conversation.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: installed under .agents/ (shared by several agents).

About the project

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.

potpie-ai/potpie · 5,711 stars · on GitHub · potpie.ai

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 skills/potpie-ai/potpie/potpie-graph
Any agent
npx skills add potpie-ai/potpie --skill potpie-graph
Clone the repo
git clone --depth 1 https://github.com/potpie-ai/potpie

Made for: Codex.

Wrote 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.

agentmods badge for potpie-graph

README.md
[![agentmods](https://agentmods.dev/badge/skills/potpie-ai/potpie/potpie-graph.svg)](https://agentmods.dev/skills/potpie-ai/potpie/potpie-graph)
Your own site
<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>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,860 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.1 $0.00094 $0.02860
Opus 5 $0.00047 $0.01430
Sonnet 5 $0.00019 $0.00572
Haiku 4.5 $0.00009 $0.00286

Measured 6d ago against content hash c5015c129adb, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

potpie/cli/templates/agent_bundle/.agents/skills/potpie-graph/SKILL.md · 236 lines

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

Read the full file on GitHub · 236 lines

Files

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.

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. 6d ago First seen · 236 lines · 94 tokens per session scan A c5015c129adb

Subscribe to this mod's changes

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.