implement-task
Implement a task with automated LLM-as-Judge verification for critical steps
What this skill does
# Implement Task with Verification
Your job is to implement solution in best quality using task specification and sub-agents. You MUST NOT stop until it critically neccesary or you are done! Avoid asking questions until it is critically neccesary! Launch implementation agent, judges, iterate till issues are fixed and then move to next step!
Execute task implementation steps with automated quality verification using LLM-as-Judge for critical artifacts.
## User Input
```text
$ARGUMENTS
```
---
## Command Arguments
Parse the following arguments from `$ARGUMENTS`:
### Argument Definitions
| Argument | Format | Default | Description |
|----------|--------|---------|-------------|
| `task-file` | Path or filename | Auto-detect | Task file name or path (e.g., `add-validation.feature.md`) |
| `--continue` | `--continue` | None | Continue implementation from last completed step. Launches judge first to verify state, then iterates with implementation agent. |
| `--refine` | `--refine` | `false` | Incremental refinement mode - detect changes against git and re-implement only affected steps (from modified step onwards). |
| `--human-in-the-loop` | `--human-in-the-loop [step1,step2,...]` | None | Steps after which to pause for human verification. If no steps specified, pauses after every step. |
| `--target-quality` | `--target-quality X.X` or `--target-quality X.X,Y.Y` | `4.0` (standard) / `4.5` (critical) | Target threshold value (out of 5.0). Single value sets both. Two comma-separated values set standard,critical. |
| `--max-iterations` | `--max-iterations N` | `3` | Maximum fix→verify cycles per step. Default is 3 iterations. Set to `unlimited` for no limit. |
| `--skip-judges` | `--skip-judges` | `false` | Skip all judge validation checks - steps proceed without quality gates. |
### Configuration Resolution
Parse `$ARGUMENTS` and resolve configuration as follows:
```
# Extract task file (first positional argument, optional - auto-detect if not provided)
TASK_FILE = first argument that is a file path or filename
# Parse --target-quality (supports single value or two comma-separated values)
if --target-quality has single value X.X:
THRESHOLD_FOR_STANDARD_COMPONENTS = X.X
THRESHOLD_FOR_CRITICAL_COMPONENTS = X.X
elif --target-quality has two values X.X,Y.Y:
THRESHOLD_FOR_STANDARD_COMPONENTS = X.X
THRESHOLD_FOR_CRITICAL_COMPONENTS = Y.Y
else:
THRESHOLD_FOR_STANDARD_COMPONENTS = 4.0 # default
THRESHOLD_FOR_CRITICAL_COMPONENTS = 4.5 # default
# Initialize other defaults
MAX_ITERATIONS = --max-iterations || 3 # default is 3 iterations
HUMAN_IN_THE_LOOP_STEPS = --human-in-the-loop || [] (empty = none, "*" = all)
SKIP_JUDGES = --skip-judges || false
REFINE_MODE = --refine || false
CONTINUE_MODE = --continue || false
# Special handling for --human-in-the-loop without step list
if --human-in-the-loop present without step numbers:
HUMAN_IN_THE_LOOP_STEPS = "*" (all steps)
```
### Context Resolution for `--continue`
When `--continue` is used:
1. **Step Resolution:**
- Parse the task file for `[DONE]` markers on step titles
- Identify the last incompleted step
- Launch judge to verify the last INCOMPLETE step's artifacts
- If judge PASS: Mark step as done and resume from the next step
- If judge FAIL: Re-implement the step and iterate until PASS
2. **State Recovery:**
- Check task file location (`in-progress/`, `todo/`, `done/`)
- If in `todo/`, move to `in-progress/` before continuing
- Pre-populate captured values from existing artifacts
### Refine Mode Behavior (`--refine`)
When `--refine` is used, it detects changes to **project files** (not the task file) and maps them to implementation steps to determine what needs re-verification.
1. **Detect Changed Project Files:**
First, determine what to compare against based on git state:
```bash
# Check for staged changes
STAGED=$(git diff --cached --name-only)
# Check for unstaged changes
UNSTAGED=$(git diff --name-only)
```
**Comparison logic:**
| Staged | Unstaged | Compare Against | Command |
|--------|----------|-----------------|---------|
| Yes | Yes | Staged (unstaged only) | `git diff --name-only` |
| Yes | No | Last commit | `git diff HEAD --name-only` |
| No | Yes | Last commit | `git diff HEAD --name-only` |
| No | No | No changes | Exit with message |
- If **both staged AND unstaged**: Compare working directory vs staging area (unstaged changes only)
- If **only staged OR only unstaged**: Compare against last commit
- This ensures refine operates on the most recent work in progress
2. **Map Changes to Implementation Steps:**
- Read the task file to get the list of implementation steps
- For each changed file, determine which step created/modified it:
- Check step's "Expected Output" section for file paths
- Check step's subtasks for file references
- Check step's artifacts in `#### Verification` section
- Build a mapping: `{changed_file → step_number}`
3. **Determine Affected Steps:**
- Find all steps that have associated changed files
- The **earliest affected step** is the starting point
- All steps from that point onwards need re-verification
- Earlier steps (unaffected) are preserved as-is
4. **Refine Execution:**
- For each affected step (in order):
- Launch **judge agent** to verify the step's artifacts (including user's changes)
- If judge PASS: Mark step done, proceed to next
- If judge FAIL: Launch implementation agent with user's changes as context, then re-verify
- User's manual fixes are preserved - implementation agent should build upon them, not overwrite
5. **Example:**
```bash
# User manually fixed src/validation/validation.service.ts
# (This file was created in Step 2)
/implement my-task.feature.md --refine
# Detects: src/validation/validation.service.ts modified
# Maps to: Step 2 (Create ValidationService)
# Action: Launch judge for Step 2
# - If PASS: User's fix is good, proceed to Step 3
# - If FAIL: Implementation agent align rest of the code with user changes, without overwriting user's changes
# Continues: Step 3, Step 4... (re-verify all subsequent steps)
```
6. **Multiple Files Changed:**
```bash
# User edited files from Step 2 AND Step 4
/implement my-task.feature.md --refine
# Detects: Files from Step 2 and Step 4 modified
# Earliest affected: Step 2
# Re-verifies: Step 2, Step 3, Step 4, Step 5...
# (Step 3 re-verified even though no direct changes, because it depends on Step 2)
```
7. **Staged vs Unstaged Changes:**
```bash
# Scenario: User staged some changes, then made more edits
# Staged: src/validation/validation.service.ts (git add done)
# Unstaged: src/validation/validators/email.validator.ts (still editing)
/implement my-task.feature.md --refine
# Detects: Both staged AND unstaged changes exist
# Mode: Compares unstaged only (working dir vs staging)
# Only email.validator.ts is considered for refine
# Staged changes are preserved, not re-verified
# --
# Scenario: User only has staged changes (ready to commit)
# Staged: src/validation/validation.service.ts
# Unstaged: none
/implement my-task.feature.md --refine
# Detects: Only staged changes
# Mode: Compares against last commit
# validation.service.ts changes are verified
```
### Human-in-the-Loop Behavior
Human verification checkpoints occur:
1. **Trigger Conditions:**
- After implementation + judge verification **PASS** for a step in `HUMAN_IN_THE_LOOP_STEPS`
- After implementation + judge + implementation retry (before the next judge retry)
- If `HUMAN_IN_THE_LOOP_STEPS` is `"*"`, triggers after every step
2. **At Checkpoint:**
- Display current step results summary
- Display generated artifacts with paths
- Display judge score and feedback
- AskRelated in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.