Skip to content
Automation
Command

/implement-loop

Implement from conversation context with iterative loop

From plugin
essentials-claude-code
8925 skills8 agents25 commands
> /plugin marketplace add GantisStorm/essentials-claude-code
> /plugin install essentials@essentials-claude-code

Command definition

implement-loop.md
description: "Implement from conversation context with iterative loop"
argument-hint: "<task description>"
allowed-tools: ["TaskCreate", "TaskUpdate", "TaskList", "TaskGet", "Bash", "Edit", "Read", "Glob", "Grep", "Write"]
model: opus

Implement Loop Command

Execute implementation from conversation context and task description. Loops until exit criteria pass.

**Note:** Loop and swarm are interchangeable - swarm is just faster when tasks can run in parallel. Both enforce exit criteria and sync state.

**Source:** Conversation context + argument input + mentioned files.

Uses Claude Code's built-in Task Management System for dependency tracking and visual progress (`ctrl+t`).

Arguments

  • `<task description>` (required): What to implement (e.g., "fix the auth bug we discussed", "add the login feature")

Instructions

Step 1: Create Task Graph Immediately

**ONLY use what's already available:**

  • The user's argument input
  • Conversation history (already in context)

**DO NOT:**

  • Read files unless the user explicitly asks you to
  • Grep or explore the codebase
  • Use Glob to find files
  • Spawn sub-agents or delegate work — do ALL implementation directly yourself

Create tasks immediately from context. Include file paths in task descriptions so they can be read during execution.

For each work item, create a task:

TaskCreate({
  "subject": "Fix auth token validation",
  "description": "Full implementation details from context",
  "activeForm": "Fixing auth token validation"
})

**Set dependencies with `addBlockedBy`** — identify which tasks depend on others completing first:

// Task 2 needs the type fix from task 1
TaskUpdate({
  "taskId": "2",
  "addBlockedBy": ["1"]
})

A task with non-empty `blockedBy` shows as **blocked** in `ctrl+t`. When a blocking task is marked `completed`, it's automatically removed from the blocked list. A task becomes **ready** (executable) when its blockedBy list is empty.

Step 2: Execute Tasks Sequentially

For each task (in dependency order):

1. **Claim**: `TaskUpdate({ taskId: "N", status: "in_progress" })` 2. **Read files as needed**: Use Read tool on file paths from task description 3. **Implement**: Make changes based on context 4. **Verify**: Run any task-specific verification 5. **Complete**: `TaskUpdate({ taskId: "N", status: "completed" })` 6. **Next**: Find next unblocked task via TaskList

Step 3: Run Exit Criteria

Before declaring completion: 1. Run the verification (tests, commands, etc.) 2. If pass → "Exit criteria passed" 3. If fail → fix issues and retry

Step 4: Loop Until Done

Continue until:

  • All tasks completed AND
  • Exit criteria pass

Say **"Exit criteria passed"** when complete.

Visual Progress

Press `ctrl+t` to see task progress:

Tasks (2 done, 1 in progress, 3 open)
✓ #1 Fix token validation
■ #2 Update error handling
□ #3 Add tests > blocked by #2

Context Tips

  • Reference specific messages: "As we discussed, the token should..."
  • Use patterns agreed upon in conversation
  • If anything is unclear, ask before implementing

Error Handling

| Scenario | Action | |----------|--------| | Context unclear | Ask for clarification | | Exit criteria fail | Fix issues and retry | | Context compacted | TaskList → continue |

Example Usage

# After discussing a bug
/implement-loop fix the auth bug we discussed

# After agreeing on a feature
/implement-loop add the user profile endpoint

# Reference specific discussion
/implement-loop implement the caching strategy from above
Read more
@gantisstorm
Ships withessentials-claude-code

Loops, swarms, and teams powered by Claude Code's built-in Task System. Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams.

895 skills8 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
89
Star history of GantisStorm/essentials-claude-code on GitHub, a chart by star-history.com

Other commands on essentials-claude-code.

More commands from other plugins.

plan

plan

Command

Plan n8n Linear ticket implementation

n8n2w209k
@n8n-io@n8n-ioInstall Command
setup

setup

Command

One-time setup after installing ARIS as a Claude Code plugin — registers the Codex reviewer MCP server from the plugin directory…

aris2w18k
@wanshuiyin@wanshuiyinInstall Command
agent
Auto-invoked

agent

Command

name: sc:agent description: SC Agent — session controller that orchestrates investigation, implementation, and review category:…

@galaxy-dawn@galaxy-dawnInstall Command