$npx -y skills add Codagent-AI/agent-skills --skill implement-and-validateAutonomous implementer agent that executes a single task end-to-end using TDD and verifies with Agent Validator. Activates for requests such as "implement this task", "finish this ticket", "apply this spec end-to-end", or "complete the implementation".
| 1 | Implement a single task from start to finish. Verify with self-review and the validator. Return a report. |
| 2 | |
| 3 | ## Your Task |
| 4 | |
| 5 | ## Implementation Methodology |
| 6 | |
| 7 | Implement the specified task using the `codagent:implement-with-tdd` skill. |
| 8 | |
| 9 | Implement exactly what the task specifies — no extra features, refactoring, or improvements beyond scope. Follow existing code patterns and conventions. |
| 10 | |
| 11 | ## Self-Review |
| 12 | |
| 13 | After implementation is complete, perform a structured self-review: |
| 14 | |
| 15 | 1. Is every scenario from the task spec implemented? |
| 16 | 2. Are there any changes not justified by the task spec? |
| 17 | 3. Are all success criteria met? |
| 18 | 4. Do all tests and linters pass? |
| 19 | |
| 20 | If self-review finds issues, fix them before proceeding to the validator. |
| 21 | |
| 22 | ## Validator Integration |
| 23 | |
| 24 | After self-review passes, run the validator directly using the steps below. Do NOT invoke the `agent-validator:validator-run` skill — follow these instructions instead. |
| 25 | |
| 26 | 1. **Clean up stale lock** (safe — tasks are dispatched sequentially, never in parallel): |
| 27 | ```bash |
| 28 | mkdir -p validator_logs |
| 29 | rm -f validator_logs/.validator-run.lock |
| 30 | ``` |
| 31 | |
| 32 | 2. **Run the validator with output captured to a file** (Bun can drop stdout/stderr during LLM review subprocesses, so always redirect to a file): |
| 33 | ```bash |
| 34 | agent-validator run > validator_logs/_subagent-run.log 2>&1; printf 'VALIDATOR_EXIT=%s\n' "$?" >> validator_logs/_subagent-run.log |
| 35 | ``` |
| 36 | Use `Bash` with `timeout: 300000` (5 minutes). Do NOT use `run_in_background`. |
| 37 | |
| 38 | 3. **Read the captured output** (this is the reliable path — do not rely on the Bash tool's stdout capture): |
| 39 | ```bash |
| 40 | cat validator_logs/_subagent-run.log |
| 41 | ``` |
| 42 | |
| 43 | CRITICAL: **Exit code 1 means "violations were found"** — the command ran successfully but detected issues that need fixing. This is NOT an infrastructure failure. Do NOT retry blindly — read the output to understand what needs fixing. |
| 44 | |
| 45 | 4. **Check the `Status:` line** in the output and act accordingly: |
| 46 | - `Status: Passed` or `Status: Passed with warnings` → proceed to commit |
| 47 | - `Status: Failed` → read the violation details from the output. For each violation: |
| 48 | - **CHECK failures**: follow the fix instructions shown in the output |
| 49 | - **REVIEW violations**: fix the code issue described in the violation. If a violation is clearly a false positive, note it in your report but do not block on it. |
| 50 | After fixing, re-run the validator by going back to step 2. **Maximum 3 retry attempts.** |
| 51 | - `Status: Retry limit exceeded` → stop and include the failure details in your report |
| 52 | - **No `Status:` line found** → the output file may be empty (known Bun issue). Read the latest console log instead: |
| 53 | ```bash |
| 54 | ls -t validator_logs/console.*.log 2>/dev/null | head -1 | xargs -r cat |
| 55 | ``` |
| 56 | If no console log exists either, re-run the command once more (go back to step 2). |
| 57 | |
| 58 | ## Commit |
| 59 | |
| 60 | After the validator passes, commit all changes: |
| 61 | |
| 62 | Check if the `commit-commands:commit` skill is available: |
| 63 | |
| 64 | - **If `commit-commands:commit` is available** → invoke it to perform the commit |
| 65 | - **If not available** → stage all changes (including new files), propose a commit message following the conventional commits format (`<type>: <description>`), then run `git commit -m "<message>"` |
| 66 | |
| 67 | ## Blocker Handling |
| 68 | |
| 69 | If you hit a genuine blocker (missing dependency, broken environment, contradictory requirements in the task), return failure immediately with: |
| 70 | - What you attempted |
| 71 | - What blocked you |
| 72 | - Why you cannot proceed |
| 73 | |
| 74 | Do NOT wait for input. Return failure and let the coordinator handle it. |
| 75 | |
| 76 | ## Return Report |
| 77 | |
| 78 | When done, return a natural language report containing: |
| 79 | |
| 80 | 1. **What was implemented**: Summary of changes made |
| 81 | 2. **What was tested**: Tests written/run and their results |
| 82 | 3. **Files changed**: List of files created or modified |
| 83 | 4. **Self-review findings**: Any issues found and fixed during self-review |
| 84 | 5. **Questions**: Any ambiguities or clarifications needed (if applicable) |
| 85 | 6. **Validator status**: "passed" or details on what failed if retry limit was hit |
| 86 | |
| 87 | ### Report format for success: |
| 88 | |
| 89 | ``` |
| 90 | ## Implementation Report |
| 91 | |
| 92 | ### What Was Implemented |
| 93 | <summary> |
| 94 | |
| 95 | ### Test Results |
| 96 | <test details> |
| 97 | |
| 98 | ### Files Changed |
| 99 | - <file1> |
| 100 | - <file2> |
| 101 | |
| 102 | ### Self-Review |
| 103 | <findings> |
| 104 | |
| 105 | ### Validator Status |
| 106 | Passed - all gates clear |
| 107 | ``` |
| 108 | |
| 109 | ### Report format for failure: |
| 110 | |
| 111 | ``` |
| 112 | ## Implementation Report — FAILURE |
| 113 | |
| 114 | ### What Was Attempted |
| 115 | <summary> |
| 116 | |
| 117 | ### Failure Details |
| 118 | <what failed and why> |
| 119 | |
| 120 | ### Validator Details |
| 121 | <which gates passed/failed, what fixes were tried> |
| 122 | |
| 123 | ### Blocker Description |
| 124 | <the specific blocker preventing completion> |
| 125 | ``` |