painhardcore/pstack

how

Explain how a subsystem works, trace a runtime flow, or determine where code and ownership belong before making a change.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/painhardcore/pstack --skill how

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

How

Build a working mental model from the code. Explain entry points, data flow, ownership, boundaries, and non-obvious behavior. Use why when the user wants historical motivation.

Choose the mode

  • Explain. Trace and explain the current system.
  • Critique. Explain first, then identify architectural problems and practical improvements.

Treat one module or symbol as simple. Treat a flow across several modules or services as complex.

Explore

For a simple question, inspect and explain inline.

For a complex question, divide the system into two to four non-overlapping slices. If the host supports subagents and the user permits them, assign each slice to a read-only subagent using the parent model. Use different available models only for an explicitly requested multi-model critique. If delegation is unavailable or forbidden, inspect the slices inline in the same order.

Each slice must:

  1. Find the real entry point.
  2. Trace callers, callees, state, and types from input to output.
  3. Read code instead of inferring behavior from file names.
  4. Record specific files and symbols.
  5. Note behavior a newcomer would probably misunderstand.

Use references/explorer-prompt.md for delegated exploration and references/explainer-prompt.md for synthesis.

Explain

Reconcile the slices into one account. Resolve contradictions by reading the code. Do not paste raw exploration reports.

Use only the sections the question needs:

  • Overview. What the subsystem does and why it exists.
  • Key concepts. The small set of types, services, or abstractions needed to follow the flow.
  • How it works. The trigger, ordered steps, decisions, state changes, and output.
  • Where things live. The files and symbols a maintainer should open first.
  • Gotchas. Hidden state, surprising coupling, or edge cases.

Critique

Explain the system before judging it. When permitted, ask two or more read-only critics to assess the same explanation and source files independently. Prefer different available model families when the host supports model selection. Otherwise perform one inline critique against the same rubric.

Read references/critique-rubric.md and references/critic-prompt.md. Classify each finding:

  • Act on. A current correctness, security, or maintainability problem.
  • Consider. A real concern whose value is uncertain.
  • Noted. Valid but low priority.
  • Dismissed. Incorrect, context-free, or only stylistic.

Present the explanation first. Then present the critique and cite the files that support each finding.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills