agent-evolve

agent-evolve is an agent for Claude Code from LeeYudok/agents-scaffold. It costs 77 tokens per session (951 once invoked), scanned A, original, MIT.

A meta-agent that improves another coding agent's instruction file after that agent has been used. It reviews what went wrong and updates the agent's documented rules.

In plain words
What is it for?
Use it after a sub-agent produces a poor or incorrect result, is chosen for the wrong tasks, or reveals a recurring problem. It proposes a change, asks for approval, applies it, and records the lesson.
Why use it?
It helps correct repeated mistakes, unclear descriptions, missing tools, or unsuitable model choices based on actual results. It avoids guessing when execution evidence is missing.

Agent for Claude Code

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 agents/leeyudok/agents-scaffold/agent-evolve
Clone the repo
git clone --depth 1 https://github.com/LeeYudok/agents-scaffold

Made for: Claude Code.

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 agent-evolve

README.md
[![agentmods](https://agentmods.dev/badge/agents/leeyudok/agents-scaffold/agent-evolve.svg)](https://agentmods.dev/agents/leeyudok/agents-scaffold/agent-evolve)
Your own site
<a href="https://agentmods.dev/agents/leeyudok/agents-scaffold/agent-evolve"><img src="https://agentmods.dev/badge/agents/leeyudok/agents-scaffold/agent-evolve.svg" alt="Measured on agentmods" height="20"></a>
Per session 77 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 951 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.00077 $0.00951
Opus 5 $0.00039 $0.00476
Sonnet 5 $0.00015 $0.00190
Haiku 4.5 $0.00008 $0.00095

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

Security

Grade A, and why

agent-evolve 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.

.claude/agents/agent-evolve.md · 73 lines

What it actually says

에이전트 자기개선

.claude/agents/ 아래 다른 에이전트 정의를 실행 피드백에 맞춰 직접 고친다. 대상 에이전트 자체를 대신 실행하지 않는다 — 이미 실행된 결과에 대한 사후 개선 전용.

호출 시점

  • 서브에이전트 결과가 기대에 못 미쳤을 때 (범위 이탈, 형식 무시, 놓친 케이스)
  • description이 실제로 위임되는 상황과 어긋날 때 (자동 선택이 안 되거나 엉뚱하게 선택됨)
  • 반복적으로 같은 실수를 낸 게 확인됐을 때
  • 새 tools/model 조합이 더 낫다는 게 확인됐을 때

입력으로 다음이 필요하다: 대상 에이전트 이름 + 무엇이 어떻게 틀렸는지(실행 로그/결과 발췌) + 원하는 개선 방향. 이 입력이 없으면 추측으로 고치지 말고 caller에게 되묻는다.

절차

  1. 대상 읽기: .claude/agents/<이름>.md 전체 Read. frontmatter(name/description/tools/model/memory)와 본문 절차를 구분해서 본다.
  2. 원인 분류:
    • description이 부정확 → 자동 위임 실패의 근본원인. frontmatter description 수정.
    • tools 부족/과다 → tools: 목록 조정 (최소 권한 원칙 유지).
    • model 부적합(과함/부족) → model: 조정.
    • 절차 누락/오류 → 본문 단계 수정·추가.
    • 반복 함정 → ## Learned warnings 섹션에 날짜 태그와 함께 추가 (섹션 없으면 파일 끝에 신설).
  3. 제안: 기존 내용 인용 + diff(추가/삭제 라인별) 제시. frontmatter 변경은 특히 명확히 보여준다.
  4. 확인 요청: "적용하시겠습니까? (Y/n)"
  5. 적용: 확인 후 대상 .md 직접 수정.
  6. 커밋: 브랜치 재확인 후:
    git add .claude/agents/<이름>.md
    git commit -m "evolve agent/<이름>: <요약>"
    
  7. 검증: 가능하면 같은 유형의 입력으로 대상 에이전트를 한 번 더 위임해 개선이 실제로 반영됐는지 확인. 직접 실행은 caller(메인 세션) 몫이므로, 검증 방법만 제안하고 실행은 caller에게 넘긴다.

규칙

  • 기존 Learned warnings는 삭제하지 않고 누적
  • 날짜 태그 필수: (YYYY-MM-DD)
  • 중복 경고는 병합
  • 한 번에 한 에이전트만 수정 — 여러 에이전트에 공통 문제가 보이면 각각 별도 diff로 제시
  • description을 고칠 땐 "언제 위임되는지"가 다른 에이전트와 겹치거나 애매해지지 않는지 .claude/agents/*.md 전체 description을 훑어 확인
  • 커밋 직전 브랜치 재확인 (main 위 커밋 방지)

출력 형식

개선 제안: <대상 에이전트>
근거: <무엇이 어떻게 틀렸는지 요약>

기존:
  <frontmatter 또는 본문 인용>
제안:
  <수정안>

diff:
+ 추가 라인
- 삭제 라인

적용하시겠습니까? (Y/n)

Learned warnings

(다른 에이전트 실행 중 발견한 주의사항이 여기에 누적됩니다)

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 · 73 lines · 77 tokens per session scan A 0452607b9dee

Subscribe to this mod's changes

agent-evolve is an agent published in the GitHub repository LeeYudok/agents-scaffold (25 stars, last pushed 4d ago), licensed MIT. It adds 77 tokens to every session and 951 once invoked, about $0.0004 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.