Skip to content
Skill

Map instrument narrow

Guides an agent to map unfamiliar code and instrument it before proposing a root-cause fix

Map instrument narrow is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
10
Last commit
License
MIT
Listing updated

Similar skills

About Map instrument narrow

This skill sets a three-phase debugging method for an agent: first map the architecture of the system under investigation, including library internals and async boundaries, then add broad diagnostic logging at state boundaries, and finally narrow down to the single function that mutates state. The agent writes an artifact at each gate and is told not to write fix code until data names a culprit.

The mapping phase calls for parallel research on source code, git state, environment readiness and inherited claims from earlier notes or handoff documents. Instrumentation is treated as disposable and kept separate from any eventual fix, and the skill limits itself to a small number of test runs per phase.

When one confirmed cause points to a deeper or sibling cause, the skill describes a root-cause tree that is worked through as fresh sub-investigations, with a stopping rule at a fixed depth or when scope grows too large. It expects a test scenario that can be run repeatedly, a codebase the agent can read, and TypeScript or similar logging in its examples.

When your agent uses it

Use when debugging requires understanding unfamiliar system internals before instrumentation will be interpretable — especially async execution, third-party library code, state mutations with no obvious code path between cause and effect, prior failed fix attempts, OR any diagnostic friction in a canonical-sdlc run

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (10 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/map-instrument-narrow to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/chrisalehman/bionic.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/map-instrument-narrow &&
cp -R "$tmp/skills/map-instrument-narrow" ~/.claude/skills/map-instrument-narrow &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/map-instrument-narrow inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/map-instrument-narrow to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/chrisalehman/bionic.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/map-instrument-narrow &&
cp -R "$tmp/skills/map-instrument-narrow" ~/.agents/skills/map-instrument-narrow &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/map-instrument-narrow inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/map-instrument-narrow to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/chrisalehman/bionic.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/map-instrument-narrow &&
cp -R "$tmp/skills/map-instrument-narrow" ~/.cursor/skills/map-instrument-narrow &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/map-instrument-narrow inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/chrisalehman/bionic.git --path skills/map-instrument-narrow

Or copy the folder to ~/.gemini/skills/map-instrument-narrow yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/map-instrument-narrow:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/chrisalehman/bionic.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/map-instrument-narrow &&
cp -R "$tmp/skills/map-instrument-narrow" ~/.copilot/skills/map-instrument-narrow &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/map-instrument-narrow inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/chrisalehman/bionic.git

Then copy bionic/skills/map-instrument-narrow into your agent's skills folder as map-instrument-narrow. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Three-phase debugging gates
Requires a written architecture map, broad state capture and a targeted per-call narrowing before any fix is attempted.
Architecture mapping
Directs research into call chains, async boundaries and state ownership across your code and third-party libraries.
Diagnostic logging guidance
Shows where to place before and after probes at state boundaries and how to read the captured values.
Root-cause tree tracking
Records each cause as a node with evidence and parent-child links so deeper or sibling causes are investigated separately.
Inherited claim verification
Checks handoff notes and prior agent assertions against the current repository state before relying on them.

Good for

  • Find why a state value is correct at one point and wrong later in an async flow
  • Debug a failing test where a previous fix attempt did not address the cause
  • Trace a bug that runs through a third-party library's internal code
  • Work out which function silently changes state between two known points

Map instrument narrow FAQ

When does Map instrument narrow trigger?

It applies when debugging needs an understanding of unfamiliar internals before instrumentation is useful, especially with async code, third-party libraries, unexplained state changes, earlier failed fixes, or diagnostic friction in a canonical-sdlc run.

Does Map instrument narrow write fixes for me?

No. It forbids fix code during mapping and instrumentation and allows it only after data names a single culprit.

Should the diagnostic logging be kept?

No. The skill treats instrumentation as disposable and says it should be removed or committed separately from the fix, unless the user explicitly asks for it to ship.

How many test runs does Map instrument narrow expect?

It describes one test run for the broad capture and one for the targeted narrowing, and suggests returning to the mapping phase if more than two runs are needed.

How do I install Map instrument narrow in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/map-instrument-narrow to use it in all your projects, or to .claude/skills/map-instrument-narrow in one project.

Does Map instrument narrow run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Map instrument narrow?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Map instrument narrow?

The closest alternatives to Map instrument narrow are Principle fix root causes, Debug hypothesis, Diagnostic reasoning, Diagnosing bugs and Agent architecture audit.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from chrisalehman/bionic

  1. Builds Excalidraw diagram JSON files that visually argue workflows, architectures

    • Open source
    • 10 GitHub stars
    • Design and media
  2. Drives a real browser to check UI flows, console errors and network failures for an agent

    • Open source
    • 10 GitHub stars
    • Browser automation
  3. Routes large engineering efforts through SDLC steps, gating each commit on current-step

    • Open source
    • 10 GitHub stars
    • Developer tools
  4. Puts agent decisions to the user in one fixed, reviewable shape

    • Open source
    • 10 GitHub stars
    • Developer tools
  5. Packages an in-progress session into a resumable handoff file for a fresh agent

    • Open source
    • 10 GitHub stars
    • Developer tools
  6. Gives the agent a status card for a bound plan: pace, risks, and what needs your call

    • Open source
    • 10 GitHub stars
    • Developer tools