AGENT SKILL

how

Explains how a subsystem, feature flow, or function works and where its logic belongs. Use for code walkthroughs, runtime traces, ownership and layering questions, onboarding mental models, or architectural critique before changing code. Use historical investigation separately when the question is why the design exists.

License 许可
MIT
最近更新
2026-11-03
Stars
★ 1
Forks
0

01 前言 Front Matter

name
how
license
LICENSE
metadata
{ "source": "https://github.com/cursor/plugins/tree/57fc467a229cf2853329f19c9e6a9fd83ddc2ea2/pstack/skills/how", "adapted-for": "claude-code, pi" }
description
Explains how a subsystem, feature flow, or function works and where its logic belongs. Use for code walkthroughs, runtime traces, ownership and layering questions, onboarding mental models, or architectural critique before changing code. Use historical investigation separately when the question is why the design exists.

02 资源文件 4

03 SKILL.md 正文

How

Build a working mental model of code from the implementation itself. Explain enough for a senior engineer to start changing the subsystem without turning the answer into annotated source.

Choose the mode

  • Explain. The default for mechanics, runtime flow, placement, ownership, and layering.
  • Critique. Explain first, then judge architectural problems when the user asks whether the design is sound or how it should improve.

Historical motivation is a different question. Do not infer intent from code shape; use available history sources when the user asks why.

Explain

  1. Lock the question. State the best concrete interpretation when the scope is ambiguous, then proceed without blocking on a reversible assumption.
  2. Size the exploration.
    • Simple: one function, module, adapter, or narrow path. Explore directly in the parent session.
    • Complex: a subsystem spanning several files, packages, or services. Decompose it into distinct angles. The entire request has a default budget of one subagent; delegate at most one independent angle and keep the rest in the parent session.
  3. Trace the code. Start broad with the fff file and content search tools when available (fffind/ffgrep in Pi, the fff MCP tools in Claude Code), otherwise Glob and Grep; then read the top matches. Follow an entry point through callers, callees, data transformations, state transitions, side effects, and boundaries. Read actual definitions and implementations; filenames are clues, not evidence.
  4. Close gaps. Continue until the path from trigger to effect can be described without hand-waving. Name any edge that remains untraced.
  5. Explain. Use the output contract below and cite exact files and symbols. A diagram belongs only where it removes ambiguity.

For a delegated exploration, build the prompt from references/explorer-prompt.md. The parent checks the report against the code and writes the final explanation. Do not pass a subagent summary through unreviewed.

Critique

  1. Complete the explanation first.
  2. Read references/critique-rubric.md.
  3. Review the architecture yourself. For a broad or contested subsystem, use one read-only reviewer with references/critic-prompt.md only if the request has not already spent its default subagent budget. Choose its model by the parent's vendor: Haiku for a Claude parent, Luna (openai-codex/gpt-5.6-luna) for a GPT parent, and the parent's own model otherwise; a model the user requested overrides this. Otherwise the parent performs the critique, or asks before adding a second subagent.
  4. Apply lead judgment. Classify findings as:
    • Act on. A concrete architectural problem worth changing now.
    • Consider. A real tradeoff whose benefit may not justify the cost yet.
    • Noted. Valid context with low current priority.
    • Dismissed. Wrong, stylistic, already constrained, or missing repository context.

Critique is read-only unless the user explicitly asks for implementation.

Output contract

  • Overview. What the subsystem is, what it does, and why a reader should care.
  • Key concepts. Only the types, modules, state, and boundaries needed for the flow.
  • How it works. Trigger-to-effect sequence, data transformations, decisions, and side effects.
  • Where things live. The small file and directory map needed to start work.
  • Gotchas. Non-obvious behavior, lifecycle constraints, hidden coupling, and unresolved gaps.

In critique mode, append the categorized architectural verdict after the explanation. Keep mechanics and historical rationale separate.

04 同仓库更多 Skills

daanqq
daanqq/agent-config

why

Investigates why code, a threshold, guard, workflow, or design decision exists. Use for historical rationale, regressions, postmortems, legacy removal, rejected alternatives, and product or operational constraints. Separates direct evidence from inference and reports unavailable sources. Use how for runtime mechanics.

★ 1
daanqq
daanqq/agent-config

show-me-your-work

Keeps a compact, reviewable TSV decision trail for long-running, multi-phase, delegated, or unattended work. Use when the user will review the work after a pause, when hypotheses or pivots must remain auditable, or when another skill needs a canonical evidence log.

★ 1
daanqq
daanqq/agent-config

frontend-design

Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.

★ 1
daanqq
daanqq/agent-config

background-terminals

Run and manage long-lived shell commands in background terminals. Use for dev servers, watchers, streaming builds, and other commands that should keep running while the agent continues working.

★ 1
daanqq
daanqq/agent-config

vercel-react-best-practices

React and Next.js performance optimization guidelines from Vercel Engineering. This skill should be used when writing, reviewing, or refactoring React/Next.js code to ensure optimal performance patterns. Triggers on tasks involving React components, Next.js pages, data fetching, bundle optimization, or performance improvements.

★ 1
daanqq
daanqq/agent-config

typescript-best-practices

Applies concrete TypeScript type, boundary, API, and test rules when reading, writing, reviewing, or refactoring .ts and .tsx files. Use to model state honestly, remove unchecked casts, derive types from authoritative schemas, and keep external validation at boundaries.

★ 1