Communitygithub.com

动态工作流模式

为 Claude 动态工作流模式及其他自适应代理框架设计任务级本地化工作台、评估关卡和可复用技能。适用于构建任务级工作台、添加评估关卡或从临时工作中提取可复用技能。

动态工作流模式 是什么?

动态工作流模式是一种用于指导 AI 编码代理(如 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 动态工作流模式。
  • 任务需要自定义循环、评估器、爬虫、夹具生成器、监视器或本地仪表盘。
  • 多个代理需要相同的可重复流程,但该流程尚未被捕获为共享技能。
  • 工作流需要持久的交接产物、评估证据或操作者批准后才能合并。

核心合约

仅当任务级工作台比手动驱动相同步骤更便宜、更安全时,动态工作流模式才应产生该工作台。工作台必须包含:

  • 目标:它负责的结果以及明确不负责的结果。
  • 输入:文件、URL、提示词、数据源、凭据策略和用户提供的约束条件。
  • 输出:提交、报告、截图、状态文件或控制面板快照。
  • 评估:至少一个与任务绑定的通过/失败检查,而不仅仅是“它运行了”。
  • 交接:一个简短的产物,告知下一个操作者发生了什么、被什么阻塞以及如何恢复。

动态工作台决策树

  1. 一次性任务:保持内联。不要发明工作台。
  2. 输入变化的重复任务:创建任务级工作台,并保留在临时或项目本地的工作区下。
  3. 跨团队成员或仓库的重复任务:将模式提取为共享技能。
  4. 涉及外部状态、队列或审批的任务:在增加更多自动化之前添加控制面板可见性。
  5. 存在安全风险的任务:在自主执行之前添加评估关卡和人工合并关卡。

任务级工作台模板

在编写代码前使用此结构:

# 动态工作流工作台

目标:
- 交付:
- 不交付:

输入:
- 仓库或工作区:
- 外部系统:
- 凭据策略:

循环:
1. 发现当前状态。
2. 生成或更新最小有用产物。
3. 运行评估检查。
4. 记录状态和交接。
5. 在评估关卡失败、所有权不明确或外部操作不安全时停止。

评估:
- 命令:
- 预期通过信号:
- 失败负责人:

交接:
- 状态:
- 证据:
- 下一步操作:

共享技能提取

仅当以下至少两个条件成立时,将任务级工作台提升为共享技能:

  • 同一工作流出现在多个会话、仓库、团队或发布中。
  • 工作流需要特定的语言、工具或安全排序。
  • 由于操作者跳过关卡或丢失上下文而导致故障重复发生。
  • 工作流具有稳定的输入/输出合约。
  • 工作流受益于控制面板、状态板或团队交接。

提取时,首先在 skills/<name>/SKILL.md 中编写技能。仅当仍需要传统的斜杠入口表面时才添加命令垫片。

控制面板检查点

当暴露状态时,动态工作流模式才能被团队使用。每当任务跨越多个会话时,记录以下检查点:

  • 计划:目标、负责人、验收标准和有风险的外部系统。
  • 队列:工作项、分配的代理角色、分支/工作树和依赖边。
  • 运行:活跃的工作台、当前循环步骤、最近的评估结果以及可用的令牌/成本信号。
  • 关卡:测试结果、浏览器截图、安全审查和合并就绪状态。
  • 交接:已完成的工作、失败的工作以及需要人工决策的内容。

如果仓库已启用 ECC2 状态,建议通过 ECC 控制面板或状态存储支持的脚本添加或读取检查点,而不是散布未跟踪的笔记。

评估关卡

每个动态工作台都需要一个任务特定的评估。选择最便宜可靠的关卡:

工作类型评估关卡
代码功能重点测试、代码检查、覆盖率和一个集成路径
UI/控制面板带截图和溢出/错误检查的浏览器冒烟测试
代理工作流夹具记录或带预期路由的种子工作项
研究/内容中立来源简报、声明检查清单和可发布的提纲
集成空运行命令、配置验证和无密钥扫描

在另一位团队成员能够重新运行评估之前,不要声称动态工作流是可复用的。

反模式

  • 生成将真实决策逻辑对操作者隐藏的脚本。
  • 将动态工作流模式视为跳过测试的许可。
  • 在共享技能或状态产物才是真正成果时创建一次性文档。
  • 在没有所有权、合并关卡或冲突策略的情况下运行多个代理。
  • 将原始私有研究数据泄露到公共文档中。

输出标准

以以下内容结束:

  • 工作台或技能路径。
  • 评估命令和结果。
  • 控制面板或交接产物路径。
  • 下一个可复用的提取候选。

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.

相关技能