Community程式設計與開發github.com

alfathafp/portofolio-web-design

在每個非平凡的決策被確定前,透過全新背景的對抗性審查來挑戰它。當你想要每個假設在繼續之前都被徹底質疑、當壓力測試一個計畫中隱藏的失敗模式、當正確性比速度更重要、當你在不熟悉的程式碼中工作、當風險很高(生產環境驗證、安全相關邏輯、高風險遷移、不可逆操作),或是任何時候一個自信的輸出若能現在驗證會比日後除錯更便宜時,請使用此技能。

portofolio-web-design 是什麼?

這是一個名為「懷疑驅動開發」的技能,旨在應對開發過程中因長時間會話而產生的隱含假設。它強制在每個非平凡決策前,引入一個偏重於「反駁」而非「贊同」的全新背景審查者。此技能適用於如 Claude Code 等主要會話協調器,不應被添加到子代理的個人設定中,以避免違反不允許代理呼叫其他代理的規則。其運作流程包含五個步驟:明確陳述決策與理由(CLAIM)、提取最小可審查的工件與合約(EXTRACT)、使用對抗性提示叫用全新背景審查者(DOUBT)、分類審查發現並決定行動(RECONCILE),以及在達到停止條件時結束(STOP)。此外,技能還內建了跨模型審查的升級機制,在互動式會話中,必須在單一模型審查後主動詢問使用者是否要取得另一個不同架構模型的第二意見,並嚴格遵循驗證工具可用性與使用者授權的流程。

相容平台✓Claude Code✓Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/alfathafp/portofolio-web-design/tree/HEAD/.agents/skills/doubt-driven-development

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

懷疑驅動開發

概覽

一個自信的答案並不代表是正確的答案。長時間的會話會悄然積累上下文,在無人注意到時將假設轉變為「事實」。懷疑驅動開發是一門紀律,在每個非平凡的輸出被確定之前,強制引入一個全新背景的審查者——其偏見在於推翻而非贊同,然後才能讓該輸出成立。

這不是 /review。/review 是對已完成工件的最終判決。這是一種進行中的姿態:在修正方向仍然低成本時,對非平凡的決策進行交叉審查。

何時使用

當一個決策至少符合以下之一時,即為非平凡:

  • 它引入或修改了分支邏輯
  • 它跨越了模組或服務邊界
  • 它斷言了型別系統或編譯器無法驗證的屬性(執行緒安全、冪等性、順序、不變量)
  • 它的正確性取決於未來的讀者無法看見的上下文
  • 它的影響範圍是不可逆的(生產環境部署、資料遷移、公開 API 變更)

在以下情況應用此技能:

  • 即將在不確定性下做出架構決策時
  • 即將提交非平凡的程式碼時
  • 即將聲明一個非顯而易見的事實時(「這是安全的」、「這能擴展」、「這符合規格」)
  • 在你不完全理解的程式碼中工作時

何時不使用:

  • 機械性操作(重新命名、格式化、移動檔案)
  • 遵循清晰、明確的使用者指令
  • 閱讀或總結現有程式碼
  • 一行變更且正確性顯而易見
  • 純工具操作(執行測試、列出檔案)
  • 使用者已明確要求速度勝於驗證

如果你對每個按鍵都懷疑,你將無法交付任何東西。此技能僅適用於上述定義的非平凡決策。

載入限制

此技能專為主要會話協調器設計,其中的步驟 3(懷疑,詳見下文)可以產生一個全新背景的審查者。

  • 請勿將此技能新增至 persona 的 skills: frontmatter 中。 一個遵循步驟 3 的 persona 將會產生另一個 persona——這正是 ../../references/orchestration-patterns.md(「persona 不能呼叫其他 persona」)中明令禁止的編排反模式。
  • 如果你發現自己在子代理上下文中應用此技能(在該上下文中 Claude Code 禁止巢狀子代理產生):偏好的做法是向使用者表明懷疑驅動開發無法在巢狀環境中執行,並讓主要會話處理它。作為最後手段,存在一個降級的自我質詢備援方案——將 ARTIFACT + CONTRACT 重寫為一個全新的自我提示,並與你先前的推理建立一個硬性的心理分隔,然後執行步驟 1-5。這不是全新背景的審查(你攜帶著自己的上下文),因此將結果標記為降級,並在使用者可聯繫到時優先考慮升級。

流程

應用此技能時,請複製此檢查清單:

懷疑循環:
- [ ] 步驟 1:CLAIM — 寫下主張 + 它為什麼重要
- [ ] 步驟 2:EXTRACT — 隔離工件 + 合約,剝離推理
- [ ] 步驟 3:DOUBT — 使用對抗性提示叫用全新背景審查者
- [ ] 步驟 4:RECONCILE — 針對工件文本對每個發現進行分類
- [ ] 步驟 5:STOP — 滿足停止條件(瑣碎發現、3 個循環或使用者覆寫)

步驟 1:CLAIM — 明確陳述

用兩三行命名該決策:

CLAIM: 「新的快取層在規格中描述的讀取密集型工作負載下是執行緒安全的。」
WHY THIS MATTERS: 此處的競爭條件會損壞用戶資料,且在 QA 中難以檢測。

如果你無法如此簡潔地寫出主張,那麼你擁有的是一種模糊的感覺,而不是一個決策。在審查之前先將其明確化。

步驟 2:EXTRACT — 最小的可審查單元

一個全新背景的審查者需要工件和合約,而不是過程。

  • 程式碼:diff 或函式——而不是整個檔案
  • 決策:用 3-5 句話描述的提案加上它必須滿足的約束條件
  • 斷言:主張加上按理支持它的證據(與步驟 1 的 CLAIM 區塊保持區別,後者是協調器正在審查的假設)

剝離你的推理。如果你交出結論,你將得到對你結論的驗證。該單元必須足夠小,以至於審查者可以在一次閱讀中將其牢記於心——如果是一個 500 行的 PR,請先分解。

步驟 3:DOUBT — 叫用全新背景審查者

審查者的提示必須是對抗性的。框架決定了答案。

對抗性審查。找出這個工件有什麼問題。
假設作者過於自信。尋找:
- 未陳述的假設
- 未處理的邊界情況
- 隱藏的耦合或共享狀態
- 合約可能被違反的方式
- 可能被違反的現有慣例
- 在意外輸入下的失敗模式

請勿驗證。請勿總結。找出問題,或者在徹底檢查後明確說明你找不到任何問題。

ARTIFACT: <貼上工件>
CONTRACT: <貼上合約>

僅傳遞 ARTIFACT + CONTRACT。不要傳遞 CLAIM。 將你的結論交給審查者會使其傾向於同意。審查者必須獨立判斷工件是否滿足合約。

在 Claude Code 中,agents/ 中的基於角色的審查者預設從隔離的上下文開始,因此可以在這裡使用——請參閱 agents/ 以獲取名單和按領域的匹配。

上述對抗性提示優先於 persona 的預設回應格式。 像 code-reviewer 這樣的 persona 被設計為產生同時包含優點和缺點的平衡判決;懷疑驅動開發需要僅指出問題的輸出。將對抗性提示逐字貼上到叫用中,以覆寫 persona 的預設值。如果無法乾淨地覆寫 persona 的回應格式,則回退到帶有對抗性提示的通用子代理。

跨模型升級

單一模型審查者與原始作者共享盲點——一個更冷靜、不同架構的模型可以抓住它們。懷疑驅動開發在非平凡決策中已經是選擇加入的,因此在該範圍內提供跨模型審查是技能價值的一部分,而不是可選的摩擦。

互動式會話:總是提供選擇。切勿默默地跳過。

步驟 1:詢問使用者

在上述步驟 3 的單一模型審查完成後,但在 RECONCILE 之前,暫停並詢問:

「單一模型審查完成。想要一個跨模型的第二意見嗎?選項:Gemini CLI、Codex CLI、手動外部審查(您自己貼到其他地方),或跳過。」

這個問題在每個互動式懷疑循環中都是強制性的——即使是那些感覺風險較低的工件。使用者——而不是代理——決定成本是否值得。代理的工作是呈現這個選擇。

步驟 2:如果使用者選擇了 CLI——驗證,然後叫用

  1. 檢查工具在 PATH 中(which gemini、which codex)。
  2. 在傳遞完整提示之前測試它是否可用(gemini --version 或等效命令)——一個過時或損壞的二進制檔可能通過 which 檢查,但在實際輸入上會失敗。
  3. 確認與使用者的確切叫用方式,包括必需的標誌、驗證和環境變數(例如 API 金鑰)。實作方式各不相同;切勿假設。
  4. 僅傳遞 ARTIFACT + CONTRACT + 對抗性提示。不帶會話上下文,不帶 CLAIM。
  5. 注意 shell 跳脫。如果工件包含引號、$(...) 或反引號,首選使用 stdin(echo … | gemini)或 heredoc,而不是內聯的 `-p

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

alfathafp/portofolio-web-design

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).

alfathafp/portofolio-web-design

Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured.

alfathafp/portofolio-web-design

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

alfathafp/portofolio-web-design

Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline.

alfathafp/portofolio-web-design

Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.

alfathafp/portofolio-web-design

Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read.

alfathafp/portofolio-web-design

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

alfathafp/portofolio-web-design

Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing.

alfathafp/portofolio-web-design

Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".

alfathafp/portofolio-web-design

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

alfathafp/portofolio-web-design

Use when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.

alfathafp/portofolio-web-design

Use when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies

alfathafp/portofolio-web-design

Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase.

alfathafp/portofolio-web-design

Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available

alfathafp/portofolio-web-design

Use when implementation is complete, all tests pass, and you need to decide how to integrate the work

alfathafp/portofolio-web-design

Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated.

alfathafp/portofolio-web-design

Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog.

alfathafp/portofolio-web-design

Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan".

alfathafp/portofolio-web-design

Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step.

alfathafp/portofolio-web-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

相關技能