critical-path

A sprint planning command that maps dependencies between work items and finds the critical path—the longest chain of work that determines when the sprint can finish.

In plain words
What is it for?
Use it to analyze the active sprint or a chosen sprint, identify at-risk tickets, and output the dependency graph or results as text, JSON, Markdown, Mermaid, or a Slack message.
Why use it?
It shows which delayed items could delay the whole sprint and where work can happen in parallel. This makes schedule risks easier to spot than reviewing tickets one by one.

Command for Claude Code

Part of the claude-workflow plugin — 10 skills, 25 commands, 3 agents, 6 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/parkerm2/create-claude-workflow/critical-path
Clone the repo
git clone --depth 1 https://github.com/ParkerM2/create-claude-workflow

Made for: Claude Code.

Or install claude-workflow, the plugin that ships this one along with the rest of its 10 skills, 25 commands, 3 agents, 6 hooks.

Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,634 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.04634
Opus 5 $0.00006 $0.02317
Sonnet 5 $0.00002 $0.00927
Haiku 4.5 $0.00001 $0.00463

Measured 3d ago against content hash 3ebb4ff1cebd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

critical-path scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/critical-path.md · 703 lines

How it starts

The opening of the file, as written. The whole thing — 703 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Sprint Critical Path Analysis

Builds a dependency graph of all sprint tickets, identifies the critical path (longest chain of dependent work), and flags at-risk items that could delay sprint completion. Reveals parallel work opportunities.

Usage

/critical-path [--sprint <sprint-id>] [--mermaid] [--slack] [--format text|json]
  • --sprint <id>: Analyze specific sprint (defaults to active)
  • --mermaid: Output dependency graph as Mermaid diagram
  • --slack: Share critical path to Slack channel
  • --format: Output format (text, json, markdown)

Workflow

Phase 1: Data Collection

Fetches all active sprint tickets with dependency relationships.

class SprintAnalyzer {
  constructor() {
    this.sprint = null;
    this.tickets = [];
    this.dependencies = new Map();
  }

  async collectSprintData(sprintId = null) {
    try {
      // Get active sprint
      let sprint = null;
      if (sprintId) {
        sprint = await jira.getSprint({ sprintId });
      } else {
        const sprints = await jira.getSprintsFromBoard({
          boardId: detectBoardId(),
          state: "active"
        });

        if (sprints.length === 0) {
          console.error("ERROR: No active sprint found");
          return gracefulFailure("No active sprint; use --sprint to specify");
        }

        sprint = sprints[0];
      }

      this.sprint = sprint;
      console.log(`✓ Sprint: ${sprint.name} (${sprint.id})`);

      // Fetch all sprint tickets with expanded issue links
      const tickets = await jira.getIssuesByJQL({
        jql: `sprint = ${sprint.id}`,
        expand: ["changelog", "changelog.histories"],
        maxResults: 500
      });

      this.tickets = tickets.map(ticket => ({
        key: ticket.key,
        title: ticket.summary,
        status: ticket.status,
        storyPoints: ticket.customfield_storypoints || 0,
        assignee: ticket.assignee?.name || "Unassigned",
        priority: ticket.priority?.name || "Medium",
        dueDate: ticket.duedate,
        issueLinks: ticket.issuelinks || [],
        created: ticket.created,
        updated: ticket.updated,
        issuetype: ticket.issuetype.name
      }));

      console.log(`✓ Collected ${this.tickets.length} sprint tickets`);
      return this.tickets;
    } catch (err) {
      console.error(`ERROR: Failed to collect sprint data: ${err.message}`);
      return gracefulFailure("Unable to fetch sprint information");
    }
  }

  buildDependencyMap() {
    // Map: ticket key → array of keys it blocks
    const blockingMap = new Map();
    // Map: ticket key → array of keys blocking it
    const blockedByMap = new Map();

    // Initialize maps
    for (const ticket of this.tickets) {
      blockingMap.set(ticket.key, []);
      blockedByMap.set(ticket.key, []);
    }

    // Process issue links
    for (const ticket of this.tickets) {
      for (const link of ticket.issueLinks) {
        const linkType = link.type.name.toLowerCase();

        // "blocks" relationship
        if (linkType === "blocks") {
          const blockedKey = link.outwardIssue?.key;
          if (blockedKey && blockedByMap.has(blockedKey)) {
            blockingMap.get(ticket.key).push(blockedKey);
            blockedByMap.get(blockedKey).push(ticket.key);
          }
        }

        // "is blocked by" relationship
        if (linkType === "is blocked by") {
          const blockerKey = link.outwardIssue?.key;
          if (blockerKey && blockingMap.has(blockerKey)) {
            blockedByMap.get(ticket.key).push(blockerKey);
            blockingMap.get(blockerKey).push(ticket.key);
          }
        }

        // "depends on" relationship
        if (linkType === "depends on" || linkType === "dependency") {
          const depKey = link.outwardIssue?.key;
          if (depKey && blockingMap.has(depKey)) {
            blockingMap.get(depKey).push(ticket.key);
            blockedByMap.get(ticket.key).push(depKey);
          }
        }
      }
    }

    this.dependencies = {
      blocking: blockingMap,
      blockedBy: blockedByMap
    };

    console.log(`✓ Built dependency map`);
    return this.dependencies;
  }
}

const analyzer = new SprintAnalyzer();
await analyzer.collectSprintData(argv.sprint);
analyzer.buildDependencyMap();

Read the full file on GitHub · 703 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 703 lines · 12 tokens per session scan A 3ebb4ff1cebd

Subscribe to this mod's changes

critical-path is a command published in the GitHub repository ParkerM2/create-claude-workflow (4 stars, last pushed 5mo ago), licensed MIT. It adds 12 tokens to every session and 4,634 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.