一键导入
dynamic-workflow
Generates workflow YAML on-the-fly for any task using phase templates and keyword analysis. Eliminates the need for pre-defined templates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates workflow YAML on-the-fly for any task using phase templates and keyword analysis. Eliminates the need for pre-defined templates.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | dynamic-workflow |
| description | Generates workflow YAML on-the-fly for any task using phase templates and keyword analysis. Eliminates the need for pre-defined templates. |
| trigger | /generate-workflow [task description] or "generate a workflow for [task]" |
| allowed_tools | Bash(workflow-engine:*), Read(opencode.json), Read(workflows/*.yaml), Write(workflows/auto/*) |
This skill automatically generates valid workflow YAML files based on task description, using a library of reusable phase templates.
/generate-workflow "Refactor the auth system to use JWT instead of sessions"
Output:
Generated: workflows/auto/refactor-auth-jwt-20260508-143022.yaml
Phases: 6 (Strategy → Design → Backend → Frontend → Migration → QA)
| Task Keywords | Task Type | Default Phases |
|---|---|---|
| add, create, new feature | CREATE | Strategy → Design → Implementation → QA → Docs |
| modify, update, change | UPDATE | Strategy → Implementation → QA → Docs |
| delete, remove, cleanup | DELETE | Strategy → Verification → QA → Docs |
| refactor, rewrite, restructure | REFACTOR | Analysis → Implementation → QA |
| fix, bug, error, issue | FIX | Triage → Fix → Verification → Docs |
| audit, review, scan, check | AUDIT | Analysis → Audit → Report |
| optimize, improve, performance | OPTIMIZE | Analysis → Implementation → Benchmark → QA |
| test, coverage | TEST | Setup → Tests → Coverage Report |
| migrate, migrate data | MIGRATE | Analysis → Migration → Verification |
| deploy, release, publish | DEPLOY | Build → Test → Deploy → Verify |
- name: Strategy & Analysis
description: Analyze requirements and create technical plan
agents: [lead-strategist, software-architect]
use_agent_router: true
mcp_tools:
context7: [fetch_library_docs]
memory: [create_entities]
sequential-thinking: [sequentialthinking]
exit_criteria:
- requirements.md exists and is complete
- name: Design & Planning
description: Premium UI/UX design and API contracts
agents: [frontend-ui-ux, software-architect, software-architect]
use_agent_router: true
mcp_tools:
context7: [fetch_library_docs]
sqlite: [read_query]
dependencies: [Strategy & Analysis]
- name: Implementation
description: Core development with LSP context
agents: [core-factory, backend-laravel]
use_agent_router: true
mcp_tools:
context7: [fetch_library_docs]
git: [add, commit]
filesystem: [read_file, write_file]
dependencies: [Design & Planning]
- name: Quality Assurance
description: Testing, security, and performance validation
agents: [qa-guardian]
mcp_tools:
git: [diff, log]
sequential-thinking: [sequentialthinking]
dependencies: [Implementation]
- name: Documentation
description: Technical documentation and updates
agents: [docs-curator]
mcp_tools:
memory: [create_entities, search_nodes]
git: [add, commit]
Add MCP requirements based on task keywords:
| Task Keyword | Required MCP Servers |
|---|---|
| database, query, sql | sqlite |
| git, commit, branch | git |
| web, api, http | fetch |
| docs, library, reference | context7 |
| remember, recall | memory |
| analyze, think | sequential-thinking |
Extract keywords from task description:
Match keywords to task type:
From task type, select default phases:
For JWT auth refactor, enhance the phases:
Output to: workflows/auto/[slug]-[timestamp].yaml
function validateAgents(agents: string[]): boolean {
const opencode = JSON.parse(readFile("opencode.json"));
const validAgents = Object.keys(opencode.agent);
return agents.every((a) => validAgents.includes(a));
}
function validateMCP(servers: string[]): boolean {
const opencode = JSON.parse(readFile("opencode.json"));
const validMCP = Object.keys(opencode.mcp);
return servers.every((s) => validMCP.includes(s));
}
function checkCircularDeps(phases): boolean {
const visited = new Set();
const deps = phases.map((p) => p.dependencies || []).flat();
// DFS to detect cycles
}
Input: "Refactor the auth system to use JWT instead of sessions"
Output: workflows/auto/refactor-auth-jwt-20260508.yaml
name: JWT Auth Refactor
description: Refactor auth system to use JWT instead of sessions
version: 2.0.0
trigger: auto-generated
mcp_servers:
- context7
- sqlite
- git
- filesystem
phases:
- name: Analysis
agents: [software-architect]
tasks: [analyze_current_auth, identify_token_handling]
mcp_tools:
context7: [fetch_library_docs]
memory: [search_nodes]
- name: Implementation
agents: [backend-laravel, core-factory]
tasks: [implement_jwt_middleware, create_token_service, update_login_controller]
mcp_tools:
sqlite: [write_query, read_query]
git: [commit]
dependencies: [Analysis]
- name: Frontend Update
agents: [frontend-ui-ux]
tasks: [update_auth_context, add_token_to_storage]
mcp_tools:
context7: [fetch_library_docs]
dependencies: [Implementation]
- name: QA
agents: [qa-guardian]
tasks: [run_auth_tests, verify_token_expiry, security_scan]
mcp_tools:
git: [diff]
dependencies: [Frontend Update]
Store workflow execution metrics in SQLite:
CREATE TABLE generated_workflows (
timestamp TEXT,
task_type TEXT,
phases_count INT,
agents_used TEXT,
execution_time_seconds REAL,
success BOOLEAN,
error_message TEXT
);
If dynamic generation fails:
feature-development.yaml or bug-fix.yamlContinuously improves the project by checking docs (web, Context7, opencode), using LSPs for code context, monitoring skills/plugins/scripts, and adapting best practices.
Continuity management — preserves context, maintains thermal maps, and serializes states across sessions
Read diffs carefully, identify risks, and produce review feedback that is specific and actionable.
Write accurate docs, keep references current, and capture verified behavior only.
Branching, rebasing, commit hygiene, and review-friendly history for agency delivery.
Use the language server for precise navigation, symbol lookup, refactoring, and diagnostics.