workflow-orchestrator
Automatically coordinates multi-skill workflows and triggers follow-up actions. Use when completing PRD creation, implementation, or any milestone that should trigger additional skills. This skill reads the auto-trigger configuration and executes the workflow chain.
What this skill does
# Workflow Orchestrator
A skill that automatically coordinates workflows across multiple skills, triggering follow-up actions at appropriate milestones.
## When This Skill Activates
This skill should be triggered automatically when:
- A skill completes its main workflow
- A milestone is reached (PRD complete, implementation done, etc.)
- User says "complete workflow" or "finish the process"
## How It Works
```
┌─────────────────────────────────────────────────────────────┐
│ Workflow Orchestration │
├─────────────────────────────────────────────────────────────┤
│ │
│ 1. Detect Milestone → 2. Read Hooks → 3. Execute Chain │
│ │
│ prd-planner complete │
│ ↓ │
│ workflow-orchestrator │
│ ↓ │
│ ┌─────────────────────────────────────┐ │
│ │ auto-trigger self-improving-agent │ (background) │
│ │ auto-trigger session-logger │ (auto) │
│ └─────────────────────────────────────┘ │
│ │
└─────────────────────────────────────────────────────────────┘
```
## Trigger Configuration
Read trigger definitions from `skills/auto-trigger/SKILL.md`:
```yaml
hooks:
after_complete:
- trigger: self-improving-agent
mode: background
- trigger: session-logger
mode: auto
on_error:
- trigger: self-improving-agent
mode: background
```
## Execution Modes
| Mode | Behavior | Use When |
|------|----------|----------|
| `auto` | Execute immediately, no confirmation | Logging, status updates |
| `background` | Execute without blocking | Reflection, analysis |
| `ask_first` | Ask user before executing | PRs, deployments, major changes |
## Milestone Detection
### PRD Complete
```markdown
Detected when:
- docs/{scope}-prd.md exists
- All phases in {scope}-prd-task-plan.md are checked
- Status shows "COMPLETE"
Actions:
1. Trigger self-improving-agent (background)
2. Trigger session-logger (auto)
```
### Implementation Complete
```markdown
Detected when:
- All PRD requirements implemented
- Tests pass
- Code committed
Actions:
1. Trigger code-reviewer (ask_first)
2. Trigger create-pr if changes staged
3. Trigger session-logger (auto)
```
### Self-Improvement Complete
```markdown
Detected when:
- Reflection complete
- Patterns abstracted
- Skill files modified
Actions:
1. Trigger create-pr (ask_first)
2. Trigger session-logger (auto)
```
### Universal Learning (Any Skill Complete)
```markdown
Detected when:
- ANY skill completes its workflow
- User provides feedback
- Error or issue encountered
Actions:
1. Trigger self-improving-agent (background)
2. Trigger session-logger (auto)
The self-improving-agent:
- Extracts experience from completed skill
- Identifies patterns and insights
- Updates related skills with learned patterns
- Consolidates memory for future reference
```
## Error Handling (on_error)
Detected when:
- A command returns non-zero exit code
- Tests fail after following skill guidance
- User reports the guidance produced incorrect results
Actions:
1. Trigger self-improving-agent (background) for self-correction
2. Trigger session-logger (auto) to capture error context
## Hook Implementation in Skills
To enable auto-trigger, add this section to any skill's SKILL.md:
```markdown
## Auto-Trigger (After Completion)
When this skill completes, automatically trigger:
```yaml
hooks:
after_complete:
- trigger: skill-name
mode: auto|background|ask_first
context: "relevant context"
on_error:
- trigger: self-improving-agent
mode: background
```
### Current Skill Hooks
- **prd-planner**: After PRD complete → self-improving-agent + session-logger
- **self-improving-agent**: After improvement → create-pr + session-logger
- **prd-implementation-precheck**: After implementation → self-improving-agent + session-logger
- **code-reviewer**: After review → self-improving-agent + session-logger
- **debugger**: After debugging → self-improving-agent + session-logger
- **create-pr**: After PR created → session-logger
- **session-logger**: No trigger (terminates chain)
### Universal Learning Pattern
```
┌─────────────────────────────────────────────────────────────┐
│ ANY Skill Completes │
└──────────────┬──────────────────────────────────────────────┘
│
↓
┌──────────────────────┐
│ workflow-orchestrator │
└──────────┬───────────┘
│
┌──────────┴─────────┐
↓ ↓
self-improving-agent session-logger
↓ ↓
Learn from experience Save context
↓ ↓
Update skills Log session
↓
create-pr (if modified)
```
```
## Workflow Examples
### Example 1: PRD Creation Workflow
```
User: "Create a PRD for user authentication"
↓
prd-planner executes
↓
Phase 6 complete: PRD delivered
↓
workflow-orchestrator detects milestone
↓
┌─────────────────────────────────┐
│ Background: self-improving-agent │ → Learns from PRD patterns
│ Auto: session-logger │ → Saves session
└─────────────────────────────────┘
```
### Example 2: Full Feature Workflow
```
User: "Create a PRD and implement it"
↓
prd-planner → workflow-orchestrator
↓
self-improving-agent → workflow-orchestrator
↓
prd-implementation-precheck
↓
implementation complete → workflow-orchestrator
↓
code-reviewer → self-improving-agent → workflow-orchestrator
↓
create-pr → workflow-orchestrator
↓
session-logger
```
Each step triggers `self-improving-agent` to learn from the experience.
## Implementation Steps
### Step 1: Detect Milestone
Check for completion indicators:
```bash
# PRD complete?
grep -q "COMPLETE" docs/{scope}-prd-task-plan.md
# All phases checked?
grep -q "^\- \[x\].*Phase 6" docs/{scope}-prd-task-plan.md
# PRD file exists?
ls docs/{scope}-prd.md
```
### Step 2: Read Trigger Config
```bash
# Read hooks from auto-trigger skill
cat skills/auto-trigger/SKILL.md
```
### Step 3: Execute Hooks
For each hook in order (before_start, after_complete, on_error):
1. Check if condition is met
2. Execute based on mode
3. Pass context to triggered skill
4. Wait/continue based on mode
### Step 4: Update Status
Log what was triggered and the result:
```markdown
## Workflow Execution
- [x] self-improving-agent (background) - Started
- [x] session-logger (auto) - Session saved
- [ ] create-pr (ask_first) - Pending user approval
```
## Skills with Auto-Trigger
| Skill | Triggers After |
|-------|----------------|
| `prd-planner` | self-improving-agent, session-logger |
| `self-improving-agent` | create-pr, session-logger |
| `prd-implementation-precheck` | self-improving-agent, session-logger |
| `code-reviewer` | self-improving-agent, session-logger |
| `create-pr` | session-logger |
| `refactoring-specialist` | self-improving-agent, session-logger |
| `debugger` | self-improving-agent, session-logger |
## Adding Auto-Trigger to Existing Skills
To add auto-trigger capability to an existing skill, add to the end of its SKILL.md:
```markdown
---
## Auto-Trigger
When this skill completes, automatically trigger:
```yaml
hooks:
after_complete:
- trigger: session-logger
mode: auto
context: "Save session context"
```
```
For more complex triggers, specify mode and context:
```markdown
## Auto-Trigger
When this skill completes:
```yaml
hooks:
after_complete:
- trigger: next-skill
mode: background
context: "Description"
- trigger: session-logger
mode: auto
contextRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.