一键导入
workflow-optimizer
Analyzes multi-step workflows and agent pipelines for bottlenecks, unnecessary serialization, and optimization opportunities
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyzes multi-step workflows and agent pipelines for bottlenecks, unnecessary serialization, and optimization opportunities
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Analyzes project structure, module dependencies, imports, and entry points to generate architecture diagrams in Mermaid format
Analyzes ETL and data pipeline code for optimization opportunities across Python (Pandas, PySpark), Rust (polars, datafusion), SQL, and general pipeline descriptions
Validates environment variable configurations and config files (YAML, TOML, JSON, .env) for missing required variables, type mismatches, deprecated keys, naming convention violations, secret exposure risks, and invalid value ranges
Analyzes code for performance bottlenecks including N+1 queries, O(n^2) or worse algorithms, unnecessary allocations, sync I/O in async contexts, excessive cloning, missing caching opportunities, and large payload transfers. Supports Rust, Python, TypeScript, and Go.
Analyzes, improves, and restructures LLM prompts for clarity, efficiency, and reliability
Analyzes source code for common security vulnerabilities including SQL injection, XSS, command injection, hardcoded secrets, insecure deserialization, path traversal, and SSRF
| name | workflow-optimizer |
| description | Analyzes multi-step workflows and agent pipelines for bottlenecks, unnecessary serialization, and optimization opportunities |
| version | 1.0.0 |
| author | go-on-team |
| tags | ["workflow","optimization","pipeline"] |
| min_go_on_version | 1.0.0 |
Analyzes multi-step workflows and agent pipelines for bottlenecks, unnecessary serialization, and optimization opportunities. Suggests parallelization, caching, and batching strategies.
workflow, optimization, pipeline
Inspects directed acyclic graphs (DAGs) of agent pipeline steps to identify optimization opportunities. Detects sequential dependencies that could run in parallel, redundant computations that could be cached, and batchable operations that could be grouped. Produces an actionable optimization report with estimated speedup ratios and refactored pipeline definitions.
Use this skill when you have a multi-step agent pipeline, build workflow, CI/CD sequence, data processing chain, or any ordered set of operations where performance matters. It works best with pipelines of 3 or more steps and supports both linear chains and branching DAG topologies.
Invoke by describing your workflow steps in detail. The optimizer will analyze the graph and produce structured recommendations.
/workflow-optimize analyze — Analyze an existing workflow for bottlenecks/workflow-optimize refactor — Generate an optimized pipeline definition| Parameter | Type | Description |
|---|---|---|
steps | array | Array of workflow step definitions: [{"name": "...", "dependencies": [...], "description": "..."}] |
action | string | Action: analyze, refactor (default: analyze) |
constraints | object | Optional: constraints like {"max_parallel": 4, "cache_enabled": true, "batch_size": 10} |
Each step in the steps array expects:
| Field | Type | Description |
|---|---|---|
name | string | Unique step identifier |
dependencies | string[] | Names of steps that must complete before this one (empty for root steps) |
description | string | What this step does, including any side effects or external calls |
Returns a structured optimization report containing:
{
"steps": [
{"name": "fetch-data", "dependencies": [], "description": "Fetch raw data from 3 external APIs"},
{"name": "validate", "dependencies": ["fetch-data"], "description": "Validate schema and format of each record"},
{"name": "enrich", "dependencies": ["fetch-data"], "description": "Enrich records with geo-ip lookup"},
{"name": "transform", "dependencies": ["validate", "enrich"], "description": "Transform to output format"},
{"name": "upload", "dependencies": ["transform"], "description": "Upload to S3 bucket"}
],
"action": "refactor"
}
Example output (abbreviated):
## Optimization Report
### Original DAG
fetch-data ─┬─→ validate ──┐ └─→ enrich ───┤ └─→ transform → upload
### Critical Path
fetch-data → validate → transform → upload (4 sequential steps)
### Optimization Suggestions
1. ⚡ **Parallelize** — `validate` and `enrich` can run concurrently (saves ~40%)
2. 💾 **Cache** — `enrich` results are deterministic; cache by input fingerprint
3. 📦 **Batch** — `upload` can batch records in groups of 50
### Estimated Speedup
| Scenario | Time | vs Original |
|----------|------|-------------|
| Original | 100% | — |
| Parallel only | ~60% | 1.67× |
| Parallel + Cache | ~45% | 2.2× |
| Full (parallel + cache + batch) | ~35% | 2.86× |
### Refactored Pipeline
fetch-data ──┬─→ validate ──┐ │ ├─→ transform(parallel=2) → upload(batch=50) └─→ enrich ────┘