code-agent-patterns

code-agent-patterns is a skill for Claude Code, Codex from VoDaiLocz/kilo-kit-mcp. It costs 45 tokens per session (814 once invoked), scanned A, original, Apache-2.0.

A set of design patterns for building software-engineering agents that inspect and edit code. It covers tasks such as finding bugs, creating patches, reviewing code, and running tests.

In plain words
What is it for?
Use it when building agents that index a repository, find relevant code, generate fixes, coordinate reviews, or follow a test-driven development loop, where tests guide each code change.
Why use it?
It helps agents work with large codebases without loading or changing unrelated files.

Skill for Claude CodeCodex

Which agent this was written for is unclear — built for aider. Also seen: built for aider.

Good fit Use it when building agents that index a repository, find relevant code, generate fixes, coordinate reviews, or follow a test-driven development loop, where tests guide each code change.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/vodailocz/kilo-kit-mcp/code-agent-patterns
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.

Any agent
npx skills add VoDaiLocz/kilo-kit-mcp --skill code-agent-patterns
Clone the repo
git clone --depth 1 https://github.com/VoDaiLocz/kilo-kit-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-agent-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/vodailocz/kilo-kit-mcp/code-agent-patterns/github.svg)](https://agentmods.dev/skills/vodailocz/kilo-kit-mcp/code-agent-patterns)
Your own site
<a href="https://agentmods.dev/skills/vodailocz/kilo-kit-mcp/code-agent-patterns"><img src="https://agentmods.dev/badge/skills/vodailocz/kilo-kit-mcp/code-agent-patterns/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-agent-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/vodailocz/kilo-kit-mcp/code-agent-patterns"><img src="https://agentmods.dev/badge/skills/vodailocz/kilo-kit-mcp/code-agent-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00045 $0.00814
Opus 5.5 $0.00018 $0.00326
Sonnet 5.5 $0.00009 $0.00163
Haiku 4.5 $0.00005 $0.00081

Measured 3mo ago against content hash 6e4e0db9b744, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-agent-patterns 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 3mo 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/engineering/code-agent-patterns/SKILL.md · 67 lines

How it starts

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

Autonomous Code Agent Patterns

Overview

The code-agent-patterns skill provides a standardized architectural framework for building, maintaining, and scaling autonomous Software Engineering (SWE) agents. It focuses on reliability, precision, and contextual awareness, drawing heavily from industry benchmarks like SWE-Bench and modern LLM-driven development tools.

When To Use

  • Implementing autonomous code editing agents.
  • Designing specialized agents for bug localization or patch generation.
  • Orchestrating multi-agent systems for code review or testing.
  • Building tools that need to interface with existing large codebases.

Core Patterns

1. Minimal Context Assembly

Avoid dumping the entire repository into the LLM context. Instead:

  • Use dependency graph analysis to identify "impact zones."
  • Implement "Breadth-First Context Discovery" (start with high-level symbols, drill down only when necessary).
  • Support dynamic file inclusion based on the specific task (e.g., test files, related interfaces).

2. Symbol-Level Repository Indexing

Build a robust index that enables the agent to navigate the codebase as a human developer would:

  • Symbol Maps: Index classes, functions, and interfaces along with their file locations.
  • Call Graphs: Track function calls and dependencies to understand side effects.
  • AST Analysis: Utilize Abstract Syntax Tree (AST) parsing to ensure structural awareness during code modifications.

3. Unified Diff & Search-Replace Patching

To minimize hallucination and merge conflicts:

  • Prefer "Search-Replace" blocks over entire file rewrites.
  • Validate that the "Search" block matches exact file content before applying the "Replace" content.
  • Use unified diffs as a secondary representation for human review.

TDD Fix Loop Workflow

Agents must follow a strict "Red-Green-Refactor" loop for any bug fix:

  1. Reproduce: Write a test case that captures the reported bug (assert failure).
  2. Localize: Identify the source using logs, stack traces, or symbol-level search.
  3. Patch: Apply minimal code changes to satisfy the failing test.
  4. Verify: Run the test suite.
  5. Rollback: If tests fail after patching, discard changes and restart the process.

Read the full file on GitHub · 67 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. 3mo ago First seen · 67 lines · 45 tokens per session scan A 6e4e0db9b744

Subscribe to this mod's changes

code-agent-patterns is a skill published in the GitHub repository VoDaiLocz/kilo-kit-mcp (28 stars, last pushed 15d ago), licensed Apache-2.0. It adds 45 tokens to every session and 814 once invoked, about $0.0002 per session on Opus 5.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

code-agent-patterns compared with skills from other repositories

code-agent-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-agent-patternsVoDaiLocz/kilo-kit-mcpSkill2815d agoApache-2.0A45Claude Code, Codex
llm-structured-outputhybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A42Claude Code, Codex
drizzle-orm-experthybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A41Claude Code, Codex
landing-page-generatorhybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A50Claude Code, Codex
tdmcp-pipelinehybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A128Claude Code, Codex
memb-skillhybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A36Claude Code, Codex
startcycle-graph-userhybridlabor-api/bdb-dev-optimized-agent-skillsSkill910d agoApache-2.0A102Claude Code, Codex