skills/development-workflows/codex-dynamic-workflows/SKILL.md
Use only when the user explicitly asks for swarm, subagents, parallel agents, dynamic workflow, multi-agent orchestration, 多智能体编排, or when the task truly needs coordinated research plus implementation plus review plus verification packets. Do not use for ordinary code review, planning-only work, single-line bugfixes, routine audits, or migrations unless orchestration is requested or at least two independent workflow dimensions are present.
npx skillsauth add bahayonghang/my-claude-code-settings codex-dynamic-workflowsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use this skill to decide whether a Codex task needs dynamic workflow orchestration, then safely shape and run that workflow only when the trigger is real. A valid workflow has an explicit success contract, disjoint work packets, an integration policy, and verification matched to risk.
This skill works in agents that support skills. Do not claim that a local script can call subagent tools unless the current environment exposes such a runner. When no programmable runner exists, create a human-readable orchestration artifact, simulate packets locally, and operate only through the available agent tools.
Trigger this skill when the user explicitly asks for one of these ideas:
Do not trigger this skill for these prompts by themselves:
If a prompt names this skill explicitly but the task is too small, say that full orchestration is unnecessary and proceed directly without creating workflow artifacts unless the user asked for durable artifacts.
Use dynamic orchestration when the explicit trigger is present or at least two independent workflow dimensions are present:
Risk can strengthen the case for orchestration, but risk alone is not a trigger. For risky but single-thread work, inspect locally, draft the approval gate, and proceed only through the normal safety rules.
When using this skill:
Before writing artifacts, inspect the repository for existing planning conventions and ignore rules. Prefer, in order:
.planning/, .plannings/, .omx/plans/, task_plan.md, progress.md, or findings.md when they already govern the repo..workflow/<slug>/ only when durable workflow artifacts are genuinely useful and the path is ignored, local-only, or acceptable for the repo.Do not edit .gitignore just to hide .workflow/ unless the user explicitly asks. If .workflow/ would create unwanted tracked noise, keep packet notes in the existing planning path or present the workflow in chat.
A durable run directory uses this shape:
.workflow/<slug>/
|-- plan.md
|-- state.json
|-- orchestration.md
|-- packets/
|-- results/
`-- final-report.md
Use scripts/new_workflow.py to scaffold this structure. Cross-platform examples:
python .\skills\development-workflows\codex-dynamic-workflows\scripts\new_workflow.py "Task title"
py -3 .\skills\development-workflows\codex-dynamic-workflows\scripts\new_workflow.py "Task title" --packet "01-research:Provider research" --packet "02-tests:Verification plan"
python <skill-dir>/scripts/new_workflow.py "Task title" --packet "01-research:Provider research"
Keep paths quoted when they may contain spaces. Prefer python with py -3 as a Windows fallback. Avoid POSIX-only helpers such as nohup, open, cp -r, or shell globs in workflow instructions.
Keep plan.md human-readable. Use state.json for status, packet IDs, approval state, runner capabilities, artifact policy, platform notes, and verification state. Use orchestration.md as the executable mental model: sequence, branching rules, packet prompts, and integration rules.
Draft a concise plan with:
Goal:
Success criteria:
Current context:
Constraints:
Risks:
Approval required:
Artifact policy:
Runner capabilities:
Platform notes:
Workflow artifact path:
Work packets:
Integration policy:
Verification:
Reusable artifacts:
Do not over-plan obvious work. The plan should guide delegation and verification, not replace execution.
Ask one clear approval question before:
If approval is denied or unavailable, continue only with safe read-only planning, local drafts, or non-destructive checks.
Read references/risk-gates.md when risk is unclear.
Enter goal mode only when the user explicitly requests durable goal execution, goal mode, sustained autonomous execution, or a named runtime that requires it. Do not infer goal mode merely because a task looks multi-step or may take multiple turns.
When goal mode tools are available and explicitly requested, call goal mode with the full objective. Keep the objective intact; do not shrink it to the next step.
In Codex App, outside tmux, or any environment without OMX/runtime goal tools, do not pretend goal mode was started. Use the currently available tools, local artifacts, and normal verification instead.
Do not enter goal mode for a small one-shot task, a purely advisory discussion, ordinary planning, or a workflow artifact draft.
Each packet must be self-contained:
Packet ID:
Objective:
Context:
Files / sources:
Ownership:
Do:
Do not:
Expected output:
Verification:
Prefer packets with disjoint ownership:
For code-edit packets, assign non-overlapping files or modules. Tell workers they are not alone in the codebase, must not revert others' edits, and must adapt to concurrent changes.
When a subagent runner is available and the user authorized delegated or parallel agent work:
When no subagent runner is available or authorization is absent:
results/ only when a durable artifact is appropriate.After packets complete, synthesize:
Accepted:
Rejected:
Conflicts:
Decisions:
Final changes:
Remaining risks:
Resolve conflicts explicitly. If two packets disagree, inspect the authoritative source before choosing.
Use scripts/collect_results.py to produce an integration checklist from result files:
python .\skills\development-workflows\codex-dynamic-workflows\scripts\collect_results.py .workflow\<slug>
python <skill-dir>/scripts/collect_results.py .workflow/<slug>
Run the narrowest reliable checks first, then broaden as risk warrants:
Use scripts/verify_workflow.py to check artifact readiness:
python .\skills\development-workflows\codex-dynamic-workflows\scripts\verify_workflow.py .workflow\<slug> --level structure
py -3 .\skills\development-workflows\codex-dynamic-workflows\scripts\verify_workflow.py .workflow\<slug> --level ready
python <skill-dir>/scripts/verify_workflow.py .workflow/<slug> --level complete
Verification levels:
structure: base files/directories exist and state.json is valid.ready: structure plus at least one packet file.complete: ready plus at least one result file and a non-empty final report. This is the default and preserves the previous strict check.Report skipped checks honestly. Do not treat a workflow as complete until the evidence proves the original success criteria.
When a run produces a useful pattern, save a concise recipe in a project-appropriate location, such as an existing planning folder, .workflow/recipes/<name>.md, or a repo docs folder. Include:
Do not save transcripts, secrets, bulky logs, credentials, or sensitive personal details.
references/plan-schema.md when a machine-readable workflow plan is useful.references/risk-gates.md before risky or ambiguous operations.references/validation-examples.md when forward-testing or improving this skill.development
Run a code quality review focused on maintainability, structure, abstraction quality, file growth, branching complexity, boundary cleanliness, and refactoring opportunities. Use when the user asks for code quality review, code review, maintainability review, architecture quality review, PR code quality feedback, 代码质量审查, 代码质量 review, 可维护性审查, 架构质量审查, or review comments about code structure. Do not use for pure security review, formatting-only review, performance profiling, or implementation tasks unless the user also asks for a code quality review.
development
Plan-first brainstorming workflow that turns an idea into an approved Markdown implementation plan by default. Use when the user wants to brainstorm, design, scope, or plan a feature/spec before implementation. Spark explores project context, asks only blocking questions, writes the plan under the project root's .plannings/YYYY-MM-DD-feature-slug.md path, self-reviews it, and waits for user approval. Create an HTML or visual plan/spec only when the user explicitly asks for HTML, browser-viewable, or visual output; save the paired .html beside the Markdown plan.
development
Run a code quality review focused on maintainability, structure, abstraction quality, file growth, branching complexity, boundary cleanliness, and refactoring opportunities. Use when the user asks for code quality review, code review, maintainability review, architecture quality review, PR code quality feedback, 代码质量审查, 代码质量 review, 可维护性审查, 架构质量审查, or review comments about code structure. Do not use for pure security review, formatting-only review, performance profiling, or implementation tasks unless the user also asks for a code quality review.
tools
Modify the Beautiful Mermaid live editor itself rather than writing ordinary Mermaid diagrams. Use when the task mentions the Beautiful Mermaid repo, `editor.ts`, generated `editor.html`, config panel/options, themes or dark mode, zoom, PNG/SVG export, clipboard behavior, sample presets, or renderer wiring for the editor. Do not use for generic Mermaid syntax help or normal Markdown Mermaid authoring.