AGENT SKILL

principle-fix-root-causes

Apply when debugging. Trace each symptom to its root cause and fix it there; reproduce first, ask why until you reach it, resist nil-check guards that silence crashes.

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

01 前言 Front Matter

name
principle-fix-root-causes
description
Apply when debugging. Trace each symptom to its root cause and fix it there; reproduce first, ask why until you reach it, resist nil-check guards that silence crashes.
user-invocable
false

03 SKILL.md 正文

Fix Root Causes

When debugging, do not fix symptoms. Trace every problem to its root cause and fix it there.

Why: Symptom fixes accumulate. Each workaround makes the system harder to reason about, and the real bug remains. Root-cause fixes are slower upfront but reduce total debugging time.

Pattern:

  • Reproduce first
  • Ask "why" until you hit the root cause
  • Do not add guards (adding a nil check to silence a crash is a symptom fix)
  • If a workaround needs a paragraph-long comment to justify it, the code is wrong (fix the code, not the comment)
  • Check for the pattern, not just the instance (grep for the same pattern, fix all instances)
  • When stuck, instrument. Don't guess (add logging, read the actual error)

Restart bugs: suspect state before code

When something "fails after restart," suspect stale persistent state first: config files, caches, lock files, serialized state. If clearing a state file restores behavior, prioritize state validation as the fix.

04 同仓库更多 Skills

patinaproject
patinaproject/skills

code-review

Review the changes since a fixed point (commit, branch, tag, or merge-base) along five axes: Standards (does the code follow this repo's documented coding standards?), Spec (does the code match what the originating issue/spec asked for?), Evidence (does each claim in the pull request have evidence that shows it?), Bugs (does the changed code have logic errors, unhandled states, races, or regressions?), and Security (does the change open injection, auth, secret, input, or CI workflow holes?). Runs the reviews in parallel sub-agents, tags every finding Important, Nit, or Pre-existing, and reports them side by side with what blocks merge. Given an earlier reviewed head and its findings, it reviews only the newer commits, rechecks the earlier findings, and never repeats one. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".

★ 1
patinaproject
patinaproject/skills

writing-for-pstack

Write or tighten an operator prompt for a patina-mode run. Use when the operator asks to write, revise, or review a prompt that will be passed to patina-mode.

内容创作者写作与文案
★ 1
patinaproject
patinaproject/skills

writing-for-agents

Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.

内容创作者写作与文案
★ 1
patinaproject
patinaproject/skills

wizard

Generate an interactive bash wizard that walks a human through steps only they can perform. Use when provisioning infrastructure, setting up credentials or CI secrets, walking an unfamiliar third-party dashboard, or running a one-off migration or cutover. Don't invoke this for steps the agent can perform itself.

★ 1
patinaproject
patinaproject/skills

wayfinder

Plan a huge chunk of work (more than one agent session can hold) as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.

★ 1
patinaproject
patinaproject/skills

wait-what

Stop. That last message did not land: re-pitch it.

★ 1