Agent skill

Execution

by josstei in josstei/maestro-orchestrate

Phase execution methodology for orchestration workflows with error handling and completion protocols

Apache-2.0Auto-check passedAgent Workflows

Install Execution

skills CLI
$ npx skills add josstei/maestro-orchestrate --skill execution -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install josstei/maestro-orchestrate execution --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/josstei/maestro-orchestrate.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/skills/shared/execution .claude/skills/execution && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
execution
GitHub stars
465
Token cost
~3.1k tokens
SKILL.md length
1,614 words
Files
1
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Phase execution methodology for orchestration workflows with error handling and completion protocols

  • Works in 6 steps: Express bypass (early return) → Read the configured mode → Analyze the implementation plan → …
  • Agent Workflows work in your project
  • SKILL.md covers Execution Mode Gate, State File Access, Hook Lifecycle During Execution and Sequential Execution Protocol, plus 5 more sections
  • Calls node

What it does

Execution is an agent skill from josstei/maestro-orchestrate. Phase execution methodology for orchestration workflows with error handling and completion protocols

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Agent Workflows. The repository describes itself as: Multi-agent orchestration platform for Gemini CLI, Claude Code, Codex, and Qwen Code — 39 specialists, parallel subagents, persistent sessions, and built-in code review…. The licence is Apache-2.0.

When your agent uses it

  • Agent Workflows work in your project

Example prompts

  • “/execution”

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Express bypass (early return)
  2. Read the configured mode
  3. Analyze the implementation plan
  4. Determine the recommendation
  5. Prompt the user
  6. Record and proceed

What it can do on your machine

Read from SKILL.md and the folder at commit 4f5d434. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Execution loads about 3.1k tokens when it runs. Until then it costs about 28 tokens; SKILL.md has 1,614 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~28
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from josstei/maestro-orchestrate at commit 4f5d434, republished under its Apache-2.0 licence (© josstei). 1,614 words, ~3,069 tokens.

Download SKILL.mdSave it as .claude/skills/execution/SKILL.md (or your agent's skills folder).
name
execution
description
Phase execution methodology for orchestration workflows with error handling and completion protocols

Execution Skill

Activate this skill during Phase 3 (Execution) of Maestro orchestration. This skill defines how Maestro executes implementation phases through native subagent delegation.

Execution Mode Gate

Step 0 — Express bypass (early return)

If workflow_mode is express in the current session, STOP HERE. Do not proceed to the execution mode gate. Do not prompt the user. Do not resolve execution mode. Express always dispatches sequentially. Return to the Express Workflow and continue from the delegation step.

<HARD-GATE>
This gate MUST resolve before ANY delegation proceeds. Do not skip it. Do not defer it. Do not begin delegating to subagents until execution_mode is recorded in session state. If you reach a delegation step and execution_mode is not set, STOP and return here.
</HARD-GATE>
Step 1 — Read the configured mode

Read MAESTRO_EXECUTION_MODE (default: ask).

  • If parallel: call update_session with { execution_mode: 'parallel', execution_backend: 'native' } to record in session state. Skip to delegation.
  • If sequential: call update_session with { execution_mode: 'sequential', execution_backend: 'native' } to record in session state. Skip to delegation.
  • If ask: proceed to Step 2.
Step 2 — Analyze the implementation plan

Before prompting the user, analyze the approved plan to generate a recommendation:

  1. Count total phases in the plan

  2. Count phases marked parallel: true (parallelizable phases)

  3. Count distinct parallel batches (groups of parallelizable phases at the same dependency depth)

  4. Count sequential-only phases (phases with blocked_by dependencies that prevent parallelization)

  5. Cross-check file ownership across all phases. If any two phases share a file in their files arrays, those phases CANNOT be parallel-eligible — subtract them from the parallelizable count. Report each overlap as an Overlapping-file Warning in the prompt.

  6. If validate_plan was called during planning and returned a parallelization_profile, use its parallel_eligible and effective_batches counts as the authoritative source for items 1-5 above. These are computed from actual dependency depths and override any manual flag-based counts. If parallelization_profile is not available, use the counts from items 1-5 as-is.

Record these counts — they feed into the prompt.

Step 3 — Determine the recommendation
  • If parallelizable phases ≤ 1 → auto-select sequential. Call update_session with { execution_mode: 'sequential', execution_backend: 'native' }. Inform the user: "All phases are sequential — no parallel batches available." Skip to delegation. Do NOT prompt with a choice. Do NOT call ask_user. Do NOT present options. (Parallelism requires at least 2 phases at the same dependency depth; a single parallel-eligible phase has nothing to batch with.)
<ANTI-PATTERN>
WRONG — 1 parallel-eligible phase but user still prompted:
  Parallel-eligible Phases: 1
  → Presented choice: "Sequential (Recommended)" / "Parallel"

When parallelizable phases ≤ 1, there is NO choice to make. Auto-select sequential and skip directly to delegation. Do not show a picker. </ANTI-PATTERN>

  • If parallelizable phases > 50% of total phases → recommend parallel
  • If parallelizable phases ≤ 50% but > 1 → recommend sequential (limited benefit)
  • The recommended option appears first in the ask_user options list with "(Recommended)" appended to its label. The non-recommended option MUST NOT include "(Recommended)" in its label.
Step 4 — Prompt the user

Call ask_user with type: 'choice' using exactly one of these option sets:

When recommending parallel: options: - label: "Parallel (Recommended)" description: "Spawn child agents for each ready batch where file ownership does not overlap." - label: "Sequential (High Precision)" description: "Spawn one child agent at a time in dependency order."

When recommending sequential: options: - label: "Sequential (Recommended)" description: "Spawn one child agent at a time in dependency order." - label: "Parallel" description: "Spawn child agents for each ready batch where file ownership does not overlap."

<ANTI-PATTERN>
WRONG — Both options labeled "(Recommended)":
  options:
    - label: "Parallel (Recommended)"
    - label: "Sequential (High Precision) (Recommended)"

Only ONE option receives the "(Recommended)" suffix. Never both. </ANTI-PATTERN>

Prompt the user for a choice using the user-prompt tool from runtime context. Replace [N], [M], and [B] with actual counts from Step 2. The prompt should convey the execution mode analysis and offer two options as described above.

Step 5 — Record and proceed
  1. Call update_session with the selected execution_mode and execution_backend: native
  2. The tool atomically persists both fields
  3. Use the selected mode for the remainder of the session unless the user changes it
Mode-specific behavior
  • If parallel is selected and a ready batch has only one phase, execute it sequentially
  • If sequential is selected, preserve plan order even when phases are parallel-safe
Safety fallback

If execution_mode is not present in session state at the point where delegation is about to begin, STOP. Do not default to sequential. Return to this gate and resolve it. This catches any edge case where the gate was skipped.

State File Access

When MCP state tools (get_session_status, update_session, transition_phase) are available, prefer them for state operations. They provide structured I/O and atomic transitions.

When MCP tools are not available, state lives inside <MAESTRO_STATE_DIR> and is accessible through read_file and write_file.

Helper scripts remain available for shell-injected command prompts:

bash
node <runtime-script-root>/read-state.js <relative-path>
node <runtime-script-root>/read-active-session.js

Hook Lifecycle During Execution

Hooks fire automatically at agent boundaries. The orchestrator does not invoke them directly.

The hooks system tracks which agent is currently executing. Before each agent dispatch, a hook resolves the active agent identity from the required Agent: header first, then falls back to legacy env/regex detection, and injects compact session context. After completion, a hook validates that the response contains both Task Report and Downstream Context; it requests one retry on the first malformed response.

The hook state directory under ${MAESTRO_HOOKS_DIR:-<os.tmpdir()>/maestro-hooks-<uid>}/<session-id>/ is transient and separate from orchestration state.

Sequential Execution Protocol

For a sequential phase:

  1. Verify all blocked_by dependencies are completed
  2. Mark the phase in_progress
  3. Update current_phase
  4. Set current_batch: null
  5. Update the progress-tracking tool (use the tool names from get_runtime_context) before delegation
  6. Delegate to the assigned agent with the required header and full context
  7. Parse the returned handoff
  8. Update session state
  9. Mark the phase completed or failed
  10. Update the progress-tracking tool after the state update

Native Parallel Execution Protocol

Use native parallel execution only for sibling phases at the same dependency depth with non-overlapping file ownership.

Show full SKILL.md (637 more words)Show less
Batch Rules
  1. Verify all blocking phases for every phase in the batch are completed
  2. Slice the ready batch into the current dispatch chunk using MAESTRO_MAX_CONCURRENT
  3. Mark only the current chunk phases in_progress
  4. Set current_batch in session state for that chunk
  5. Write one in-progress todo item for the chunk
  6. In the next turn, emit only agent tool calls for that chunk
  7. Do not mix shell commands, validation commands, file writes, or narration between those agent calls
  8. MAESTRO_MAX_CONCURRENT=0 means emit the entire ready batch in one turn
Native Constraints
  • The runtime only parallelizes contiguous agent calls in one turn
  • Native subagents currently run without user approval gates
  • ask_user remains available; a batch may pause while waiting for user input
  • If execution is interrupted, restart unfinished in_progress phases on resume instead of attempting to restore in-flight subagent interactions

Progress Context

Include the following in every delegation query body:

text
Progress: Phase [N] of [M]: [Phase Name]
Session: [session_id]

For native parallel batches, also include the batch identifier in the required header:

text
Agent: <agent_name>
Phase: <id>/<total>
Batch: <batch_id>
Session: <session_id>

Error Handling Protocol

Record all errors in session state with:

  • agent
  • timestamp
  • type
  • message
  • resolution
Retry Logic
  • Maximum retries per phase: MAESTRO_MAX_RETRIES (default 2)
  • First failure: analyze, adjust context/scope, retry automatically
  • Subsequent failures up to the limit: continue retrying with clearer constraints
  • Limit exceeded: mark the phase failed and escalate to the user

Increment retry_count on each retry.

Recovery Protocol

When a subagent terminates early, times out, returns malformed output, or when delegation.constraints.result_surface is deferred and the agent's text cannot be retrieved:

  1. Poll: For deferred-result runtimes (Codex), call the runtime's wait tool (wait_agent equivalent) with a bounded timeout. For synchronous runtimes, the initial dispatch return IS the result.
  2. Detect drift: Call scan_phase_changes(session_id, phase_id). If the returned candidates.created or candidates.modified arrays are non-empty, the agent produced filesystem output without a handoff.
  3. Ask the user to confirm: Using the runtime's user-prompt tool, present the scan candidates and ask the user to confirm which files belong to this phase. For a parallel batch, include the planned_files from each phase's session state to assist attribution. If the scan surfaces files beyond any phase's planned_files, raise a blocker and surface the ambiguity to the user rather than silently attributing.
  4. Reconcile: Call reconcile_phase(session_id, phase_id, files_created, files_modified, files_deleted, downstream_context, reason) with the user-confirmed manifest. This clears requires_reconciliation.
  5. Retry or advance: If the user chose to retry the agent, re-delegate with the original scope plus the scan results as context. If the user accepted the work as delivered, advance to the next phase.

Record all recovery events in session state with {agent, timestamp, type: 'recovery', resolution: 'retry'|'reconciled'|'aborted'}.

File Conflict Handling

When a subagent reports a file conflict:

  1. Stop execution immediately
  2. Record the conflicting files and phases
  3. Do not attempt automatic merge resolution
  4. Ask the user how to proceed

Subagent Output Processing

Native subagent results are wrapped. Do not assume the handoff begins at byte 0.

Parsing Rules
  1. Locate ## Task Report (or # Task Report) inside the returned text
  2. Locate ## Downstream Context (or # Downstream Context) inside the returned text
  3. Parse:
    • status
    • files created / modified / deleted
    • downstream context fields
    • validation result
    • reported errors
  4. Persist the full raw output plus the parsed fields into session state
State Update Sequence

After processing each handoff:

  1. Update the phase file manifests
  2. Update downstream_context
  3. Append any errors
  4. Aggregate token usage
  5. If validation passed, mark the phase completed
  6. If validation failed, trigger retry logic
  7. Update updated
  8. Advance or clear current_batch as each chunk finishes

Completion Protocol

When all phases are completed:

  1. Verify there are no failed or pending phases
  2. Confirm plan deliverables are accounted for
  3. Run the final code-review gate for non-documentation changes
  4. Archive the session through session-management
  5. Present a final summary with deliverables, files changed, token usage, deviations, and review status

© josstei, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in src/skills/shared/execution of josstei/maestro-orchestrate.

Open the folder on GitHubat commit 4f5d434

Compare with similar skills

Execution next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Execution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Execution this skilljosstei/maestro-orchestrate465—~3.1kAutomated safety check: PassApache-2.0
MCP Server Builderanthropics/skills180k62 repos~2.3kAutomated safety check: PassApache-2.0
Hook Development for Claude Code Pluginsanthropics/claude-plugins-official37k11 repos~4.1kAutomated safety check: NotesApache-2.0
Using Superpowersfarm-fe/farm5.6k34 repos~1.4kAutomated safety check: PassMIT
Executing Plans Inlineobra/superpowers296k2 repos~5.1kAutomated safety check: PassMIT
Claude Code Agent Developmentanthropics/claude-plugins-official37k8 repos~2.8kAutomated safety check: PassApache-2.0

Similar skills

  • MCP Server Builder

    anthropics/skills

    Official

    Guides the design and implementation of Model Context Protocol servers in TypeScript or Python, from tool naming and error messages to evaluation.

    180k GitHub starsUsed in 62 repos~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Hook Development for Claude Code Plugins

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.

    37k GitHub starsUsed in 11 repos~4.1k tokens
    Agent WorkflowsAuto-check: notes
  • Using Superpowers

    farm-fe/farm

    A skill your agent uses when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions

    5.6k GitHub starsUsed in 34 repos~1.4k tokens
    Agent WorkflowsAuto-check passed
  • Executing Plans Inline

    obra/superpowers

    Has the agent carry out an implementation plan itself, task by task in the current session, keeping a ledger, proving each step with a test and ending with one whole-branch review.

    296k GitHub starsUsed in 2 repos~5.1k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Agent Development

    anthropics/claude-plugins-official

    Official

    Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.

    37k GitHub starsUsed in 8 repos~2.8k tokens
    Agent WorkflowsAuto-check passed
  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    794 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed

More from josstei/maestro-orchestrate

All 17 skills in this repo
  • Code Review

    josstei/maestro-orchestrate

    Standalone code review methodology for structured, severity-classified code assessment

    465 GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • Implementation Planning

    josstei/maestro-orchestrate

    Generates detailed implementation plans from finalized designs

    465 GitHub stars~4.4k tokensUpdated today
    Auto-check passed
  • Session Management

    josstei/maestro-orchestrate

    Manages orchestration session state, tracking, and resumption

    465 GitHub stars~3.5k tokensUpdated today
    Auto-check passed
  • Validation

    josstei/maestro-orchestrate

    Cross-cutting validation methodology for verifying phase outputs and project integrity

    465 GitHub stars~2.3k tokensUpdated today
    Auto-check passed
  • Delegation

    josstei/maestro-orchestrate

    Agent delegation best practices for constructing effective subagent prompts with proper scoping

    465 GitHub stars~5.2k tokensUpdated today
    Auto-check passed
  • A11y Audit

    josstei/maestro-orchestrate

    Run a Maestro-style accessibility audit for WCAG compliance, ARIA usage, keyboard navigation, and screen reader compatibility

    465 GitHub stars~245 tokensUpdated today
    Auto-check passed

Categories

Questions about Execution

What does Execution do?

Phase execution methodology for orchestration workflows with error handling and completion protocols. Execution is an agent skill from josstei/maestro-orchestrate.

When should I use Execution?

Execution fits situations like: agent Workflows work in your project.

How do I install Execution in Claude Code?

Run `npx skills add josstei/maestro-orchestrate --skill execution -a claude-code`. Or copy the skill folder (src/skills/shared/execution in josstei/maestro-orchestrate) into .claude/skills/execution in your project. Claude Code loads it when a task matches its description.

How do I install Execution in Codex?

Run `npx skills add josstei/maestro-orchestrate --skill execution -a codex`. Or copy the skill folder (src/skills/shared/execution in josstei/maestro-orchestrate) into .agents/skills/execution in your project. Codex loads it when a task matches its description.

Can I use Execution in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add josstei/maestro-orchestrate --skill execution -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/execution, .gemini/skills/execution, .github/skills/execution and .opencode/skills/execution in your project.

What does Execution need to run?

Going by SKILL.md and its folder, Execution needs the command-line tools its instructions call (node).

Does Execution access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Execution safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Execution use?

Execution is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Execution use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Execution?

Skills that share tags, products or a category with Execution: MCP Server Builder (anthropics/skills, 180k stars), Hook Development for Claude Code Plugins (anthropics/claude-plugins-official, 37k stars), Using Superpowers (farm-fe/farm, 5.6k stars) and Executing Plans Inline (obra/superpowers, 296k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Execution?

josstei (a GitHub user) maintains it in josstei/maestro-orchestrate, which has 465 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on October 6, 2026.

Source: josstei/maestro-orchestrate on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.