graph-mutation-plan

graph-mutation-plan is a skill for Claude Code, Codex from potpie-ai/potpie. It costs 51 tokens per session (1,271 once invoked), scanned A, original, Apache-2.0.

A guide for planning structured updates to a graph database, where information is stored as entities and links between them. It defines stable identifiers, labels, evidence, confidence, and invalidations for each update.

In plain words
What is it for?
Use it to prepare plans that add or update entities and relationships, remove outdated links, retain source episodes, attach evidence, and record warnings or confidence.
Why use it?
It helps repeated imports update the same records instead of creating duplicates. It also keeps changes traceable and prevents structural updates from crossing the assigned data boundary.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

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

Made for: Claude Code, 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 graph-mutation-plan

README.md
[![agentmods](https://agentmods.dev/badge/skills/potpie-ai/potpie/graph-mutation-plan.svg)](https://agentmods.dev/skills/potpie-ai/potpie/graph-mutation-plan)
Your own site
<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>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,271 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.00051 $0.01271
Opus 5 $0.00026 $0.00635
Sonnet 5 $0.00010 $0.00254
Haiku 4.5 $0.00005 $0.00127

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

Security

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.

potpie/context-engine/src/potpie_context_engine/adapters/outbound/reconciliation/skills/graph-mutation-plan/SKILL.md · 111 lines

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.

Read the full file on GitHub · 111 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. 6d ago First seen · 111 lines · 51 tokens per session scan A a7e3c0a39b7a

Subscribe to this mod's changes

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.

Related

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.

vuralserhat86/antigravity-agentic-skills · 57 tokens

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.

DonggangChen/antigravity-agentic-skills · 57 tokens

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…

usestrix/strix · 124 tokens

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…

usestrix/strix · 129 tokens

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…

usestrix/strix · 114 tokens

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)…

usestrix/strix · 140 tokens