ai-custom-skills 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +47 -0
  3. package/index.js +87 -0
  4. package/package.json +34 -0
  5. package/skills/agent-workflow-creator/README.md +103 -0
  6. package/skills/agent-workflow-creator/SKILL.md +271 -0
  7. package/skills/agent-workflow-creator/assets/workflow-template.md +135 -0
  8. package/skills/agent-workflow-creator/evals/evals.json +35 -0
  9. package/skills/agent-workflow-creator/references/domains/coding.md +158 -0
  10. package/skills/agent-workflow-creator/references/domains/content.md +58 -0
  11. package/skills/agent-workflow-creator/references/domains/data-pipeline.md +52 -0
  12. package/skills/agent-workflow-creator/references/domains/documents.md +165 -0
  13. package/skills/agent-workflow-creator/references/domains/research.md +81 -0
  14. package/skills/agent-workflow-creator/references/domains/support.md +140 -0
  15. package/skills/agent-workflow-creator/references/examples/content-creation-workflow.yaml +303 -0
  16. package/skills/agent-workflow-creator/references/examples/customer-support-triage.yaml +188 -0
  17. package/skills/agent-workflow-creator/references/examples/data-etl-pipeline.yaml +243 -0
  18. package/skills/agent-workflow-creator/references/examples/research-report-workflow.yaml +186 -0
  19. package/skills/agent-workflow-creator/references/patterns.md +466 -0
  20. package/skills/agent-workflow-creator/references/step-schema.md +177 -0
  21. package/skills/agent-workflow-creator/references/yaml-schema.md +281 -0
  22. package/skills/agent-workflow-creator/scripts/export_workflow.py +283 -0
  23. package/skills/agent-workflow-creator/scripts/generate_workflow.py +605 -0
  24. package/skills/agent-workflow-creator/scripts/render_mermaid.py +243 -0
  25. package/skills/agent-workflow-creator/scripts/validate_workflow.py +259 -0
  26. package/skills/backend-expressjs/SKILL.md +801 -0
  27. package/skills/backend-expressjs/evals/evals.json +17 -0
  28. package/skills/debug-expressjs-error/SKILL.md +40 -0
  29. package/skills/debug-expressjs-error/scripts/analyze_error.py +49 -0
  30. package/skills/debug-expressjs-error/scripts/cleanup_logs.py +36 -0
  31. package/skills/debug-expressjs-error/scripts/suggest_logs.py +61 -0
  32. package/skills/debug-mern-stack-error/SKILL.md +41 -0
  33. package/skills/debug-mern-stack-error/scripts/analyze_error.py +49 -0
  34. package/skills/debug-mern-stack-error/scripts/cleanup_logs.py +36 -0
  35. package/skills/debug-mern-stack-error/scripts/suggest_logs.py +61 -0
  36. package/skills/debug-reactjs-error/SKILL.md +40 -0
  37. package/skills/debug-reactjs-error/scripts/analyze_error.py +50 -0
  38. package/skills/debug-reactjs-error/scripts/cleanup_logs.py +36 -0
  39. package/skills/debug-reactjs-error/scripts/suggest_logs.py +60 -0
  40. package/skills/debug-sailsjs-error/SKILL.md +55 -0
  41. package/skills/debug-sailsjs-error/scripts/analyze_error.py +49 -0
  42. package/skills/debug-sailsjs-error/scripts/cleanup_logs.py +39 -0
  43. package/skills/debug-sailsjs-error/scripts/suggest_logs.py +104 -0
  44. package/skills/frontend-reactjs/SKILL.md +431 -0
  45. package/skills/mern-stack-project/SKILL.md +875 -0
  46. package/skills/prompt-writing/SKILL.md +77 -0
  47. package/skills/prompt-writing/evals/evals.json +26 -0
  48. package/skills/prompt-writing/references/prompt_engineering_guide.md +64 -0
  49. package/skills/prompt-writing/scripts/analyze_prompt.py +65 -0
  50. package/skills/sailsjs-api/SKILL.md +190 -0
  51. package/skills/sailsjs-api/references/controller-template.md +139 -0
  52. package/skills/sailsjs-api/references/helper-template.md +138 -0
  53. package/skills/sailsjs-api/references/validation-template.md +132 -0
  54. package/skills/sailsjs-helper/SKILL.md +155 -0
  55. package/skills/sailsjs-helper/references/helper-guide.md +317 -0
  56. package/skills/skill-creator/LICENSE.txt +202 -0
  57. package/skills/skill-creator/SKILL.md +485 -0
  58. package/skills/skill-creator/agents/analyzer.md +274 -0
  59. package/skills/skill-creator/agents/comparator.md +202 -0
  60. package/skills/skill-creator/agents/grader.md +223 -0
  61. package/skills/skill-creator/assets/eval_review.html +146 -0
  62. package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
  63. package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
  64. package/skills/skill-creator/references/schemas.md +430 -0
  65. package/skills/skill-creator/scripts/__init__.py +0 -0
  66. package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
  67. package/skills/skill-creator/scripts/generate_report.py +326 -0
  68. package/skills/skill-creator/scripts/improve_description.py +246 -0
  69. package/skills/skill-creator/scripts/package_skill.py +136 -0
  70. package/skills/skill-creator/scripts/quick_validate.py +103 -0
  71. package/skills/skill-creator/scripts/run_eval.py +329 -0
  72. package/skills/skill-creator/scripts/run_loop.py +328 -0
  73. package/skills/skill-creator/scripts/utils.py +47 -0
  74. package/skills.json +61 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ravi Patel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # AI Skill Collection
2
+
3
+ A professional collection of AI skills for enhanced agentic capabilities. Each skill is designed to be easily discoverable and usable by any AI assistant or agent that supports the skill format.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install ai-custom-skills
9
+ ```
10
+
11
+ ## CLI Usage
12
+
13
+ After installation, you can use the `custom-skills` command to interact with your collection:
14
+
15
+ ### List all skills
16
+
17
+ ```bash
18
+ npx custom-skills --list
19
+ ```
20
+
21
+ ### Get detailed information for a skill
22
+
23
+ ```bash
24
+ npx custom-skills --info=default-skill
25
+ ```
26
+
27
+ ## Project Structure
28
+
29
+ This project follows the manifest-driven architecture used by professional AI skill stores:
30
+
31
+ - **`skills.json`**: The central manifest file for skill discovery.
32
+ - **`index.js`**: Lightweight CLI for skill management.
33
+ - **`skills/`**: Root directory for all individual skill folders.
34
+ - **`<skill-name>/`**:
35
+ - **`SKILL.md`**: Core instructions for the AI agent for this specific skill.
36
+ - **`scripts/`**: Executable scripts specific to this skill.
37
+ - **`examples/`**: Usage guides and reference implementations.
38
+
39
+ ## Adding a New Skill
40
+
41
+ 1. Create a new folder under `skills/` with a unique name.
42
+ 2. Add a `SKILL.md` file following the standard template.
43
+ 3. Update `skills.json` with your new skill's details.
44
+
45
+ ## License
46
+
47
+ MIT
package/index.js ADDED
@@ -0,0 +1,87 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+
6
+ const pkgPath = path.join(__dirname, 'package.json');
7
+ const manifestPath = path.join(__dirname, 'skills.json');
8
+
9
+ const c = {
10
+ reset: "\x1b[0m",
11
+ bold: "\x1b[1m",
12
+ cyan: "\x1b[36m",
13
+ green: "\x1b[32m",
14
+ dim: "\x1b[2m",
15
+ };
16
+
17
+ const col = (color, text) => `${c[color]}${text}${c.reset}`;
18
+
19
+ function showHelp() {
20
+ console.log(`
21
+ ${col("bold", col("cyan", "🤖 custom-skills"))} — Manage your AI skill collection
22
+
23
+ ${col("bold", "USAGE")}
24
+ npx custom-skills [options]
25
+
26
+ ${col("bold", "OPTIONS")}
27
+ ${col("green", "--list")} List all available skills
28
+ ${col("green", "--info=<name>")} Show details and path for a specific skill
29
+ ${col("green", "--help")} Show this help message
30
+ `);
31
+ }
32
+
33
+ function listSkills() {
34
+ if (!fs.existsSync(manifestPath)) {
35
+ console.error("Error: skills.json manifest not found.");
36
+ process.exit(1);
37
+ }
38
+
39
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
40
+ console.log(`\n${col("bold", "Available Skills:")}\n`);
41
+
42
+ manifest.skills.forEach(skill => {
43
+ console.log(` ${col("cyan", "◆")} ${col("bold", skill.name.padEnd(20))} ${col("dim", skill.description)}`);
44
+ });
45
+ console.log("");
46
+ }
47
+
48
+ function showSkillInfo(name) {
49
+ if (!fs.existsSync(manifestPath)) {
50
+ console.error("Error: skills.json manifest not found.");
51
+ process.exit(1);
52
+ }
53
+
54
+ const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
55
+ const skill = manifest.skills.find(s => s.name === name);
56
+
57
+ if (!skill) {
58
+ console.error(`Error: Skill "${name}" not found.`);
59
+ process.exit(1);
60
+ }
61
+
62
+ const skillDir = path.join(__dirname, 'skills', skill.name);
63
+ const skillFile = path.join(skillDir, 'SKILL.md');
64
+
65
+ console.log(`\n${col("bold", "Skill Information:")}`);
66
+ console.log(` ${col("cyan", "Name:")} ${skill.name}`);
67
+ console.log(` ${col("cyan", "Description:")} ${skill.description}`);
68
+ console.log(` ${col("cyan", "Category:")} ${skill.category}`);
69
+ console.log(` ${col("cyan", "Path:")} ${skillFile}`);
70
+ console.log("");
71
+ }
72
+
73
+ const args = process.argv.slice(2);
74
+ const listArg = args.includes('--list');
75
+ const helpArg = args.includes('--help');
76
+ const infoArg = args.find(a => a.startsWith('--info='));
77
+
78
+ if (helpArg || args.length === 0) {
79
+ showHelp();
80
+ } else if (listArg) {
81
+ listSkills();
82
+ } else if (infoArg) {
83
+ const name = infoArg.split('=')[1];
84
+ showSkillInfo(name);
85
+ } else {
86
+ showHelp();
87
+ }
package/package.json ADDED
@@ -0,0 +1,34 @@
1
+ {
2
+ "name": "ai-custom-skills",
3
+ "version": "1.0.0",
4
+ "description": "A collection of AI skills for enhanced agentic capabilities.",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "custom-skills": "./index.js"
8
+ },
9
+ "keywords": [
10
+ "ai",
11
+ "skills",
12
+ "prompt-collection",
13
+ "agentic-coding"
14
+ ],
15
+ "author": "Ravi Patel",
16
+ "license": "MIT",
17
+ "files": [
18
+ "index.js",
19
+ "skills.json",
20
+ "skills/",
21
+ "README.md"
22
+ ],
23
+ "engines": {
24
+ "node": ">=18.0.0"
25
+ },
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/ravipatel10/ai-custom-skills.git"
29
+ },
30
+ "bugs": {
31
+ "url": "https://github.com/ravipatel10/ai-custom-skills/issues"
32
+ },
33
+ "homepage": "https://github.com/ravipatel10/ai-custom-skills#readme"
34
+ }
@@ -0,0 +1,103 @@
1
+ # agent-workflow-creator
2
+
3
+ A comprehensive skill for designing, generating, and documenting complete agent workflows for any task or domain.
4
+
5
+ ## What This Skill Does
6
+
7
+ Given any task description, this skill produces:
8
+
9
+ - **Plain-English Workflow Summary** — what it does, inputs, outputs
10
+ - **Step-by-Step Table** — every step with tool, input, output, and failure path
11
+ - **Mermaid Flowchart** — visual diagram of the workflow
12
+ - **Agent Roles Card** — who does what in multi-agent systems
13
+ - **Tool Manifest** — every tool and credential required
14
+ - **Error Handling Plan** — every failure class with recovery strategy
15
+ - **YAML Workflow Definition** — machine-readable spec for any agent framework
16
+ - **Execution Checklist** — pre-flight checks before running
17
+
18
+ ## Directory Structure
19
+
20
+ ```
21
+ agent-workflow-creator/
22
+ ├── SKILL.md # Main skill instructions
23
+ ├── evals/
24
+ │ └── evals.json # Test cases for the skill
25
+ ├── references/
26
+ │ ├── step-schema.md # Full step schema reference
27
+ │ ├── yaml-schema.md # Full YAML workflow schema
28
+ │ ├── patterns.md # 9 workflow patterns with diagrams + YAML
29
+ │ ├── domains/
30
+ │ │ ├── research.md # Research & knowledge domain guidance
31
+ │ │ ├── data-pipeline.md # Data processing & ETL guidance
32
+ │ │ └── content.md # Content creation domain guidance
33
+ │ └── examples/
34
+ │ ├── research-report-workflow.yaml
35
+ │ └── customer-support-triage.yaml
36
+ └── scripts/
37
+ ├── generate_workflow.py # Scaffold a YAML workflow from task description
38
+ ├── validate_workflow.py # Validate a YAML workflow against the schema
39
+ ├── render_mermaid.py # Convert YAML workflow to Mermaid diagram
40
+ └── export_workflow.py # Export workflow to multiple formats
41
+ ```
42
+
43
+ ## Scripts Quick Reference
44
+
45
+ ### Generate a workflow
46
+
47
+ ```bash
48
+ python scripts/generate_workflow.py \
49
+ --task "monitor social media and alert on negative mentions" \
50
+ --type single-agent \
51
+ --pattern react \
52
+ --domain research \
53
+ --output my_workflow.yaml \
54
+ --verbose
55
+ ```
56
+
57
+ ### Validate a workflow
58
+
59
+ ```bash
60
+ python scripts/validate_workflow.py --file my_workflow.yaml --report
61
+ ```
62
+
63
+ ### Render a Mermaid diagram
64
+
65
+ ```bash
66
+ # Output to Markdown (paste into any Mermaid viewer)
67
+ python scripts/render_mermaid.py --file my_workflow.yaml
68
+
69
+ # Output to standalone HTML
70
+ python scripts/render_mermaid.py --file my_workflow.yaml --html --output diagram.html
71
+ ```
72
+
73
+ ### Export to all formats
74
+
75
+ ```bash
76
+ python scripts/export_workflow.py \
77
+ --file my_workflow.yaml \
78
+ --formats yaml,json,markdown,html,mermaid \
79
+ --output-dir ./exports
80
+ ```
81
+
82
+ ## Supported Workflow Patterns
83
+
84
+ | Pattern | Best For |
85
+ | ----------------- | ------------------------------------ |
86
+ | Sequential Chain | Linear step-by-step tasks |
87
+ | Map-Reduce | Batch processing many items |
88
+ | Fan-Out / Fan-In | Parallel independent branches |
89
+ | ReAct Loop | Open-ended autonomous research |
90
+ | Critic-Refine | Quality-sensitive content generation |
91
+ | Human-in-the-Loop | Approval workflows |
92
+ | RAG | Knowledge-base powered responses |
93
+ | Supervisor-Worker | Complex multi-specialist tasks |
94
+ | Event-Driven | Webhook/trigger-based automation |
95
+
96
+ ## Requirements
97
+
98
+ - Python 3.8+
99
+ - `pyyaml` (for JSON export and YAML loading): `pip install pyyaml`
100
+
101
+ ## Installation as Skill
102
+
103
+ Place this directory in your ai's skills folder. The ai will automatically detect and use it when you ask for workflow design, agent architecture, or automation planning help.
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: agent-workflow-creator
3
+ description: >
4
+ Use this skill to design, generate, document, and validate complete agent workflows for any task or domain.
5
+ Trigger this skill whenever a user asks to: build an agent, design a workflow, automate a process, create
6
+ a pipeline, map out task steps for AI execution, design an LLM-powered automation, define agent roles or
7
+ tool sequences, create a multi-step AI process, or plan any system where AI agents coordinate to complete
8
+ a goal. Also trigger for: "how should my agent handle X", "what steps does an AI need for Y", "create a
9
+ workflow for Z", "design an automation pipeline", "agent architecture for...", or any request to structure
10
+ tasks so an AI can execute them reliably and efficiently. Use even if the user mentions 'flow', 'pipeline',
11
+ 'automation', 'task plan', 'agent design', or 'AI process' — this skill covers all of those.
12
+ ---
13
+
14
+ # Agent Workflow Creator
15
+
16
+ A comprehensive skill for generating complete, production-ready agent workflows. Given any task, goal, or domain, this skill produces structured workflows that AI agents can execute reliably — with clear steps, decision logic, tool assignments, error handling, and output definitions.
17
+
18
+ ---
19
+
20
+ ## Core Philosophy
21
+
22
+ A great agent workflow is more than a list of steps. It is:
23
+ - **Decomposed** — every ambiguous task broken into atomic, executable actions
24
+ - **Deterministic at the edges** — clear entry and exit conditions at every node
25
+ - **Tool-aware** — each step names the exact tool, API, or capability needed
26
+ - **Failure-safe** — every step has a fallback or error path defined
27
+ - **Observable** — outputs at each step are named, typed, and passed forward explicitly
28
+ - **Role-assigned** — in multi-agent systems, every step says WHO does it
29
+
30
+ Think of yourself as both a systems architect and an AI director: you're building a machine that runs reliably without human intervention, but also a script that any capable agent can follow.
31
+
32
+ ---
33
+
34
+ ## Workflow Generation Process
35
+
36
+ When the user gives you a task to turn into an agent workflow, follow this process:
37
+
38
+ ### Step 1 — Understand the Goal
39
+ Before designing anything, extract:
40
+ - **Objective**: What is the final deliverable or outcome?
41
+ - **Inputs**: What data, files, or context does the workflow receive?
42
+ - **Constraints**: Speed, cost, tool availability, privacy, etc.
43
+ - **Failure tolerance**: Is this best-effort or mission-critical?
44
+ - **Agent type**: Single agent, multi-agent, human-in-the-loop, or fully autonomous?
45
+
46
+ If the user hasn't provided enough information, ask targeted questions before proceeding. Don't guess on objectives.
47
+
48
+ ### Step 2 — Decompose the Task
49
+ Break the goal into a directed graph of steps:
50
+ - Each step = one atomic action (fetch, parse, decide, transform, call API, write file, etc.)
51
+ - Identify sequential dependencies and parallel opportunities
52
+ - Mark decision points (branching logic) explicitly
53
+ - Identify loops (retry, poll, iterate) vs. one-shot steps
54
+
55
+ Use the **Step Schema** (see `references/step-schema.md`) for structuring each node.
56
+
57
+ ### Step 3 — Assign Tools and Agents
58
+ For every step, specify:
59
+ - **Tool**: The exact capability needed (web_search, code_execution, file_read, API call, LLM completion, etc.)
60
+ - **Agent role** (if multi-agent): Orchestrator, Researcher, Writer, Validator, etc.
61
+ - **Input contract**: What does this step receive?
62
+ - **Output contract**: What does it produce and pass forward?
63
+
64
+ ### Step 4 — Add Control Flow
65
+ Define:
66
+ - **Entry condition**: When does this step start?
67
+ - **Exit condition**: When is it done?
68
+ - **On success**: Where does the flow go next?
69
+ - **On failure**: Retry? Fallback step? Alert human? Abort?
70
+ - **On ambiguity**: Does this step need a human checkpoint?
71
+
72
+ ### Step 5 — Generate Outputs
73
+ Produce all of the following (see individual sections below):
74
+ 1. **Workflow Summary** — plain-English description
75
+ 2. **Step-by-Step Table** — structured table of all steps
76
+ 3. **Mermaid Flowchart** — visual diagram of the workflow
77
+ 4. **Agent Roles Card** — who does what
78
+ 5. **Tool Manifest** — all tools and capabilities required
79
+ 6. **Error Handling Plan** — what can go wrong and how it's handled
80
+ 7. **YAML Workflow Definition** — machine-readable workflow spec
81
+ 8. **Execution Checklist** — pre-flight checks before running
82
+
83
+ ---
84
+
85
+ ## Output Formats
86
+
87
+ ### 1. Workflow Summary
88
+ A 3–5 sentence plain-English description:
89
+ - What the workflow does
90
+ - What it takes as input
91
+ - What it produces as output
92
+ - How long it typically takes / how many steps
93
+
94
+ ### 2. Step-by-Step Table
95
+ Always output a table with these columns:
96
+
97
+ | Step # | Step Name | Description | Tool / Capability | Input | Output | On Failure |
98
+ |--------|-----------|-------------|-------------------|-------|--------|------------|
99
+
100
+ Every row must be filled completely. "TBD" is not acceptable.
101
+
102
+ ### 3. Mermaid Flowchart
103
+ Always generate a Mermaid diagram. Use this format:
104
+
105
+ ```mermaid
106
+ flowchart TD
107
+ A([Start: <input>]) --> B[Step: <name>]
108
+ B --> C{Decision: <condition>}
109
+ C -->|Yes| D[Step: <name>]
110
+ C -->|No| E[Step: <name>]
111
+ D --> F([End: <output>])
112
+ E --> F
113
+ ```
114
+
115
+ Node shape guide:
116
+ - `([text])` — Start / End (stadium)
117
+ - `[text]` — Action step (rectangle)
118
+ - `{text}` — Decision point (diamond)
119
+ - `[(text)]` — Data store / file (cylinder)
120
+ - `((text))` — Sub-workflow / agent call (circle)
121
+
122
+ Color-code by agent role when multi-agent (use `style` or `classDef`).
123
+
124
+ ### 4. Agent Roles Card
125
+ For multi-agent workflows:
126
+
127
+ | Role | Responsibility | Steps Owned | Tools Available |
128
+ |------|----------------|-------------|-----------------|
129
+
130
+ For single-agent workflows, describe the agent's persona, capability profile, and any sub-roles it plays.
131
+
132
+ ### 5. Tool Manifest
133
+ List every tool the workflow requires:
134
+
135
+ | Tool Name | Type | Steps Used In | Required Credentials / Config |
136
+ |-----------|------|---------------|-------------------------------|
137
+
138
+ Types: `web_search`, `code_execution`, `file_io`, `api_call`, `llm_completion`, `database`, `human_input`, `memory`, `vector_search`, `notification`
139
+
140
+ ### 6. Error Handling Plan
141
+ For each major failure class, define:
142
+
143
+ | Failure Type | Affected Steps | Detection Method | Recovery Strategy | Escalation |
144
+ |--------------|----------------|------------------|-------------------|------------|
145
+
146
+ Standard failure classes to always consider:
147
+ - Tool unavailable / rate limited
148
+ - Malformed / unexpected input
149
+ - LLM hallucination or low-confidence output
150
+ - Step timeout
151
+ - Downstream dependency failure
152
+ - Data quality / validation failure
153
+
154
+ ### 7. YAML Workflow Definition
155
+ Always produce a machine-readable YAML spec. Read `references/yaml-schema.md` for the full schema. Abbreviated example:
156
+
157
+ ```yaml
158
+ workflow:
159
+ name: my-workflow
160
+ version: "1.0"
161
+ description: "What this workflow does"
162
+ inputs:
163
+ - name: query
164
+ type: string
165
+ required: true
166
+ outputs:
167
+ - name: report
168
+ type: file
169
+ steps:
170
+ - id: step_01
171
+ name: Fetch Data
172
+ tool: web_search
173
+ input: "{{inputs.query}}"
174
+ output: raw_results
175
+ on_failure:
176
+ strategy: retry
177
+ max_attempts: 3
178
+ next: step_02
179
+ ```
180
+
181
+ ### 8. Execution Checklist
182
+ Pre-flight items to verify before running the workflow:
183
+
184
+ - [ ] All required tools are available and authenticated
185
+ - [ ] Input data format matches the workflow's input schema
186
+ - [ ] Output destinations are writable
187
+ - [ ] Rate limits and quotas checked for all APIs used
188
+ - [ ] Error notification channels configured
189
+ - [ ] Logging / observability enabled
190
+ - [ ] Test run on sample input completed
191
+
192
+ ---
193
+
194
+ ## Workflow Patterns Library
195
+
196
+ When designing, identify which pattern(s) apply and apply them correctly. Read `references/patterns.md` for full pattern details with examples.
197
+
198
+ **Quick Reference:**
199
+ | Pattern | When to Use |
200
+ |---------|-------------|
201
+ | Sequential Chain | Steps must happen in strict order |
202
+ | Map-Reduce | Apply same operation to many items, then aggregate |
203
+ | Fan-Out / Fan-In | Parallel execution, then merge results |
204
+ | ReAct Loop | Agent reasons and acts iteratively until goal met |
205
+ | Critic-Refine | One agent produces, another critiques, repeat |
206
+ | Human-in-the-Loop | Insert approval or input checkpoint |
207
+ | Retrieval-Augmented | Fetch context before generating |
208
+ | Event-Driven | Workflow triggered by external event or signal |
209
+ | Recursive Decomposer | Break task into subtasks recursively |
210
+ | Supervisor-Worker | Orchestrator delegates to specialist agents |
211
+
212
+ ---
213
+
214
+ ## Quality Checklist (Self-Review Before Presenting)
215
+
216
+ Before outputting the workflow, verify:
217
+
218
+ - [ ] Every step has a named input and named output
219
+ - [ ] No step is ambiguous ("do research" → specify what kind, how, with what tool)
220
+ - [ ] Every decision point has all branches labeled
221
+ - [ ] All failure paths lead somewhere (retry, fallback, or human escalation)
222
+ - [ ] The Mermaid diagram matches the step table exactly
223
+ - [ ] The YAML is valid and complete
224
+ - [ ] Tools in the manifest match tools referenced in steps
225
+ - [ ] The workflow solves the stated objective end-to-end
226
+
227
+ ---
228
+
229
+ ## Domain-Specific Guidance
230
+
231
+ For specialized domains, read the relevant reference file before designing:
232
+
233
+ - **Research / knowledge workflows** → `references/domains/research.md`
234
+ - **Data processing / ETL workflows** → `references/domains/data-pipeline.md`
235
+ - **Content creation workflows** → `references/domains/content.md`
236
+ - **Customer support / triage workflows** → `references/domains/support.md`
237
+ - **Code generation / review workflows** → `references/domains/coding.md`
238
+ - **Document processing workflows** → `references/domains/documents.md`
239
+
240
+ ---
241
+
242
+ ## Scripts
243
+
244
+ Use these scripts to accelerate workflow generation:
245
+
246
+ - `scripts/generate_workflow.py` — CLI tool to scaffold a YAML workflow from a task description
247
+ - `scripts/validate_workflow.py` — Validates a YAML workflow file against the schema
248
+ - `scripts/render_mermaid.py` — Converts a YAML workflow to a Mermaid diagram string
249
+ - `scripts/export_workflow.py` — Exports a workflow to multiple formats (JSON, YAML, Markdown)
250
+
251
+ Run any script with `--help` for full usage.
252
+
253
+ ---
254
+
255
+ ## Example Workflows
256
+
257
+ For inspiration and templates, see:
258
+ - `references/examples/research-report-workflow.yaml`
259
+ - `references/examples/customer-support-triage.yaml`
260
+ - `references/examples/data-etl-pipeline.yaml`
261
+ - `references/examples/content-creation-workflow.yaml`
262
+
263
+ ---
264
+
265
+ ## Reminders
266
+
267
+ - **Be specific.** "Search the web" is not a step. "Use web_search tool with query `{{user_query}}` and return top 5 results as `raw_results`" is a step.
268
+ - **Name everything.** Every input variable, output variable, and intermediate state should have a name. Anonymous data is a bug waiting to happen.
269
+ - **Parallel when possible.** If steps are independent, flag them as parallelizable — it matters for performance.
270
+ - **Don't skip error handling.** A workflow without error handling is a proof of concept, not a production system.
271
+ - **Match the user's level.** If they said "I'm new to agents", explain concepts as you go. If they said "give me the YAML", skip the hand-holding.
@@ -0,0 +1,135 @@
1
+ # [Workflow Name]
2
+
3
+ > **Generated by:** agent-workflow-creator
4
+ > **Date:** [YYYY-MM-DD]
5
+ > **Version:** 1.0
6
+ > **Pattern:** [Sequential Chain | Map-Reduce | Fan-Out/Fan-In | ReAct Loop | Critic-Refine | Human-in-the-Loop | etc.]
7
+ > **Agent Type:** [Single Agent | Multi-Agent | Human-in-the-Loop | Fully Autonomous]
8
+
9
+ ---
10
+
11
+ ## Workflow Summary
12
+
13
+ [3–5 sentences describing what the workflow does, what it takes as input, what it produces as output, and roughly how many steps it involves.]
14
+
15
+ ---
16
+
17
+ ## Step-by-Step Table
18
+
19
+ | Step # | Step Name | Description | Tool / Capability | Input | Output | On Failure |
20
+ |--------|-----------|-------------|-------------------|-------|--------|------------|
21
+ | 1 | | | | | | |
22
+ | 2 | | | | | | |
23
+ | 3 | | | | | | |
24
+
25
+ ---
26
+
27
+ ## Mermaid Flowchart
28
+
29
+ ```mermaid
30
+ flowchart TD
31
+ A([Start: <input>]) --> B[Step 1: <name>]
32
+ B --> C{Decision: <condition>}
33
+ C -->|Yes| D[Step 2a: <name>]
34
+ C -->|No| E[Step 2b: <name>]
35
+ D --> F([End: <output>])
36
+ E --> F
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Agent Roles
42
+
43
+ | Role | Responsibility | Steps Owned | Tools Available |
44
+ |------|----------------|-------------|-----------------|
45
+ | | | | |
46
+
47
+ *For single-agent workflows: describe the agent's persona and capability profile here.*
48
+
49
+ ---
50
+
51
+ ## Tool Manifest
52
+
53
+ | Tool Name | Type | Steps Used In | Required Credentials / Config |
54
+ |-----------|------|---------------|-------------------------------|
55
+ | | | | |
56
+
57
+ **Tool types:** `web_search`, `code_execution`, `file_io`, `api_call`, `llm_completion`, `database`, `human_input`, `memory`, `vector_search`, `notification`
58
+
59
+ ---
60
+
61
+ ## Error Handling Plan
62
+
63
+ | Failure Type | Affected Steps | Detection Method | Recovery Strategy | Escalation |
64
+ |--------------|----------------|------------------|-------------------|------------|
65
+ | Tool unavailable / rate limited | | | | |
66
+ | Malformed / unexpected input | | | | |
67
+ | LLM hallucination or low-confidence output | | | | |
68
+ | Step timeout | | | | |
69
+ | Downstream dependency failure | | | | |
70
+ | Data quality / validation failure | | | | |
71
+
72
+ ---
73
+
74
+ ## YAML Workflow Definition
75
+
76
+ ```yaml
77
+ workflow:
78
+ name: my-workflow
79
+ version: "1.0"
80
+ description: ""
81
+ pattern: sequential-chain
82
+ agent_type: single-agent
83
+
84
+ inputs:
85
+ - name: input_name
86
+ type: string
87
+ description: ""
88
+ required: true
89
+
90
+ outputs:
91
+ - name: output_name
92
+ type: file
93
+ format: markdown
94
+ description: ""
95
+
96
+ steps:
97
+ - id: step_01
98
+ name: Step Name
99
+ description: ""
100
+ tool: llm_completion
101
+ input: {}
102
+ output: result_name
103
+ on_failure:
104
+ strategy: retry
105
+ max_attempts: 3
106
+ next: step_02
107
+
108
+ - id: step_02
109
+ name: Step Name
110
+ description: ""
111
+ tool: file_io
112
+ input: {}
113
+ output: result_name
114
+ on_failure:
115
+ strategy: abort
116
+ next: END
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Execution Checklist
122
+
123
+ - [ ] All required tools are available and authenticated
124
+ - [ ] Input data format matches the workflow's input schema
125
+ - [ ] Output destinations are writable
126
+ - [ ] Rate limits and quotas checked for all APIs used
127
+ - [ ] Error notification channels configured
128
+ - [ ] Logging / observability enabled
129
+ - [ ] Test run on sample input completed
130
+
131
+ ---
132
+
133
+ ## Notes & Assumptions
134
+
135
+ [Any important assumptions made during design, open questions, or future enhancements to consider.]