Agent skill

Improvement Loop

by aaddrick in aaddrick/claude-pipeline

Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem.

MITAuto-check passed

Install Improvement Loop

skills CLI
$ npx skills add aaddrick/claude-pipeline --skill improvement-loop -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aaddrick/claude-pipeline improvement-loop --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aaddrick/claude-pipeline.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/improvement-loop .claude/skills/improvement-loop && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
improvement-loop
GitHub stars
130
Used in
1 other repo
Token cost
~2.5k tokens
SKILL.md length
953 words
Files
1
Skills in repo
12
Repo updated
First seen
Licence
MIT

At a glance

Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem.

  • Works in 5 steps: Capture the Problem → Classify the Improvement → Make the Minimal Change → …
  • SKILL.md covers Overview, When to Use, The Gate: Is the Issue Resolved? and Proactive Detection, plus 6 more sections
  • Calls git

What it does

Improvement Loop is an agent skill from aaddrick/claude-pipeline. Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem. Also proactively suggest improvements when recurring patterns or inefficiencies are observed.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Portable Claude Code multi-agent pipeline - skills, agents, hooks, orchestration scripts, and quality gates. The licence is MIT.

Example prompts

  • “/improvement-loop”

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Capture the Problem
  2. Classify the Improvement
  3. Make the Minimal Change
  4. Verify the Change
  5. Commit and Communicate

What it can do on your machine

Read from SKILL.md and the folder at commit 402eac7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Improvement Loop loads about 2.5k tokens when it runs. Until then it costs about 68 tokens; SKILL.md has 953 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~68
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from aaddrick/claude-pipeline at commit 402eac7, republished under its MIT licence (© aaddrick). 953 words, ~2,497 tokens.

Download SKILL.mdSave it as .claude/skills/improvement-loop/SKILL.md (or your agent's skills folder).
name
improvement-loop
description
Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem. Also proactively suggest improvements when recurring patterns or inefficiencies are observed.

The Improvement Loop

Overview

Improve the .claude/ pipeline after resolving the issue at hand — never during. When a skill, agent, hook, or script produces bad output, work through to the correct solution first, then update the pipeline with what you learned.

Core principle: Fix first, understand fully, improve last. Premature edits encode partial understanding.

When to Use

dot
digraph when_to_use {
    "Issue resolved successfully?" [shape=diamond];
    "Root cause in pipeline file?" [shape=diamond];
    "Worth encoding permanently?" [shape=diamond];
    "Run improvement cycle" [shape=box style=filled fillcolor=lightgreen];
    "Keep working on the issue" [shape=box];
    "Skip - not a pipeline problem" [shape=box];
    "Skip - one-off or too specific" [shape=box];

    "Issue resolved successfully?" -> "Root cause in pipeline file?" [label="yes"];
    "Issue resolved successfully?" -> "Keep working on the issue" [label="no - finish first"];
    "Root cause in pipeline file?" -> "Worth encoding permanently?" [label="yes"];
    "Root cause in pipeline file?" -> "Skip - not a pipeline problem" [label="no"];
    "Worth encoding permanently?" -> "Run improvement cycle" [label="yes"];
    "Worth encoding permanently?" -> "Skip - one-off or too specific" [label="no"];
}

Trigger conditions (suggest to user):

  • An agent produced incorrect output that required manual correction
  • A skill was missing guidance that caused a wrong approach
  • The same mistake has occurred more than once across sessions
  • A hook failed to catch something it should have
  • An orchestration script hit an unhandled edge case
  • A subagent asked questions that the agent definition should have answered
  • Review feedback repeatedly flags the same class of issue

Do NOT trigger:

  • While still debugging or iterating on the original issue
  • For one-off problems unlikely to recur
  • For issues outside the pipeline (user error, external service failures)
  • When the fix is a code change, not a pipeline change

The Gate: Is the Issue Resolved?

This check is mandatory before any improvement work.

dot
digraph gate_check {
    "Original task/issue complete?" [shape=diamond];
    "Tests passing?" [shape=diamond];
    "User confirmed resolution?" [shape=diamond];
    "GATE PASSED - proceed to improvement" [shape=box style=filled fillcolor=lightgreen];
    "STOP - return to the issue" [shape=box style=filled fillcolor=salmon];

    "Original task/issue complete?" -> "Tests passing?" [label="yes"];
    "Original task/issue complete?" -> "STOP - return to the issue" [label="no"];
    "Tests passing?" -> "User confirmed resolution?" [label="yes"];
    "Tests passing?" -> "STOP - return to the issue" [label="no"];
    "User confirmed resolution?" -> "GATE PASSED - proceed to improvement" [label="yes"];
    "User confirmed resolution?" -> "STOP - return to the issue" [label="no/unclear"];
}

Verify ALL of these before proceeding:

  1. The original task or issue is functionally complete
  2. All tests pass (or the fix is committed and verified)
  3. The user considers the issue resolved (ask if unclear)

If ANY check fails, stop. Return to the issue. Do not start improvement work.

Proactive Detection

When you observe improvement opportunities during normal work, do not act immediately. Instead:

  1. Note the opportunity — mentally flag what went wrong and which pipeline file is involved
  2. Finish the current task — complete whatever you're working on
  3. Ask the user — suggest the improvement explicitly:
I noticed [specific problem] while working on [task]. The root cause appears to be
[skill/agent/hook/script name] which [lacks guidance on X / has an anti-pattern gap /
doesn't handle Y].

Would you like me to run an improvement cycle to update it? This would involve:
- [Specific change: e.g., "adding an anti-pattern entry for Model::all()"]
- [Estimated scope: e.g., "a one-line addition to the agent's anti-patterns section"]

Always ask before starting. The user may want to defer, batch improvements, or handle it differently.

The Five-Step Cycle

Step 1: Capture the Problem

Document what happened before details fade:

  • What went wrong: The specific incorrect output or behavior
  • Which pipeline file: The skill, agent, hook, or script involved
  • Root cause: Why the pipeline file led to the wrong outcome
  • Correct solution: What the right approach turned out to be
  • How you discovered it: The debugging path (helps write better guidance)
Step 2: Classify the Improvement
TypeTargetExample
Anti-patternAgent definition"NEVER use Model::all() on large tables"
Missing guidanceSkill contentAdd edge case handling to a technique skill
New triggerSkill descriptionAdd symptom that should invoke this skill
Hook gapsettings.json / hook scriptFormatter not catching a file type
Script edge caseOrchestration scriptUnhandled timeout in a stage
Missing skillNew skill fileTechnique not documented anywhere
Missing agentNew agent fileSpecialized role not defined
Step 3: Make the Minimal Change

Write the smallest change that prevents the problem from recurring.

  • Anti-pattern? Add one entry to the agent's anti-patterns section
  • Missing guidance? Add one paragraph or code example to the skill
  • Hook gap? Add one condition to the hook script
  • Script edge case? Add one error handler to the orchestration script

Do NOT:

  • Rewrite entire files while you're "in there"
  • Add speculative guidance for problems that haven't occurred
  • Refactor surrounding code that isn't related to the issue
Step 4: Verify the Change

Depending on the type of change:

Change TypeVerification
Agent anti-patternGrep for conflicting guidance in the agent file
Skill contentRead the skill end-to-end — does the new content fit?
Hook logicRun the hook manually with test input
Orchestration scriptRun relevant BATS tests
New skill/agentFollow writing-skills or writing-agents skill (includes testing)
Show full SKILL.md (373 more words)Show less
Step 5: Commit and Communicate
git add .claude/[changed-file]
git commit -m "improve: [file] - [what was added and why]"

Tell the user what was changed and why:

Updated [file] with [change]. This prevents [problem] which occurred during [task].

Routing to the Right Tool

What Needs ChangingHow to Change It
Existing skill (small edit)Edit directly
Existing agent (small edit)Edit directly
New skillInvoke writing-skills skill
New agentInvoke writing-agents skill
Orchestration scriptDispatch cc-orchestration-writer agent via Task tool
Hook scriptDispatch bash-script-craftsman agent via Task tool
settings.jsonEdit directly

For new skills and agents: The writing-skills and writing-agents skills have their own TDD cycles. Follow them — don't shortcut.

Preventing Improvement Drift

Improvements can spiral. Guard against these anti-patterns:

Anti-PatternPrevention
Yak shaving — improving A leads to improving B leads to C...One improvement per cycle. If you discover more, note them and ask the user about a separate cycle.
Speculative improvements — "while I'm here, let me also..."Only fix the problem that actually occurred. YAGNI applies to pipeline improvements too.
Encoding partial understanding — improving before fully resolvingThe gate check (Step 0) prevents this. Never skip it.
Over-engineering — turning a one-line anti-pattern into a new skillMatch the weight of the fix to the weight of the problem.
Stale improvements — guidance that was correct once but isn't anymoreWhen you notice outdated guidance during work, flag it as an improvement opportunity.

Batching Improvements

When multiple improvement opportunities arise in one session:

  1. Note each one as you encounter it (don't act)
  2. Finish the current work completely
  3. Present the batch to the user:
I identified 3 potential pipeline improvements during this session:

1. [agent-name]: Missing anti-pattern for [X] (occurred during task Y)
2. [skill-name]: Edge case not covered for [Z] (caused wrong approach in task W)
3. [hook]: Not catching [file type] (missed formatting on 2 files)

Would you like me to address these? I can handle them as:
a) One batch (fastest, ~5 min)
b) Individual cycles (most thorough)
c) Skip for now

Red Flags

  • Improving while the issue is unresolved — STOP. Fix the issue first. This is the #1 violation.
  • Making changes without asking — Always ask the user before starting improvement work.
  • Improving after a single occurrence — One instance rarely justifies a pipeline change. Note it and watch for recurrence.
  • Rewriting instead of appending — Most improvements are additions (anti-patterns, guidance, examples), not rewrites.
  • Skipping verification — An untested improvement can introduce new problems.

Key Insight

"When a skill or agent produces bad output, don't immediately edit it. Work through to the correct solution first. Then update the skill with what you learned."

The instinct to jump into the pipeline file and tweak is strong. Resist it. Partial understanding encoded as guidance creates more problems than it solves. The improvement only becomes reliable after full resolution.

© aaddrick, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/improvement-loop of aaddrick/claude-pipeline.

Open the folder on GitHubat commit 402eac7

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in aaddrick/claude-pipeline, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Improvement Loop next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Improvement Loop compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Improvement Loop this skillaaddrick/claude-pipeline1301 repos~2.5kAutomated safety check: PassMIT
Skill Improversickn33/agentic-awesome-skills47k2 repos~1.5kAutomated safety check: PassMIT
Resolve Git Conflictspenpot/penpot61k—~772Automated safety check: PassMPL-2.0
Self-Improve Evolutionary LoopYeachan-Heo/oh-my-claudecode40k—~5.3kAutomated safety check: WarnMIT
Skill Improvement LoopDonchitos/Claude-Code-Game-Studios26k—~1.6kAutomated safety check: NotesMIT
Improvementtddworks/ClaudeBar1.5k—~2.1kAutomated safety check: PassApache-2.0

Similar skills

  • Skill Improver

    sickn33/agentic-awesome-skills

    Iteratively improve a Claude Code skill using the skill-reviewer agent until it meets quality standards.

    47k GitHub starsUsed in 2 repos~1.5k tokens
    Agent WorkflowsAuto-check passed
  • Conflict resolution flow — understand the local git conflicts, present a resolution plan, and resolve them after the user approves it.

    61k GitHub stars~772 tokensUpdated today
    DevelopmentAuto-check passed
  • Self-Improve Evolutionary Loop

    Yeachan-Heo/oh-my-claudecode

    Runs an autonomous improvement loop on a repository: agents propose and execute plans, a tournament picks the winner by benchmark, and each round is recorded and plotted.

    40k GitHub stars~5.3k tokensUpdated today
    Agent WorkflowsAuto-check: warnings
  • Skill Improvement Loop

    Donchitos/Claude-Code-Game-Studios

    Improves a single skill through a test, fix and retest loop, keeping or reverting each change based on how the static and category scores move.

    26k GitHub stars~1.6k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check: notes
  • Improvement

    tddworks/ClaudeBar

    Guide for making improvements to existing ClaudeBar functionality using TDD.

    1.5k GitHub stars~2.1k tokensUpdated today
    Testing & QAAuto-check passed
  • Resolve Inputs

    omnigent-ai/omnigent

    Select the Resolve mode, recover its input, check the workspace, and discover existing fixes.

    11k GitHub stars~2k tokensUpdated today
    Auto-check passed

More from aaddrick/claude-pipeline

All 12 skills in this repo
  • Writing Agents

    aaddrick/claude-pipeline

    A skill your agent uses when creating new agents, editing existing agents, or defining specialized subagent roles for the Task tool

    130 GitHub starsUsed in 1 repo~3.3k tokens
    Auto-check passed
  • Adapting Claude Pipeline

    aaddrick/claude-pipeline

    A skill your agent uses when adapting the generic .claude pipeline folder to a specific codebase - adjusting skills, agents, hooks, scripts, prompts, and settings for the target project's tech stack…

    130 GitHub stars~2.8k tokensUpdated 7 mo ago
    Auto-check passed
  • A skill your agent uses when asked to create user stories from a codebase, document existing features as stories, or reverse-engineer requirements from code

    130 GitHub stars~2.2k tokensUpdated 7 mo ago
    Auto-check passed
  • Review UI

    aaddrick/claude-pipeline

    Comprehensive UI/CSS review using parallel agents. An agent skill from aaddrick/claude-pipeline.

    130 GitHub stars~2.5k tokensUpdated 7 mo ago
    Auto-check passed
  • Using Git Worktrees

    aaddrick/claude-pipeline

    A skill your agent uses when starting feature work that needs isolation from current workspace or before executing implementation plans - creates isolated git worktrees in .worktrees/

    130 GitHub stars~1.3k tokensUpdated 7 mo ago
    Auto-check passed
  • Implement Issue

    aaddrick/claude-pipeline

    A skill your agent uses when given a GitHub issue number and base branch to implement end-to-end

    130 GitHub starsUsed in 1 repo~889 tokens
    Auto-check passed

Questions about Improvement Loop

What does Improvement Loop do?

Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem. Improvement Loop is an agent skill from aaddrick/claude-pipeline. Use after resolving a bug, failed task, or unexpected agent behavior to improve the pipeline skills, agents, hooks, or scripts that contributed to the problem.

How do I install Improvement Loop in Claude Code?

Run `npx skills add aaddrick/claude-pipeline --skill improvement-loop -a claude-code`. Or copy the skill folder (.claude/skills/improvement-loop in aaddrick/claude-pipeline) into .claude/skills/improvement-loop in your project. Claude Code loads it when a task matches its description.

How do I install Improvement Loop in Codex?

Run `npx skills add aaddrick/claude-pipeline --skill improvement-loop -a codex`. Or copy the skill folder (.claude/skills/improvement-loop in aaddrick/claude-pipeline) into .agents/skills/improvement-loop in your project. Codex loads it when a task matches its description.

Can I use Improvement Loop in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aaddrick/claude-pipeline --skill improvement-loop -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/improvement-loop, .gemini/skills/improvement-loop, .github/skills/improvement-loop and .opencode/skills/improvement-loop in your project.

What does Improvement Loop need to run?

Going by SKILL.md and its folder, Improvement Loop needs the command-line tools its instructions call (git).

Does Improvement Loop access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Improvement Loop safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Improvement Loop use?

Improvement Loop is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Improvement Loop use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Improvement Loop?

Skills that share tags, products or a category with Improvement Loop: Skill Improver (sickn33/agentic-awesome-skills, 47k stars), Resolve Git Conflicts (penpot/penpot, 61k stars), Self-Improve Evolutionary Loop (Yeachan-Heo/oh-my-claudecode, 40k stars) and Skill Improvement Loop (Donchitos/Claude-Code-Game-Studios, 26k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Improvement Loop?

aaddrick (a GitHub user) maintains it in aaddrick/claude-pipeline, which has 130 GitHub stars. The repository holds 12 skills in this directory. The repository was last updated on February 25, 2026.

Source: aaddrick/claude-pipeline on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.