Command Palette

Search for a command to run...

UnylyUnyly
Back to skills

source-command-loop

FreeNo executable scriptsNot checked

Start continuous development loop for automated workflows

databaytby databayt★ 19 GitHub stars

About this skill

source-command-loop

Use this skill when the user asks to run the migrated source command loop.

Command Template

Loop Command - Continuous Automation

Launch orchestrated loops for automated development workflows that run until targets are met.

Usage

/loop [type] [target]

Loop Types

Story Loop

Execute all stories in an epic

/loop story EPIC-001

Bug Loop

Fix bugs matching criteria

/loop bug priority:high
/loop bug status:open assignee:me

Refactor Loop

Improve code quality to target

/loop refactor coverage:95
/loop refactor complexity:10

Test Loop

Increase test coverage

/loop tests 95  # Target 95% coverage

Examples

# Execute all stories in epic
/loop story EPIC-001-student-attendance

# Fix all critical bugs
/loop bug priority:critical status:open

# Refactor until 95% coverage and low complexity
/loop refactor coverage:95 complexity:8

# Write tests until 95% coverage
/loop tests 95

# Quality improvement loop
/loop quality all  # Runs all quality improvements

Story Loop

Executes stories with full TDD cycle:

/loop story EPIC-001

Process:

  1. Load stories from epic
  2. Order by dependencies
  3. For each story:
    • Write tests (TDD)
    • Implement feature
    • Validate tests pass
    • Commit changes
  4. Update metrics
  5. Generate report

Bug Loop

Systematically fixes bugs:

/loop bug priority:high

Process:

  1. Query bugs by filter
  2. For each bug:
    • Create reproduction test
    • Debug with 5 Whys
    • Implement fix
    • Verify tests pass
    • Commit fix
  3. Update bug tracker
  4. Generate fix report

Filters:

  • priority: critical, high, medium, low
  • status: open, in_progress
  • assignee: username
  • label: bug label
  • age: days since created

Refactor Loop

Improves code quality:

/loop refactor coverage:95 complexity:10

Process:

  1. Analyze code quality metrics
  2. Identify improvement areas
  3. For each issue:
    • Ensure test coverage
    • Apply refactoring
    • Verify tests pass
    • Measure improvement
  4. Commit improvements
  5. Update quality metrics

Targets:

  • coverage: Test coverage percentage
  • complexity: Cyclomatic complexity
  • smells: Code smell count
  • lint: Linting error count
  • types: TypeScript error count

Test Loop

Generates tests systematically:

/loop tests 95

Process:

  1. Measure current coverage
  2. Find uncovered code
  3. For each uncovered file:
    • Generate test cases
    • Write test implementation
    • Run tests
    • Update coverage
  4. Commit new tests
  5. Generate coverage report

Progress Display

Real-time progress tracking:

═══════════════════════════════════════
🔄 LOOP PROGRESS
═══════════════════════════════════════
Type: Bug Fix Loop
Filter: priority:high
Progress: ████████████░░░░░░░ 60%
Bugs Fixed: 6/10
Success Rate: 100%
Time: 1h 30m elapsed
ETA: 45m remaining
═══════════════════════════════════════

Current: Fixing BUG-123 - Login validation
Status: Running tests...

Stop Conditions

Loops stop when:

  • Target achieved ✓
  • All items processed ✓
  • Max iterations reached (default: 50)
  • Max duration reached (default: 4 hours)
  • Error threshold exceeded (3 consecutive)
  • User interruption (Ctrl+C)

Checkpoint System

Automatic Checkpoints

  • Saved after each item
  • Allows resume after interruption
  • Preserves progress

Resume Loop

/loop resume [loop-id]

View Checkpoints

/loop status

Configuration

Loop Settings

{
  "loop": {
    "maxIterations": 50,
    "maxDuration": "4h",
    "stopOnError": false,
    "saveCheckpoints": true,
    "delayBetweenItems": 1000,
    "parallel": false
  }
}

Custom Targets

# Multiple targets
/loop refactor coverage:95 complexity:10 smells:0

# Complex bug filter
/loop bug "priority:high AND (label:security OR label:performance)"

Error Recovery

Retry Strategy

  1. Transient errors: Automatic retry (3 attempts)
  2. Persistent errors: Skip and continue
  3. Critical errors: Pause and checkpoint

Error Handling

On Error:
1. Log error details
2. Save checkpoint
3. Determine strategy
4. Apply recovery
5. Continue or pause

Metrics Tracked

Performance Metrics

  • Items processed per hour
  • Success rate
  • Average time per item
  • Error rate

Quality Metrics

  • Coverage improvement
  • Bugs fixed
  • Code complexity reduction
  • Performance gains

Implementation

// Invokes the loop agent
await invokeAgent("/agents/bmad/loop", {
  type: loopType,
  target: loopTarget,
  config: {
    maxIterations: 50,
    maxDuration: 4 * 60 * 60 * 1000,
    saveCheckpoints: true,
  },
})

// Loop agent orchestrates:
// - Loading items to process
// - Executing each item
// - Tracking progress
// - Handling errors
// - Saving checkpoints
// - Generating reports

Loop Combinations

Quality Sprint

/loop quality all
Full SKILL.md on GitHub

Install source-command-loop in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the source-command-loop skill do?

Start continuous development loop for automated workflows

How do I install the source-command-loop skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the source-command-loop skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare source-command-loop with