icpg

icpg is a skill for Claude Code from alinaqi/maggy. It costs 38 tokens per session (2,757 once invoked), scanned A, original, MIT.

A project record that links code to the goals and reasons behind it. It stores those links in a local SQLite database and checks whether the code still matches its original purpose.

In plain words
What is it for?
Use it to record task intent, connect goals to functions and modules, enforce contracts, and query context before autonomous development work.
Why use it?
Code can continue working while no longer serving the requirement that created it; these links make that drift easier to detect.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is pip install ./scripts/icpg # Core (zero deps).

Good fit Use it to record task intent, connect goals to functions and modules, enforce contracts, and query context before autonomous development work.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy
agentmods
npx agentmods add skills/alinaqi/maggy/icpg

Made for: Claude Code.

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 icpg

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/icpg/github.svg)](https://agentmods.dev/skills/alinaqi/maggy/icpg)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/icpg"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/icpg/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for icpg

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/icpg"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/icpg.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 38 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,757 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
SkillSpector: 1 finding, up to low

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • low Excessive Agency · line 104
    Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
    Fix: Limit the skill's scope to its documented purpose. Remove instructions that enable the agent to perform actions outside its stated functionality.
How audits are shown
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.00038 $0.02757
Opus 5 $0.00019 $0.01378
Sonnet 5 $0.00008 $0.00551
Haiku 4.5 $0.00004 $0.00276

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

Security

Grade A, and why

icpg 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 9d 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.

skills/icpg/SKILL.md · 328 lines

How it starts

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

iCPG Skill (Intent-Augmented Code Property Graph)

Purpose: Add a Reason Graph layer on top of code structure so every function, class, and module is traceable to the goal that created it, the agent or human that owns it, and whether it's still doing what it was supposed to do.

┌────────────────────────────────────────────────────────────────┐
│  iCPG = AST + CFG + PDG + RG (Reason Graph)                    │
│  ─────────────────────────────────────────────────────────────│
│  AST  = Abstract Syntax Tree (structure)      ← existing       │
│  CFG  = Control Flow Graph (execution paths)  ← existing       │
│  PDG  = Program Dependency Graph              ← existing       │
│  RG   = Reason Graph (WHY layer)              ← THIS SKILL     │
│                                                                │
│  The RG stores ReasonNodes (goals/tasks), links them to code   │
│  symbols via typed edges, enforces contracts (DbC), and        │
│  detects when code drifts from its original purpose.           │
│                                                                │
│  Storage: .icpg/reason.db (SQLite, per-project, gitignored)   │
│  CLI: icpg init | create | record | query | drift | bootstrap │
└────────────────────────────────────────────────────────────────┘

Core Principle

Intent first, code second. Before writing or modifying code, query the reason graph to understand WHY existing code was written, WHAT constraints it must preserve, and WHETHER your change duplicates prior work.


The 3 Canonical Pre-Task Queries

Every agent MUST run these before writing code:

# Query Command What It Answers
1 search_prior_work icpg query prior "<goal>" Has this been attempted before? Prevents duplication.
2 get_constraints icpg query constraints <file> What invariants apply to files I'll touch? Prevents breakage.
3 get_risk_profile icpg query risk <symbol> Is this symbol fragile? Drift history, ownership changes.

Read the full file on GitHub · 328 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. 9d ago First seen · 328 lines · 38 tokens per session scan A e86fe82cfc4c

Subscribe to this mod's changes

icpg is a skill published in the GitHub repository alinaqi/maggy (707 stars, last pushed 4d ago), licensed MIT. It adds 38 tokens to every session and 2,757 once invoked, about $0.0002 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-09-03.

Related

Other skills, from other repositories

writing-python

Idiomatic Python 3.12+ development. Use when writing Python code, CLI tools, scripts, or services. Emphasizes stdlib, type hints, fast pytest feedback, uv/ruff/pyright toolchain, and minimal dependencies. NOT for Go, Rust, TypeScript, or shell-only tasks.

alexei-led/cc-thingz · 67 tokens

python-authoring

Write, edit, refactor, or review Python in easy-cheese with concise stdlib-first code, Python 3.12, Shiv .pyz packaging, and repository test and validation conventions. Use for Python changes under src/, scripts/, .github/scripts/, or tests/, especially when the user asks for Pythonic, succinct, de-slopped…

paulnsorensen/easy-cheese · 88 tokens

frappe-backend

Frappe backend guidance for Python and backend-adjacent JavaScript surfaces such as client interaction patterns, hooks, APIs, patches, scheduler logic, reports, and server-side review. Use when implementing or reviewing Frappe backend behavior.

Dkm0315/frappe-agent · 53 tokens

python-best-practices

Python/FastAPI coding standards including async patterns, Pydantic v2, SQLAlchemy 2.0, and project structure. Use when writing Python code, reviewing FastAPI projects, or learning FastAPI conventions.

KunanonJ/ai-skills-hub · 50 tokens

python-packaging

Comprehensive guide to creating, structuring, and distributing Python packages using modern packaging tools, pyproject.toml, and publishing to PyPI.

KunanonJ/ai-skills-hub · 33 tokens

python-type-annotator

Add missing type annotations to Python code. Generates mypy-compatible type hints for function signatures, variables, and class attributes. Triggers on "add types", "type annotate", "add type hints", "type this file".

luqiang-code/claude-code-skills · 51 tokens