All skills
aktsmm avatar

/agentic-workflow-guide

@fb34748
by yamapanaktsmm/agent-skills26 stars
4

Design, review, and debug agent workflows, and decide when a request should use a prompt, instruction, skill, agent, or hook before escalating to multi-agent design. Use for .agent.md / .instructions.md / .prompt.md / AGENTS.md work, workflow architecture, orchestration planning, scheduled automation model allocation, or when agent workflows may be overkill. Triggers on 'agent workflow', 'create agent', 'automation models', 'ワークフロー設計', 'orchestrator'.

Use this Skill: https://skilld.dev/gh/aktsmm/agent-skills/agentic-workflow-guide

This session only. Nothing lands on disk.

referencesworkflow-patterns3-parallelization.md

≈1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Pattern 3: Parallelization

Execute independent tasks simultaneously

Back to overview.md

Diagram

graph TD
    A[Input] --> B[Task 1]
    A --> C[Task 2]
    A --> D[Task 3]
    B --> E[Aggregator]
    C --> E
    D --> E
    E --> F[Output]

Characteristics

Aspect Description
Structure Split → parallel execution → aggregate
Benefits Reduced processing time, robustness from independence
Variations Sectioning (division), Voting (majority decision)

When to Use

  • Tasks are independent (no shared state)
  • Parallel execution can reduce time
  • Multiple perspectives/results are desired

Implementation Example

Input: Document
├─ Agent 1: Grammar check
├─ Agent 2: Content accuracy check
└─ Agent 3: Style check
    ↓
Aggregator: Integrate all results

VS Code Copilot: runSubagent Parallel Invocation

Key Finding

runSubagent calls can be invoked simultaneously from an Orchestrator agent. The runtime executes them concurrently and returns all results before the Orchestrator proceeds.

Safety Requirements

Before parallelizing, verify all three conditions:

Condition Check Example
No file conflict Each agent writes to different output files A→file1.json, B→file2.json
No COM conflict At most one agent uses COM (e.g., PowerPoint) Only Build agent opens .pptx
No data dependency Agents don't read each other's outputs A doesn't need B's result

Implementation Pattern

# In Orchestrator agent definition:
# Call all three runSubagent simultaneously

runSubagent("Review",          prompt: "...", description: "Review: MCP verification")
runSubagent("Build PPTX",      prompt: "...", description: "Build: slide insertion")
runSubagent("Notes Generator", prompt: "...", description: "Notes: speaker notes generation")

# All three execute concurrently. Results return together.
# Orchestrator then verifies all succeeded before proceeding.

Dependency Table Template

Use this table in the Orchestrator's Step definition to document parallelization safety:

| Agent           | Input               | Output               | COM | Conflict |
| --------------- | ------------------- | -------------------- | --- | -------- |
| Review          | region_info.json    | region_reviewed.json | No  | None     |
| Build PPTX      | classification.json | output.pptx          | Yes | None     |
| Notes Generator | classification.json | notes.json           | No  | None     |

Gate Pattern (Wait for All)

After parallel execution, use a Gate to verify all agents completed:

Gate: All parallel agents completed
  - [ ] Agent A output exists and is valid
  - [ ] Agent B output exists and is valid
  - [ ] Agent C output exists and is valid
  → PASS: proceed to next step
  → FAIL: identify which agent failed, retry only that one

Performance Impact

Parallel execution reduces wall-clock time from sum(A, B, C) to max(A, B, C), typically 30-40% faster for 3 parallel agents.

Anti-Patterns

❌ Anti-Pattern ✅ Correct Approach
Two agents writing to same file Separate output files per agent
Two agents using COM simultaneously Only one COM agent in parallel group
Agent B reads Agent A's output Sequential execution, not parallel
Parallel agents calling run_in_terminal simultaneously Stagger or isolate terminal usage

Source: SKILL.md on GitHub

2 warnings4mo4 checks · Risk SAFE
  • Gen Agent Trust Hub4mo

    This skill is a professional development toolkit for designing, reviewing, and managing AI agent workflows. It provides structured templates, architectural guidance, and utility scripts to help users build efficient multi-agent systems following best practices like Single Responsibility and Single Source of Truth.

  • Socket4mo

    No alerts

  • Snyk4mo

    Risk: MEDIUM · 1 issue

  • Runlayer7mo

    15/58 files flagged

Signed by skilld at fb34748. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 17 hours ago.

Activeupdated last week
user-invocable
true
metadata
{
  "author": "yamapan (https://github.com/aktsmm)"
}
Other metadata
argument-hint
作りたい .agent.md / .instructions.md / .prompt.md / AGENTS.md、設計したい workflow、または困っている症状

README badge

README badge for aktsmm/agent-skills/agentic-workflow-guide