Deep Context Generation with PMAT

Deep Context Generation with PMAT is a skill for Claude Code from paiml/paiml-mcp-agent-toolkit. It costs 112 tokens per session (2,617 once invoked), scanned A, original, MIT.

A tool-assisted way to build a compact overview of an unfamiliar codebase. It maps the project structure, important abstractions, dependencies, complexity hotspots, and architecture.

In plain words
What is it for?
Use it for onboarding, architecture reviews, technical documentation, refactoring preparation, or explaining how a project works.
Why use it?
It reduces the time needed to understand a new repository without reading every file in full.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: installed under .agents/ (shared by several agents).

Good fit Use it for onboarding, architecture reviews, technical documentation, refactoring preparation, or explaining how a project works.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/paiml/paiml-mcp-agent-toolkit/pmat-context
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 paiml/paiml-mcp-agent-toolkit --skill pmat-context
Clone the repo
git clone --depth 1 https://github.com/paiml/paiml-mcp-agent-toolkit

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 Deep Context Generation with PMAT

README.md
[![agentmods](https://agentmods.dev/badge/skills/paiml/paiml-mcp-agent-toolkit/pmat-context/github.svg)](https://agentmods.dev/skills/paiml/paiml-mcp-agent-toolkit/pmat-context)
Your own site
<a href="https://agentmods.dev/skills/paiml/paiml-mcp-agent-toolkit/pmat-context"><img src="https://agentmods.dev/badge/skills/paiml/paiml-mcp-agent-toolkit/pmat-context/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 Deep Context Generation with PMAT

Your own site · 80×15
<a href="https://agentmods.dev/skills/paiml/paiml-mcp-agent-toolkit/pmat-context"><img src="https://agentmods.dev/badge/skills/paiml/paiml-mcp-agent-toolkit/pmat-context.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 112 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,617 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
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.00112 $0.02617
Opus 5 $0.00056 $0.01308
Sonnet 5 $0.00022 $0.00523
Haiku 4.5 $0.00011 $0.00262

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

Security

Grade A, and why

Deep Context Generation with PMAT 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.

.agents/skills/pmat-context/SKILL.md · 345 lines

How it starts

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

PMAT Deep Context Generation Skill

You are an expert at generating comprehensive codebase context using PMAT (Pragmatic AI Labs MCP Agent Toolkit).

When to Activate

This skill should automatically activate when:

  1. User asks for codebase overview, architecture, or "how does this work?"
  2. Starting work on unfamiliar code ("I'm new to this project")
  3. Need to understand project structure before making changes
  4. Onboarding scenarios ("walk me through this codebase")
  5. Creating technical documentation or specifications

Core Command: pmat context

pmat context --output context.md --format llm-optimized

What it does:

  • Scans entire codebase (respects .gitignore)
  • Generates highly compressed markdown (60-80% smaller than raw code)
  • Includes architecture diagrams (ASCII art tree structure)
  • Provides complexity heatmaps and hotspot identification
  • Extracts key abstractions (classes, functions, modules)
  • Maps dependencies and import relationships

Performance:

  • Small projects (<100 files): <500ms
  • Medium projects (100-1K files): <2s
  • Large projects (10K+ files): 5-15s

Usage Workflow

Step 1: Generate Full Context

When user needs comprehensive understanding:

pmat context --output deep_context.md --format llm-optimized

Then read the generated file:

cat deep_context.md

Step 2: Analyze the Context

Look for these key sections in the generated context:

  1. Project Overview

    • Language distribution
    • Total files/lines of code
    • Main entry points
  2. Architecture Tree

    • Directory structure
    • Module organization
    • Key components
  3. Complexity Heatmap

    • Files sorted by complexity score
    • Hotspots requiring attention
    • Maintainability indicators
  4. Dependency Graph

    • Import relationships
    • Cross-module dependencies
    • External libraries
  5. Key Abstractions

    • Classes and interfaces
    • Public APIs
    • Core data structures

Step 3: Answer User Questions

Use the generated context to:

  • Explain architecture decisions
  • Identify where to make changes
  • Suggest refactoring targets
  • Map feature implementation paths

Read the full file on GitHub · 345 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 · 345 lines · 112 tokens per session scan A c8dba9562a69

Subscribe to this mod's changes

Deep Context Generation with PMAT is a skill published in the GitHub repository paiml/paiml-mcp-agent-toolkit (164 stars, last pushed today), licensed MIT. It adds 112 tokens to every session and 2,617 once invoked, about $0.0006 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

task-agent-eliza-bridge

Use when spawning a Claude Code, Codex, Gemini, Aider, or other CLI task agent whose work needs parent Eliza runtime context. Covers the read-only loopback bridge for character, room, memory, and active workspace state.

elizaOS/eliza · 55 tokens

kb-builder

Build an Obsidian-compatible knowledge base from public web sources using the TinyFish CLI. Use this skill when a user wants a builder-grade markdown knowledge base on a technical topic, asks for a structured research vault, or wants a topic compiled from live public sources into interlinked markdown files. Supports…

tinyfish-io/tinyfish-cookbook · 158 tokens

10-learn

Capture durable project learnings. Use when the user wants to remember, record, or formalize a decision, convention, lesson, pitfall, reusable workflow, or review finding. Not for preferences or temporary notes.

ai-driven-dev/framework · 47 tokens

project-context

Use PowerContext project memory and handoff tools through MCP when continuing prior work, recalling decisions, maintaining durable memory, or transferring work across tasks, sessions, or agents.

oceanbase/powercontext · 37 tokens

memory-audit-pattern-extraction

A method for investigating repeated mistakes by comparing related memories and checking whether an earlier reminder failed. It looks at where the reminder was stored, when it was created, and whether it was strong enough to prevent the mistake.

Dataojitori/nocturne_memory · 48 tokens

memorix-sessions

Use when resuming work, preparing handoff context, binding an HTTP control-plane project, or deciding whether sessionstart is useful.

AVIDS2/memorix · 31 tokens