본문으로 건너뛰기
Skillpedia
리서치15k · #11003

why

하는 일

스킬은 팀이 쓰는 도구 전반에서 코드와 설계 선택의 이유를 찾습니다. 어떻게 작동하는지뿐 아니라 왜 그렇게 결정되었는지 알아야 하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓설계나 코드 선택이 왜 이루어졌는지 알고 싶을 때.
  • ✓회귀나 과거 장애의 원인을 조사하는 경우.
  • ✓바꾸기 전에 임계값이나 절충안에 대한 근거가 필요할 때.

스킬 링크

https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/why/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/cursor/plugins/blob/main/harness/pstack/claude-code/skills/why/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“우리는 왜 결제를 세 번 재시도할까요? 바꾸기 전에 우리 기록에서 이유를 찾아 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 사용할 수 있는 도구를 찾고, 각 출처에서 증거를 병렬로 검색한 뒤, 인용과 함께 짧은 답을 씁니다. 무엇을 알고 있고 무엇을 추론하는지 분명히 밝힙니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Why

In Claude Code, read the Claude Code adapter once per session before you follow this skill. It maps the Cursor names in pstack skills to Claude Code.

Investigate the motivation and intent behind code. The companion how skill answers what the code does and how it works. why answers what forces led to its shape.

Each spawn below names a role line in the pstack-models.mdc rule and a default. Set model to that line's value, or to the default if the rule or the line is missing. Leave model unset when the value is auto or inherit-parent. If the Task tool rejects a slug, use the default and say so. If it rejects the default, use the closest valid slug of the same family from its error message. Pick each subagent's reasoning level and fast or standard speed for the job, per the Subagents section of the poteto-mode skill.

Every spawn is generalPurpose with readonly: false (agent mode). Do not use readonly/Ask mode. It strips MCP access, which disables the MCP-backed investigators and the synthesizer's citation spot-checks. Investigators still shouldn't write anything.

Operating Posture

Operate as a careful, cautious, and precise investigator. Be honest about what you know vs what you're inferring. Read references/epistemics.md for the full confidence framework and phrasing guide. The synthesizer must follow it.

Step 1. Understand the Target and the Question

The target is usually a chunk of code, a pattern, a feature, or a named design decision. The question is usually a design rationale, a tradeoff, a motivating edge case, an external constraint, dead code, or a broad history sweep.

If the target is vague ("why do we do it this way?" with no clear referent), make your best guess from conversation context (open files, recent edits, cursor location, what was just discussed). State your interpretation briefly so the user can redirect if you're off, then proceed.

Step 2. Establish the Code Anchor

Before spawning investigators, build the seed context inline: file paths and line ranges, key symbols (functions, classes, constants), the last few commits touching the target, PR numbers from merge commits (pattern (#1234) in the subject line), and any linked ticket IDs. Run git blame -L <start>,<end> <file> for last-touch commits, git log --follow -p -- <file> for full history with patches through renames, git log --oneline -20 -- <file> for recent commits with PR numbers visible, and git log -1 --format=%B <commit> to extract PR numbers. Then pull the PR bodies and discussion for any substantive commit: gh pr view <number> --json title,body,author,createdAt,mergedAt,labels,closingIssuesReferences,comments,reviews. This anchor goes to every investigator and to the synthesizer.

Step 3. Spawn Parallel Investigators

Default to the full parallel investigation. The goal is a complete coverage map, not a minimal one. Document the null, don't skip the search.

Discovery

Before spawning investigators, list the available MCPs from the Cursor environment. Use the available-tools map when present. Otherwise inspect the mcps/ directory Cursor exposes for enabled MCP servers.

Map each available MCP to one evidence category:

  1. Source control history
  2. Issue / ticket tracker
  3. Long-form documents
  4. Real-time team chat
  5. Infrastructure observability
  6. Error / exception tracking
  7. Product analytics warehouse

Source control is always available through git and gh. For the other six, classify using the MCP name, server instructions, tool names, and resource descriptors. If an MCP could fit more than one category, choose the one matching its primary evidence. Record ambiguous cases in the coverage map.

Spawn one investigator per category that has a matching MCP, all in a single message so they run concurrently, each owning exactly one tool or MCP. Don't ask one agent to cover multiple MCPs. model: the why investigators line, default grok-4.7-xhigh-fast.

Each investigator's prompt is references/investigator-prompt.md filled in, plus:

  • the category playbook references/sources/<source>.md for the selected MCP, adapted from the examples in references/source-playbook.md
  • references/sources/incident-postmortem.md if the target code looks defensive (null checks, retry logic, timeout handling, rate limiting, feature flags, egress guards, OOM handlers)
  • the code anchor and the user's original question
자주 묻는 질문

어떤 출처를 확인하나요?

소스 관리, 이슈 추적, 긴 문서, 채팅, 모니터링, 오류 추적, 분석 도구 등 연결된 모든 도구를 확인합니다.

얼마나 확신하는지도 말해 주나요?

네. 확신 정도를 나타내는 표현을 유지하므로, 단정하지 않은 주장은 사실이 아니라 발견으로 표시됩니다.

how 스킬과는 어떻게 다른가요?

짝이 되는 how 스킬은 코드가 무엇을 하는지 설명하고, 이 스킬은 코드를 만든 배경과 요인을 설명합니다.

상세 정보

작성자의 원본 설명

Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.

repo: cursor/plugins

인기도

GitHub 스타
15k
순위
#11003
라이선스
—
업데이트
2026. 10. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬