Claude Code Plugins

Community-maintained marketplace

Feedback

Extract business logic flow from code, trace execution path from entry point

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md


name: flow description: Extract business logic flow from code, trace execution path from entry point model: opus allowed-tools: Bash, Glob, Grep, Read, Write argument-hint: [flow description or entry point, e.g., "user checkout", "from OrderService.create()"] [--force]

SourceAtlas: Flow Analysis

Target: $ARGUMENTS


STEP 0: Mode Detection (EXECUTE IMMEDIATELY)

IMPORTANT: Check these patterns FIRST before doing anything else.

Check for Tier 2-3 Keywords (External Mode Required)

Scan $ARGUMENTS for these keywords. If ANY match, load external file and STOP reading this document:

If arguments contain... Then execute this action
"dead code" OR "unreachable" OR "unused" Read scripts/atlas/flow-modes/mode-13-dead-code.md then follow its instructions
"async" OR "thread" OR "concurrent" OR "race" Read scripts/atlas/flow-modes/mode-14-concurrency.md then follow its instructions
"taint" OR "injection" OR "untrusted" Read scripts/atlas/flow-modes/mode-12-taint-analysis.md then follow its instructions
"state" OR "status" OR "lifecycle" Read scripts/atlas/flow-modes/mode-04-state-machine.md then follow its instructions
"transaction" OR "rollback" OR "commit" Read scripts/atlas/flow-modes/mode-09-transaction.md then follow its instructions
"log" OR "logging" OR "from logs" Read scripts/atlas/flow-modes/mode-06-log-discovery.md then follow its instructions
"compare" OR "diff" OR "vs" Read scripts/atlas/flow-modes/mode-05-flow-comparison.md then follow its instructions
"feature toggle" OR "feature flag" Read scripts/atlas/flow-modes/mode-07-feature-toggle.md then follow its instructions
"cache" OR "redis" OR "TTL" Read scripts/atlas/flow-modes/mode-11-cache-flow.md then follow its instructions

If a keyword matched above: Load the file NOW, then execute ONLY that mode's instructions. Do NOT continue reading this document.

Check for Tier 1 Keywords (Built-in Modes)

If none of the above matched, check for these Tier 1 patterns:

If arguments contain... Mode to use
"who calls" OR "callers" OR "called by" Mode 1: Reverse Tracing (see below)
"error" OR "failure" OR "exception" OR "fail" Mode 2: Error Path (see below)
"data flow" OR "how is X calculated" OR "trace variable" Mode 3: Data Flow (see below)
"event" OR "message" OR "pub/sub" OR "listener" Mode 8: Event Tracing (see below)
"permission" OR "role" OR "auth" OR "access control" Mode 10: Permission Flow (see below)
(none of the above) Standard Flow Tracing (default)

STEP 1: Cache Check

If --force NOT in arguments:

  1. Convert flow name to filename: lowercase, spaces→hyphens, max 50 chars
  2. Check: ls .sourceatlas/flows/{name}.md 2>/dev/null
  3. If exists: Load and output cache, then STOP
  4. If not exists: Continue

STEP 2: Find Entry Point

If explicit path given (e.g., "from OrderService.create()"): β†’ Start tracing immediately

If flow description only (e.g., "checkout flow"): β†’ Search for entry points:

grep -rn "{keyword}" --include="*.ts" --include="*.js" --include="*.py" src/ app/ lib/ 2>/dev/null | head -15

β†’ Present options if multiple matches


STEP 3: Trace Flow

From entry point, trace each step:

  1. Read the function
  2. Identify what it calls
  3. Follow the chain (depth: 5 levels default)
  4. Stop at boundaries (DB, external API, third-party)

For each step capture:

  • Function name
  • File:line location
  • Business meaning
  • Notable patterns (πŸ”’ security, πŸ’Ύ DB, 🌐 API, ⚑ async, ⚠️ risk)

STEP 4: Output Format

{Flow Name}
===========

Entry Point: {file}:{line}

β”Œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Step β”‚ Operation                    β”‚ Location              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  1   β”‚ {description}                β”‚ {file}:{line}         β”‚
β”‚  2   β”‚ {description}                β”‚ {file}:{line}         β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Flow Diagram:
{entry}() β†’ {step1}() β†’ {step2}() β†’ {step3}()

Notable Patterns:
β”œβ”€β”€ πŸ”’ {pattern1}
β”œβ”€β”€ πŸ’Ύ {pattern2}
└── ⚠️ {pattern3}

───────────────────────────────────
πŸ“Š Mode: Standard | Confidence: ~85% | Depth: 5
───────────────────────────────────

Tier 1 Mode: Reverse Tracing

Trigger: "who calls", "callers", "called by"

Find all callers of target function:

Who calls {function}?
=====================

Callers (N found):
β”œβ”€β”€ {Caller1}()  β†’ {description}
β”‚   πŸ“ {file}:{line}
β”œβ”€β”€ {Caller2}()  β†’ {description}
β”‚   πŸ“ {file}:{line}
└── {Caller3}()  β†’ {description}
    πŸ“ {file}:{line}

πŸ’‘ Modifying {function} affects these {N} callers

Tier 1 Mode: Error Path

Trigger: "error", "failure", "exception", "fail"

Trace failure scenarios:

{Flow} Error Paths
==================

1. {Step}
   πŸ“ {file}:{line}
   ⚠️ Failure β†’ {ErrorType}
      └── {what happens}

πŸ“Œ Risk: {identified risk}

Tier 1 Mode: Data Flow

Trigger: "data flow", "how is X calculated", "trace variable"

Track data transformations:

Data Flow: {variable}
=====================

[Input] {source}
   ↓
1. {Transform}  β†’ {result}
   πŸ“ {file}:{line}
   ↓
[Output] {final}

Tier 1 Mode: Event Tracing

Trigger: "event", "message", "pub/sub", "listener"

{EVENT} Tracing
===============

πŸ“€ Emission: {Publisher}() β†’ emit("{EVENT}")
   πŸ“ {file}:{line}

πŸ“₯ Listeners:
β”œβ”€β”€ {Listener1}()  β†’ {action}
β”‚   πŸ“ {file}:{line}
└── {Listener2}()  β†’ {action}
    πŸ“ {file}:{line}

Tier 1 Mode: Permission Flow

Trigger: "permission", "role", "auth", "access control"

{Operation} by Role
===================

[ADMIN] β†’ Full access
β”œβ”€β”€ {check}  πŸ” @RequireRole("ADMIN")
└── πŸ“ {file}:{line}

[USER] β†’ Limited access
β”œβ”€β”€ {check}  πŸ” @CheckOwnership
└── πŸ“ {file}:{line}

Self-Verification

Before output, verify:

  1. File paths exist: test -f {path}
  2. Methods exist: grep -q "{method}" {file}

Add to footer: βœ… Verified: [N] paths, [M] methods


Auto-Save (Default Behavior)

After analysis completes, automatically:

  1. mkdir -p .sourceatlas/flows
  2. Save to .sourceatlas/flows/{name}.md
  3. Append: πŸ’Ύ Saved to .sourceatlas/flows/{name}.md

Deprecated: --save flag

If --save is in arguments:

  • Show: ⚠️ --save is deprecated, auto-save is now default
  • Remove --save from arguments
  • Continue normal execution (still auto-saves)

πŸ—ΊοΈ SourceAtlas v3.0 β”‚ Tiered Architecture