implement-and-validate

An automated coding workflow for completing one task from start to finish. TDD, or test-driven development, means writing a failing test first, then implementing the code and checking the result with a validator.

In plain words
What is it for?
Use it to implement a ticket or specification, apply a complete change, review the result against its requirements, and run validation before reporting back.
Why use it?
It reduces the manual work of following the task specification, reviewing the changes, running tests and linters, and checking the finished implementation.

Skill for Claude CodeCodex

Part of the codagent plugin — 27 skills shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/codagent-ai/agent-skills/implement-and-validate
Any agent
npx skills add Codagent-AI/agent-skills --skill implement-and-validate
Clone the repo
git clone --depth 1 https://github.com/Codagent-AI/agent-skills

Made for: Claude Code, Codex.

Or install codagent, the plugin that ships this one along with the rest of its 27 skills.

Per session 57 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,116 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00057 $0.01116
Opus 5 $0.00028 $0.00558
Sonnet 5 $0.00011 $0.00223
Haiku 4.5 $0.00006 $0.00112

Measured 3d ago against content hash 096752632066, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

implement-and-validate scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/implement-and-validate/SKILL.md · 133 lines

How it starts

The opening of the file, as written. The whole thing — 133 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Implement a single task from start to finish. Verify with self-review and the validator. Return a report.

Your Task

Implementation Methodology

Implement the specified task using the codagent:implement-with-tdd skill.

Implement exactly what the task specifies — no extra features, refactoring, or improvements beyond scope. Follow existing code patterns and conventions.

Self-Review

After implementation is complete, perform a structured self-review:

  1. Is every scenario from the task spec implemented?
  2. Are there any changes not justified by the task spec?
  3. Are all success criteria met?
  4. Do all tests and linters pass?

If self-review finds issues, fix them before proceeding to the validator.

Validator Integration

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.

  1. Clean up stale lock (safe — tasks are dispatched sequentially, never in parallel):

    mkdir -p validator_logs
    rm -f validator_logs/.validator-run.lock
    
  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):

    agent-validator run > validator_logs/_subagent-run.log 2>&1; printf 'VALIDATOR_EXIT=%s\n' "$?" >> validator_logs/_subagent-run.log
    

    Use Bash with timeout: 300000 (5 minutes). Do NOT use run_in_background.

  3. Read the captured output (this is the reliable path — do not rely on the Bash tool's stdout capture):

    cat validator_logs/_subagent-run.log
    

    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.

  4. Check the Status: line in the output and act accordingly:

    • Status: Passed or Status: Passed with warnings → proceed to commit
    • Status: Failed → read the violation details from the output. For each violation:
      • CHECK failures: follow the fix instructions shown in the output
      • 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. After fixing, re-run the validator by going back to step 2. Maximum 3 retry attempts.
    • Status: Retry limit exceeded → stop and include the failure details in your report
    • No Status: line found → the output file may be empty (known Bun issue). Read the latest console log instead:
      ls -t validator_logs/console.*.log 2>/dev/null | head -1 | xargs -r cat
      
      If no console log exists either, re-run the command once more (go back to step 2).

Read the full file on GitHub · 133 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 133 lines · 57 tokens per session scan A 096752632066

Subscribe to this mod's changes

implement-and-validate is a skill published in the GitHub repository Codagent-AI/agent-skills (30 stars, last pushed 1mo ago), licensed MIT. It adds 57 tokens to every session and 1,116 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

agent-integration

Run all three agent integration phases sequentially: research, write-tests, and implement using E2E-first TDD (unit tests written last). For individual phases, use /agent-integration:research, /agent-integration:write-tests, or /agent-integration:implement. Use when the user says "integrate agent", "add agent…

entireio/cli · 89 tokens

engram-testing-coverage

TDD and coverage standards for Engram. Trigger: When implementing behavior changes in any package.

Gentleman-Programming/engram · 25 tokens

code-assist

Guides implementation of code tasks using test-driven development in an Explore, Plan, Code, Commit workflow. Acts as a Technical Implementation Partner and TDD Coach — following existing patterns, avoiding over-engineering, and producing idiomatic, modern code.

mikeyobrien/ralph-orchestrator · 53 tokens

tdd

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

GreyDGL/PentestGPT · 33 tokens

css-design-tdd

Test-driven CSS design system modifications. Run checks before/after CSS changes to verify token usage, variable definitions, fallbacks, and consistency. Use when modifying CSS tokens, fixing design inconsistencies, or auditing CSS architecture.

xiaolai/vmark · 49 tokens

mobiai-mobile-tdd

You MUST use this before writing any implementation code for a mobile feature, bug fix, refactor, or behavior change. Tests come before implementation — no exceptions.

ArisGuimera/MobiAI-Core · 38 tokens