cpg-analysis

cpg-analysis is a skill for Claude Code from alinaqi/maggy. It costs 39 tokens per session (1,961 once invoked), scanned A, original, MIT.

A deep code-analysis guide using Joern and CodeQL to examine how code is structured, executes, and moves data between functions.

In plain words
What is it for?
Use it for detailed security audits, vulnerability detection, and analysis of data moving across multiple functions.
Why use it?
It helps investigate control flow, data flow, dependencies, tainted input, and security vulnerabilities when ordinary code navigation is not enough. The tools require Docker, a Java runtime, or the CodeQL command-line tool.

Skill for Claude Code

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

Good fit Use it for detailed security audits, vulnerability detection, and analysis of data moving across multiple functions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/alinaqi/maggy/cpg-analysis
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.

Any agent
npx skills add alinaqi/maggy --skill cpg-analysis
Clone the repo
git clone --depth 1 https://github.com/alinaqi/maggy

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 cpg-analysis

README.md
[![agentmods](https://agentmods.dev/badge/skills/alinaqi/maggy/cpg-analysis/github.svg)](https://agentmods.dev/skills/alinaqi/maggy/cpg-analysis)
Your own site
<a href="https://agentmods.dev/skills/alinaqi/maggy/cpg-analysis"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/cpg-analysis/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 cpg-analysis

Your own site · 80×15
<a href="https://agentmods.dev/skills/alinaqi/maggy/cpg-analysis"><img src="https://agentmods.dev/badge/skills/alinaqi/maggy/cpg-analysis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,961 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 warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

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 →

  • medium Excessive Agency · line 223
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
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.00039 $0.01961
Opus 5 $0.00019 $0.00981
Sonnet 5 $0.00008 $0.00392
Haiku 4.5 $0.00004 $0.00196

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

Security

Grade A, and why

cpg-analysis 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/cpg-analysis/SKILL.md · 227 lines

How it starts

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

CPG Analysis Skill

Purpose: Deep code analysis beyond AST. Use Joern for full Code Property Graph (control flow, data flow, program dependencies) and CodeQL for interprocedural taint analysis and vulnerability detection.

These are opt-in tools. They require Docker/JVM (Joern) or CodeQL CLI. Use codebase-memory-mcp (Tier 1, always-on) for everyday navigation. Use these for deep analysis when Tier 1 is not enough.

┌────────────────────────────────────────────────────────────────┐
│  CODE PROPERTY GRAPH = AST + CFG + CDG + DDG + PDG             │
│  ─────────────────────────────────────────────────────────────│
│  AST  = Abstract Syntax Tree (structure)                       │
│  CFG  = Control Flow Graph (execution paths)                   │
│  CDG  = Control Dependency Graph (conditional dependencies)    │
│  DDG  = Data Dependency Graph (data flow between statements)   │
│  PDG  = Program Dependency Graph (CDG + DDG combined)          │
│                                                                │
│  Tier 2 (Joern): Full CPG with 40+ query tools                │
│  Tier 3 (CodeQL): Interprocedural taint + security queries     │
└────────────────────────────────────────────────────────────────┘

Tier Selection Guide

Simple symbol lookup, dependency trace, blast radius?
  → Tier 1: codebase-memory-mcp (always on, sub-ms)

Control flow paths, data flow, dead code, complex refactoring?
  → Tier 2: Joern CPG (on-demand, seconds)

Security audit, taint analysis, vulnerability detection?
  → Tier 3: CodeQL (on-demand, seconds to minutes)

Full security review before release?
  → All three tiers in sequence

Tier 2: Joern CPG (CodeBadger MCP)

When to Use Joern

Scenario Why Joern Tier 1 Can't Do This
Trace data flow through functions Full DDG traversal Tier 1 has no data flow
Understanding control flow paths CFG analysis with branch conditions Tier 1 has no CFG
Finding dead/unreachable code PDG reachability analysis Tier 1 only detects unused exports
Complex refactoring impact Cross-function dependency chains Tier 1 limited to call graph
Auditing third-party library usage Deep call chain traversal Tier 1 stops at import boundary
Understanding exception flow CFG includes throw/catch paths Tier 1 ignores exceptions

Read the full file on GitHub · 227 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 · 227 lines · 39 tokens per session scan A 13446b33af35

Subscribe to this mod's changes

cpg-analysis is a skill published in the GitHub repository alinaqi/maggy (705 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 1,961 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-08-30.

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

Hive Parallelism Stack (High Performance)

The official technical stack for achieving "Best in World" concurrency and parallelism in the Sovereign Hive.

MidOSresearch/midos · 29 tokens

cli-e2e

Write, modify, or debug Docker-based Composio CLI end-to-end tests under ts/e2e-tests/cli, including binary invocation, fixture isolation, output assertions, and package manifests. Use for CLI E2E test suites only; use cli-command for CLI source implementation.

ComposioHQ/composio · 62 tokens