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

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/vodailocz/kilo-kit-mcp/code-agent-patterns
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.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.svg" alt="Measured on agentmods" 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. 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.00045 $0.00814
Opus 5 $0.00023 $0.00407
Sonnet 5 $0.00009 $0.00163
Haiku 4.5 $0.00005 $0.00081

Measured 4d ago against content hash 6e4e0db9b744, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 4d 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. 4d 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 (27 stars, last pushed yesterday), licensed Apache-2.0. It adds 45 tokens to every session and 814 once invoked, about $0.0002 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

nw-bdd-requirements

BDD requirements discovery methodology - Example Mapping, Three Amigos, conversational patterns, Given-When-Then translation, and collaborative specification.

nWave-ai/nWave · 31 tokens

hns-oss-docs-i18n-rules

HARD i18n rules digest for the oss-docs harness specialists working on moai-adk-go README 4-locale set and the docs-site (adk.mo.ai.kr). Covers the canonical-locale chains, the 4-locale same-PR obligation, Mermaid TD-only, the no-emoji + icon-shortcode rule, emphasis-marker spacing, the URL blacklist, version SSOT…

modu-ai/moai-adk · 119 tokens

error-handling

Intelligent error handling — silently auto-fix routine errors (missing imports, undefined variables, type mismatches, missing dependencies, syntax and lint issues) and translate everything else into friendly, non-technical language with clear next steps. The user never sees raw error messages or stack traces. Use…

wasintoh/toh-framework · 74 tokens

skill-translate

AL translation and localization for Business Central. Use when working with XLF files, NAB tools, or implementing multi-language support in extensions.

javiarmesto/ALDC-AL-Development-Collection · 31 tokens

kirby-i18n-workflows

Manages Kirby multi-language workflows, translations, and localized labels. Use when dealing with languages, translation keys, placeholders, or importing/exporting translations.

bnomei/kirby-mcp · 38 tokens

text

Use this skill when the user wants to create, generate, save, export, download, convert, format, clean, or localize plain text, TXT, Markdown/MD, or HTML file deliverables. This skill produces text-family artifacts such as .txt, .text, .md, .markdown, or .html files and exposes the final file for download.

CloudChef/atlasclaw-providers · 76 tokens