dig

dig is a skill for Claude Code from jameslowman/planning-with-james. It costs 0 tokens per session (2,789 once invoked), scanned C, original, MIT.

A read-only skill for querying a project’s knowledge graph, a stored map of its code structure and dependencies. It uses that map to explain code, trace effects of changes, or review a proposed change.

In plain words
What is it for?
Use it to find where behaviour is implemented, understand module boundaries, trace dependencies, and assess what a code change may affect. If the graph is missing or outdated, it tells you which separate commands can create or update it.
Why use it?
It gives answers from existing project analysis instead of repeatedly exploring the whole codebase, while avoiding changes to the knowledge graph.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Part of the planning-with-james plugin — 7 skills, 2 hooks shipped together

Good fit Use it to find where behaviour is implemented, understand module boundaries, trace dependencies, and assess what a code change may affect. If the graph is missing or outdated, it tells you which separate commands can create or update it.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jameslowman/planning-with-james/dig
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 jameslowman/planning-with-james --skill dig
Clone the repo
git clone --depth 1 https://github.com/jameslowman/planning-with-james

Made for: Claude Code.

Or install planning-with-james, the plugin that ships this one along with the rest of its 7 skills, 2 hooks.

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 dig

README.md
[![agentmods](https://agentmods.dev/badge/skills/jameslowman/planning-with-james/dig.svg)](https://agentmods.dev/skills/jameslowman/planning-with-james/dig)
Your own site
<a href="https://agentmods.dev/skills/jameslowman/planning-with-james/dig"><img src="https://agentmods.dev/badge/skills/jameslowman/planning-with-james/dig.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,789 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00000 $0.02789
Opus 5 $0.00000 $0.01394
Sonnet 5 $0.00000 $0.00558
Haiku 4.5 $0.00000 $0.00279

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

Security

Grade C, and why

dig scanned grade C with 1 finding 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.

Tells the agent never to refusehighAnti-refusal

Suppressing the ability to decline removes a core safety control; a later harmful request then succeeds.

If the knowledge graph is behind HEAD (detected in Step 1), prefix findings with a caveat and suggest running `/planning-with-james:update-knowledge` after exploring. Do not refuse to answer -- stale knowledge is still b
skills/dig/SKILL.md · 223 lines

How it starts

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

Query the Knowledge Graph

NON-NEGOTIABLE: ALL PATHS ARE RELATIVE TO THE REPO ROOT All .claude/planning-with-james/ paths in this skill are relative to the current working directory (the repo you're working in), NOT ~/.claude/. The knowledge graph lives inside the project, not in your home directory. If you're unsure, run pwd to confirm you're in the repo root.

NON-NEGOTIABLE: THIS SKILL ONLY READS THE KNOWLEDGE GRAPH, NEVER UPDATES IT If the knowledge graph is missing or stale, inform the user and suggest they run /planning-with-james:create-knowledge or /planning-with-james:update-knowledge. Do NOT run those skills yourself. Do NOT modify any knowledge files.

NON-NEGOTIABLE: KNOWLEDGE GRAPH IS YOUR PRIMARY SOURCE This skill exists because the knowledge graph already contains deep analysis of module boundaries, key files, public interfaces, internal patterns, cross-module dependencies, and documented gotchas. You MUST answer from the knowledge graph first. Only fall back to source code when the knowledge graph has an explicit gap.

This is a stateless, lightweight skill. No phases, no state files, no registry entries. Answer the user's question and offer to save findings. That's it.


Step 1: Verify Knowledge Graph Exists

Read .claude/planning-with-james/knowledge/_overview.md.

  • If missing: Tell the user there is no knowledge graph for this repo. Suggest running /planning-with-james:create-knowledge first. Stop here.
  • If present: Check the last_commit in the frontmatter. Compare it to the current HEAD (git rev-parse HEAD). If they differ, note this as a caveat: "The knowledge graph was last updated at commit {hash}. There have been changes since. Findings may not reflect recent code." Continue.

Step 2: Handle Empty Arguments

If $ARGUMENTS is empty or blank, ask the user what they want to explore using AskUserQuestion:

Question: "What do you want to explore? You can ask about how something works, what would be affected by a change, trace a flow through the system, or review your current diff."

Read the full file on GitHub · 223 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 · 223 lines · 0 tokens per session scan C 0a034b548f3c

Subscribe to this mod's changes

dig is a skill published in the GitHub repository jameslowman/planning-with-james (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,789 tokens. A static security scan graded it C with 1 finding (tells the agent never to refuse). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.