Skip to main content
skill CX Codex

thinking-map-territory — Claude Code skill: verify code, not the map

The skill makes the agent check live code or data whenever a doc, test, metric or assumption disagrees with observed behavior.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add tjboudreaux/cc-thinking-skills --skill thinking-map-territory -a claude-code
Open on GitHub

What thinking-map-territory does

Docs, tests, diagrams, comments and metrics are maps. Running code and actual data are the territory. When the two disagree, this skill verifies territory and updates the model instead of forcing reality to match the description.

The procedure has six steps. The agent names the map first — the exact doc, test, metric or assumption, quoted rather than paraphrased. Then it names the territory check that would prove or disprove the claim, confirms where the map came from and how fresh it is, and observes the territory: reads the code path, runs it, queries real data or reproduces the behavior. Finally it records the delta and decides what to fix, the code or the map. Output follows a fixed template with Map, Territory check, Observation, Delta, Updated model, Action and Uncovered fields.

Skip it when the map is the artifact you were asked to edit — a doc, diagram or spec. Also skip when the map is generative and no drift is claimed, as with codegen types. If the mismatch cannot change the decision, note it and move on. Once territory is confirmed and you have competing causal hypotheses, the author points to scientific-method; for exploit construction, to red-team.

What it helps with

  • work out why tests pass but production behavior is wrong
  • check a claim about the system that rests on a summary, not the code
  • tell whether a schema or metric is stale after a config change
  • find code paths no map covers
  • stop theorizing before looking at what actually happens

Example prompts for the agent

  • the service behavior doesn't match the README — verify the territory
  • tests are green but manual runs fail, walk through the skill steps
  • before explaining the cause, inspect the live code and data

How to install thinking-map-territory

1Skills CLI (Vercel)

npx skills add tjboudreaux/cc-thinking-skills --skill thinking-map-territory -a claude-code

2Manually: put the files in place

~/.claude/skills/thinking-map-territory/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/thinking-map-territory/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about thinking-map-territory

How do I install thinking-map-territory in Claude?

Run npx skills add tjboudreaux/cc-thinking-skills --skill thinking-map-territory -a claude-code. The skill lands in ~/.claude/skills/thinking-map-territory/SKILL.md.

What does thinking-map-territory do?

When a claim, doc, test or metric conflicts with observed behavior, the skill turns the agent from theory toward verifying live code or data. Territory overrules the map.

How is it different from scientific-method?

thinking-map-territory only settles model-versus-observation conflicts. Once territory is confirmed and competing causal hypotheses appear, the author recommends switching to scientific-method.

Source text

SKILL.md · MIT
---
name: thinking-map-territory
description: When a claim, doc, test, metric, or assumption conflicts with observed behavior, stop theorizing from the map and verify the live code or data; let territory overrule.
disable-model-invocation: true
---

# Map Territory

Docs, tests, diagrams, metrics, comments, and mental models are maps. Running code and actual data are the territory. When they disagree, verify territory and update the model — never force reality to match the description.

## When to Use

- Observed behavior contradicts a doc, test expectation, diagram, comment, dashboard, or prior assumption.
- A claim about the system rests on a secondary source rather than current code or data.
- Tests pass but production or manual behavior is wrong.
- You are about to theorize why something happens before inspecting what happens.
- A decision depends on whether a model, schema, or metric is still current.

## When NOT to Use

- The map is the artifact you are asked to edit (doc, diagram, spec) — that artifact is the task territory.
- Same path already verified this session — reuse that observation.
- Map is authoritative and generative (codegen types, derived schema) with no claimed drift.
- The mismatch cannot change the decision — note and move on.
- Competing causal hypotheses after territory is confirmed — switch to scientific-method.
- Security exploit construction — use red-team; this skill only settles model-versus-observation.

## Procedure

1. **Name the map.** State the exact representation trusted: which doc, test, metric, diagram, comment, or assumption. Quote the claim, not a paraphrase.
2. **Name the territory check.** Specify the observation that would prove or disprove the claim: code path, runtime value, query, reproduction, recent change, or live metric.
3. **Verify source and freshness.** Confirm origin of the map (author, generator, last update) and whether it could be stale relative to deploy, config, or data change. Prefer primary current sources over summaries.
4. **Observe the territory.** Read the real code path, run or instrument it, query real data, or reproduce the behavior. Do not predict from signatures or names alone.
5. **Record the delta and update.** If territory contradicts the map, territory wins for shipped behavior. Document the gap, revise the model, then decide the fix (code, map, or both). Note unmapped paths — likely next failure sites.
6. **Stop when settled.** Once the claim is confirmed or overturned with a concrete observation, stop re-checking the same path.

## Output

```text
Map: <claim + source + freshness>
Territory check: <what was inspected/run/queried>
Observation: <concrete result, not interpretation>
Delta: <aligned | map wrong | territory incomplete>
Updated model: <corrected understanding>
Action: <fix code | update map | no decision impact>
Uncovered: <paths no map covers>
```

## Verification

- Falsify if you reasoned from the map without a territory observation, trusted a stale secondary source, or forced code to match a wrong doc without checking either.
- Stop when the contradiction is resolved or irrelevant to the decision.
- Over-application guard: do not re-verify the whole system when editing the map, when the map is the generative source of truth, or when the gap cannot change the next action.

© tjboudreaux · MIT · tjboudreaux/cc-thinking-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set27

thinking-jobs-to-be-done Works out the progress a user hires a product for, then ranks features by it. Useful when you cannot tell what to cut and what to grow. CX Codex +1 568installs thinking-cynefin Sorts a problem into a Cynefin domain by cause and effect, then names the response mode: runbook, analysis, probe or stabilize. Useful when a method keeps failing. CX Codex +1 567installs thinking-bounded-rationality A skill that halts a search at the first option clearing a threshold you set beforehand, instead of comparing forever. CX Codex +1 563installs thinking-model-combination A skill that sequences 2–3 mental models with named roles when one model leaves a blind spot. Built for multi-domain decisions. CX Codex +1 563installs thinking-thought-experiment A skill for when a real test is too rare, large or irreversible: the agent runs one counterfactual with an isolated variable and bounds what the result implies. CX Codex +1 560installs thinking-effectuation A skill for decisions under genuine uncertainty: inventory your means, then take one step inside an affordable-loss cap. Useful when forecasts can't be trusted. CX Codex +1 556installs thinking-kepner-tregoe A skill for narrowing a defect with IS/IS-NOT analysis and for picking between options with MUST screening, weighted WANTs and downside checks. CX Codex +1 557installs thinking-lindy-effect A skill that turns a technology's age into an argument for the proven option. Useful when choosing a language, framework or database for the long run. CX Codex +1 553installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor