Communitygithub.com

動態工作流模式

為 Claude 動態工作流模式及其他自適應代理工具設計任務級臨時腳手架、評估閘門與可重複使用技能。適用於建立任務級臨時腳手架、添加評估閘門,或從臨時工作中提煉可重複使用的技能。

動態工作流模式 是什麼?

動態工作流模式是一種專門設計給 AI 編碼代理(如 Claude Code、Cursor 等)的技能,其核心目標是將動態、臨時的工作流程轉換為一個有紀律的系統。當一個任務需要自定義循環、評估器、爬蟲、監視器或本地儀表板,且不適合使用靜態命令流時,此技能便會啟用。它提供了一個決策樹和模板,幫助開發者判斷何時應使用「任務級臨時腳本」,何時應將重複出現的模式提煉為「可共享技能」,以及何時應通過「控制面板檢查點」為團隊提供狀態可視性。 此技能強調安全性、可觀測性和團隊協作,要求每個動態工作流都必須包含明確的目標、輸入、輸出、評估閘門(至少一個通過/失敗檢查)和交接工件。它內建了反模式清單,防止開發者使用動態工作流來規避測試或隱藏決策邏輯。該技能支援多種平台(Claude Code、Cursor、Codex 等),並且特別適用於需要外部狀態、佇列、審批或存在安全風險的任務。最終產出包含腳本或技能的路徑、評估命令與結果、控制面板或交接工件路徑,以及下一個可提取候選項。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/dynamic-workflow-mode

在你喜歡的 AI 中提問

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

說明文件

動態工作流模式 是做什麼的?

當編碼代理能夠生成或適配任務級臨時腳本,而不僅僅遵循靜態命令流時,使用此技能。目標是將動態工作流模式轉變為一個有紀律的系統:為一次性工作建立臨時腳本,為重複性工作建立共享技能,並為團隊提供可觀測的控制面板檢查點。

何時啟用

  • 使用者提到動態工作流、自定義腳本、每個任務一個腳本、自適應工作流或 Claude Code 動態工作流模式。
  • 任務需要自訂迴圈、評估器、爬蟲、Fixture 產生器、監視器或本地儀表板。
  • 多個代理需要相同的可重複流程,但該流程尚未被擷取為共享技能。
  • 工作流程需要持久的交接工件、評估證據或合併前的操作員批准。

核心契約

動態工作流模式應僅在該腳本比手動執行相同步驟更便宜且更安全時,才產出任務級臨時腳本。該腳本必須包含:

  • 目標:它擁有和不擁有的成果。
  • 輸入:檔案、URL、提示、資料來源、憑證策略以及使用者提供的限制條件。
  • 輸出:提交、報告、螢幕截圖、狀態檔案或控制面板快照。
  • 評估:至少一個與任務相關的通過/失敗檢查,而不僅是「它執行了」。
  • 交接:一個簡短的工件,告知下一個操作員發生了什麼、什麼被阻塞以及如何繼續。

動態腳本決策樹

  1. 一次性任務:保持內聯。不要發明腳本。
  2. 輸入變化的重複任務:建立任務級臨時腳本,並將其保存在暫存或專案本地工作區中。
  3. 跨團隊或儲存庫的重複任務:將模式提取為共享技能。
  4. 具有外部狀態、佇列或審批的任務:在添加更多自動化之前,先添加控制面板可見性。
  5. 具有安全風險的任務:在自主執行之前添加評估閘門和人工合併閘門。

任務級臨時腳本範本

在編寫程式碼之前使用此結構:

# 動態工作流腳本

目標:
- 交付:
- 不交付:

輸入:
- 儲存庫或工作區:
- 外部系統:
- 憑證策略:

迴圈:
1. 探索當前狀態。
2. 產生或更新最小有用的工件。
3. 執行評估檢查。
4. 記錄狀態和交接。
5. 若閘門失敗、所有權不明確或外部操作不安全則停止。

評估:
- 命令:
- 預期的通過訊號:
- 失敗負責人:

交接:
- 狀態:
- 證據:
- 下一步行動:

共享技能提取

僅在下列條件中至少有兩項成立時,才將任務級臨時腳本提升為共享技能:

  • 相同的工作流出現在多個會話、儲存庫、團隊或啟動中。
  • 工作流需要特定的語言、工具或安全序列。
  • 由於操作員跳過閘門或失去上下文而導致重複失敗。
  • 工作流具有穩定的輸入/輸出契約。
  • 工作流能受益於控制面板、狀態板或團隊交接。

提取時,首先在 skills/<name>/SKILL.md 中編寫該技能。僅在仍需要傳統斜線入口介面時,才添加命令替換。

控制面板檢查點

當動態工作流模式暴露狀態時,它才能被團隊使用。每當任務跨越一個以上的會話時,記錄這些檢查點:

  • 計畫:目標、負責人、驗收標準以及有風險的外部系統。
  • 佇列:工作項目、分配的代理角色、分支/工作樹以及依賴關係邊緣。
  • 執行:活動中的腳本、當前迴圈步驟、最近的評估結果以及(如果有的話)Token/成本訊號。
  • 閘門:測試結果、瀏覽器螢幕截圖、安全審查以及合併準備就緒與否。
  • 交接:已完成的事項、失敗的事項以及需要人工決策的事項。

如果儲存庫啟用了 ECC2 狀態,則優先透過 ECC 控制面板或狀態儲存支援的腳本來添加或讀取檢查點,而不是散落未追蹤的筆記。

評估閘門

每個動態腳本都需要一個特定於任務的評估。選擇最便宜且可靠的閘門:

工作類型評估閘門
程式碼功能針對性測試、lint、覆蓋率以及一條整合路徑
UI/控制面板帶有螢幕截圖和溢出/錯誤檢查的瀏覽器冒煙測試
代理工作流Fixture 腳本或已播種的工作項目,帶有預期路由
研究/內容中立來源簡報、聲明檢查清單以及可發布的大綱
整合空執行命令、配置驗證以及無機密掃描

在評估可以被另一位團隊成員重新執行之前,不要聲明動態工作流是可重複使用的。

反模式

  • 產出隱藏實際決策邏輯使其對操作員不透明的腳本。
  • 將動態工作流模式視為允許跳過測試。
  • 當共享技能或狀態工件才是真正的產出時,卻建立一次性文件。
  • 運行多個代理卻沒有所有權、合併閘門或衝突策略。
  • 將原始私人研究資料洩漏到公開文件中。

輸出標準

完成時提供:

  • 腳本或技能的路徑。
  • 評估命令和結果。
  • 控制面板或交接工件路徑。
  • 下一個可重複使用的提取候選項。

Individual skills in this repo

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

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相關技能