Official agent skill

Code Design Rationale Investigator

by cursor in cursor/plugins

Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

OfficialNo licenceAuto-check passedDevelopment

Install Code Design Rationale Investigator

skills CLI
$ npx skills add cursor/plugins --skill why -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install cursor/plugins why --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/cursor/plugins.git skills-src && mkdir -p .claude/skills && cp -r skills-src/pstack/skills/why .claude/skills/why && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
why
GitHub stars
10k
Used in
9 other repos
Token cost
~2.6k tokens
SKILL.md length
1,333 words
Files
13 (incl. references)
Skills in repo
99
Repo updated
First seen
Licence
None found

At a glance

Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs.

  • Works in 5 steps: Understand the Target and the Question → Establish the Code Anchor → Spawn Parallel Investigators (default… → …
  • Asking why a function or module was built a certain way
  • SKILL.md covers Operating Posture, Step 1. Understand the Target…, Step 2. Establish the Code… and Step 3. Spawn Parallel…, plus 5 more sections
  • Calls git and gh

What it does

The why skill answers what forces led to a piece of code, as a companion to a separate how skill that explains what the code does. It first pins down the target and the question, makes a best guess from open files and recent edits when the request is vague, and anchors the work in file paths, key symbols, recent commits from `git blame` and pull request numbers taken from merge commits.

It then discovers which MCP servers are available and starts parallel investigators across evidence categories: source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking and a product analytics warehouse. The bundle has playbooks for code archaeology, incident postmortems, Databricks, Datadog, Linear, Notion, Sentry and Slack, plus prompts for the investigators and the synthesizer.

A reference on epistemics sets the confidence framework, so the final answer separates what is known from what is inferred. Subagent models are picked from role lines in a `pstack-models.mdc` rule, with defaults when the rule is missing.

When your agent uses it

  • Asking why a function or module was built a certain way
  • Tracing a regression back to the decision that introduced it
  • Explaining a threshold or limit using the data that justified it
  • Preparing a postmortem or design-history summary with cited sources

Example prompts

  • “Why does the billing service retry three times before failing a charge?”
  • “Look into why we moved the session cache out of the API layer and cite the PRs.”
  • “Why is the upload limit set where it is? Check the issues and chat history.”

Requirements

  • A Git repository with the GitHub CLI for pull request details
  • MCP servers for any trackers, chat or observability tools you want searched

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Understand the Target and the Question
  2. Establish the Code Anchor
  3. Spawn Parallel Investigators (default posture)
  4. Synthesize
  5. Present

What it can do on your machine

Read from SKILL.md and the folder at commit 9f451cf. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Code Design Rationale Investigator loads about 2.6k tokens when it runs, and up to ~17k if it reads all its reference files. Until then it costs about 106 tokens; SKILL.md has 1,333 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~106
When it runs · the whole SKILL.md, loaded when a task matches
~2.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~17k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

Without a licence we can't republish the file, so here is its outline and opening line. It has 1,333 words (~2,591 tokens).

“Investigate the motivation and intent behind code.”

— opening of SKILL.md by cursor
name
why
disable-model-invocation
true

Read the full SKILL.md on GitHub

Files

SKILL.md and 12 other files (references) in pstack/skills/why of cursor/plugins.

  • SKILL.md
  • references/epistemics.md
  • references/investigator-prompt.md
  • references/source-playbook.md
  • references/sources/code-archaeology.md
  • references/sources/databricks.md
  • references/sources/datadog.md
  • references/sources/incident-postmortem.md
  • references/sources/linear.md
  • references/sources/notion.md
  • references/sources/sentry.md
  • references/sources/slack.md
  • references/synthesizer-prompt.md

Open the folder on GitHubat commit 9f451cf

Used in 9 other repositories

We found 9 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 9 other GitHub owners. This page covers the copy in cursor/plugins, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Code Design Rationale Investigator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Code Design Rationale Investigator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Code Design Rationale Investigator this skillcursor/plugins10k9 repos~2.6kAutomated safety check: PassNone
Production Error Huntdifferent-ai/openwork24k—~803Automated safety check: PassCustom licence
Create Pull Request with Work Item IDmakeplane/plane60k—~824Automated safety check: PassAGPL-3.0
Public Repo Guardheptameta/heptabase-cli-skills155—~1.2kAutomated safety check: WarnMIT
Fix Sentry Issuesbrianlovin/agent-config3751 repos~1.2kAutomated safety check: PassNone
Targeted Emergency Bug FixVeryGoodOpenSource/vgv-wingspan108—~1.9kAutomated safety check: PassMIT

Similar skills

  • Production Error Hunt

    different-ai/openwork

    Traces an opaque production error in an OpenWork build to its cause using local server logs and Sentry, names the regressing PR and files a report.

    24k GitHub stars~803 tokensUpdated today
    DevelopmentAuto-check passed
  • Opens a pull request for the current branch using the repo's template, a work item ID in the title and a description filled in from the actual diff.

    60k GitHub stars~824 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Public Repo Guard

    heptameta/heptabase-cli-skills

    This repo (heptabase-cli-skills) is PUBLIC — everything committed is visible to the world and permanent in git history.

    155 GitHub stars~1.2k tokensUpdated 2 days ago
    DevelopmentAuto-check: warnings
  • Fix Sentry Issues

    brianlovin/agent-config

    Use Sentry MCP to discover, triage, and fix production issues with root-cause analysis.

    375 GitHub starsUsed in 1 repo~1.2k tokens
    DevelopmentAuto-check passed
  • Targeted Emergency Bug Fix

    VeryGoodOpenSource/vgv-wingspan

    Applies a minimal fix to an emergency bug through triage, root-cause location, a hotfix branch and a blast-radius check, with tests and review still required.

    108 GitHub stars~1.9k tokensUpdated 7 days ago
    DevelopmentAuto-check passed
  • Git Investigate

    sd0xdev/sd0x-harness

    Git history investigation. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~634 tokensUpdated yesterday
    DevelopmentAuto-check passed

More from cursor/plugins

All 99 skills in this repo
  • Official

    Keeps a TSV decision log for long or unattended agent runs, one row per decision with what, why, evidence and result, so a reviewer can check the work later.

    10k GitHub starsUsed in 9 repos~1.6k tokens
    Auto-check passed
  • Official

    Starts three parallel reviewer subagents over the current conversation transcript, then turns their findings into concrete edits to existing skills.

    10k GitHub starsUsed in 5 repos~1.2k tokens
    Auto-check passed
  • Official

    Applies four layers of technical-writing rules to docs, RFCs, readmes, PR descriptions and commit messages so a tired engineer follows them on the first read.

    10k GitHub starsUsed in 10 repos~2.4k tokens
    Auto-check passed
  • Advisor Mode

    cursor/plugins

    Official

    Adds a second, stronger model that the main agent consults before major decisions, when stuck and before finishing, controlled by /advisor commands.

    10k GitHub stars~2.6k tokensUpdated today
    Auto-check: notes
  • Official

    Prepare PRs for review by cleaning noisy history, improving PR descriptions, and adding reviewer guidance without changing code behavior.

    10k GitHub starsUsed in 3 repos~569 tokens
    Auto-check passed
  • Build Figma

    cursor/plugins

    Official

    Guides an agent through turning a Figma node into production UI with the repo's own components, then checks the result visually before finishing.

    10k GitHub stars~961 tokensUpdated today
    Auto-check passed

Questions about Code Design Rationale Investigator

What does Code Design Rationale Investigator do?

Digs into why code is shaped the way it is by checking git history, pull requests and connected tools in parallel, then reporting a cited read on the tradeoffs. The why skill answers what forces led to a piece of code, as a companion to a separate how skill that explains what the code does. It first pins down the target and the question, makes a best guess from open files and recent edits when the request is vague, and anchors the work in file paths, key symbols, recent commits from `git blame` and pull request numbers taken from merge commits.

When should I use Code Design Rationale Investigator?

Code Design Rationale Investigator fits situations like: asking why a function or module was built a certain way; tracing a regression back to the decision that introduced it; explaining a threshold or limit using the data that justified it; preparing a postmortem or design-history summary with cited sources.

How do I install Code Design Rationale Investigator in Claude Code?

Run `npx skills add cursor/plugins --skill why -a claude-code`. Or copy the skill folder (pstack/skills/why in cursor/plugins) into .claude/skills/why in your project. Claude Code loads it when a task matches its description.

How do I install Code Design Rationale Investigator in Codex?

Run `npx skills add cursor/plugins --skill why -a codex`. Or copy the skill folder (pstack/skills/why in cursor/plugins) into .agents/skills/why in your project. Codex loads it when a task matches its description.

Can I use Code Design Rationale Investigator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add cursor/plugins --skill why -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/why, .gemini/skills/why, .github/skills/why and .opencode/skills/why in your project.

What does Code Design Rationale Investigator need to run?

Going by SKILL.md and its folder, Code Design Rationale Investigator needs the command-line tools its instructions call (git and gh). Our summary lists: A Git repository with the GitHub CLI for pull request details; MCP servers for any trackers, chat or observability tools you want searched.

Does Code Design Rationale Investigator access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Code Design Rationale Investigator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Code Design Rationale Investigator use?

No licence was found for Code Design Rationale Investigator or its repository. Without one, default copyright applies: ask the author before reusing or redistributing it.

How many tokens does Code Design Rationale Investigator use?

About 2.6k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Code Design Rationale Investigator?

Skills that share tags, products or a category with Code Design Rationale Investigator: Production Error Hunt (different-ai/openwork, 24k stars), Create Pull Request with Work Item ID (makeplane/plane, 60k stars), Public Repo Guard (heptameta/heptabase-cli-skills, 155 stars) and Fix Sentry Issues (brianlovin/agent-config, 375 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Code Design Rationale Investigator?

cursor (a GitHub organization, an official publisher) maintains it in cursor/plugins, which has 10,130 GitHub stars. The repository holds 99 skills in this directory. The repository was last updated on October 6, 2026.

Source: cursor/plugins on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.