workflow-detection

Detect Epic or Feature workflows and return JSON metadata for Bash and PowerShell.

91|10|Updated Oct 4, 2025
One-click install
npx skills add https://github.com/marcusgoll/Spec-Flow --skill workflow-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: workflow-detection
Source: https://github.com/marcusgoll/Spec-Flow/tree/main/.claude/skills/workflow-detection
Command: npx skills add https://github.com/marcusgoll/Spec-Flow --skill workflow-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a centralized source of truth for detecting workflow type across all phase and deployment commands, reducing duplication across 44 commands.

Core Features & Use Cases

  • Centralized workflow type detection across commands.
  • Output format includes type, base_dir, slug, branch, source, is_worktree.
  • Works with both bash and PowerShell wrappers.
  • Path variables exposed for downstream commands.

Quick Start

  1. Detect workflow type using a centralized utility:
    • Bash: bash .spec-flow/scripts/utils/detect-workflow-paths.sh
    • PowerShell: pwsh -File .spec-flow/scripts/utils/detect-workflow-paths.ps1
  2. Read output JSON fields: type, base_dir, slug, branch, source, is_worktree.
  3. Use $WORKFLOW_TYPE etc. in subsequent commands.

Frequently Asked Questions about workflow-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect workflow type across multiple deployment commands?

Workflow type detection identifies whether you're running Epic or Feature workflows by analyzing workspace layout, Git branches, and state. This Skill centralizes that detection across all phase and deployment commands, eliminating duplication and returning a standardized JSON payload with type, base_dir, slug, branch, source, and is_worktree fields.

Can I use workflow detection with both Bash and PowerShell?

Yes, workflow detection works with both Bash and PowerShell environments. The Skill provides separate scripts for each: detect-workflow-paths.sh for Bash and detect-workflow-paths.ps1 for PowerShell, exposing path variables for downstream commands in both shells.

What happens when workflow type detection fails?

When automated detection fails based on workspace layout and Git state, the Skill falls back to prompting the user for input. It returns exit code 0 on successful detection or exit code 1 on failure, allowing scripts to handle both outcomes.

How does workflow detection handle Git worktrees?

Workflow detection identifies Git worktrees and includes worktree-specific fields in the JSON output when is_worktree is true. This allows commands to apply worktree-aware logic for type detection and downstream processing.

What information does workflow detection return?

Workflow detection returns a JSON payload containing type (Epic or Feature), base_dir (repository root), slug (workflow identifier), branch (current Git branch), source (detection method used), and is_worktree (boolean), plus additional fields when working within a Git worktree.

Why centralize workflow detection instead of duplicating logic across commands?

Centralizing workflow detection across 44 commands reduces code duplication, ensures consistency in how Epic and Feature workflows are identified, and simplifies maintenance when detection logic needs updates across your entire command suite.