tigerless-labs/autoharness

Building the self-learning layer next-gen agents will ship with, learning skills from real work.

AutoHarness — a self-maintaining skill library for AI agents

AutoHarness is a plugin for Claude Code (an AI coding assistant) that automatically learns reusable skills from your real work sessions. It watches what you and the agent do, distills the useful patterns into small instruction files (called skills), and keeps that library tidy on its own — merging duplicates, updating outdated ones, and removing ones that stop being used.

The big idea: instead of hand-crafting a "harness" (the scaffolding around an AI model) for each new model generation, AutoHarness bets that the skill layer — the part that tells the model how to do things — can maintain itself.

What it does

  • Learns from real sessions — After enough tool calls in a session, it automatically extracts a skill from what just happened. You can also force it with the /learn command.
  • Merges, doesn't pile up — Before creating a new skill, it checks existing ones (both its own and read-only sources like installed plugins or your CLAUDE.md). If a new lesson overlaps an existing skill, it folds them together instead of creating a near-duplicate.
  • Keeps its own library visible — At the start of every session, it injects an index of the skills it wrote, so the agent can actually find them.
  • Validates by real use — A skill survives only if it gets loaded (invoked) in later sessions. No artificial benchmarks; usage is measured against how many opportunities it had.
  • Only touches its own skills — It never modifies skills you wrote or installed; it only manages the ones it created.
  • Logs everything — Each create/update records the scenario and decision in a per-skill ledger, which could later be used to build a benchmark from real usage.

How it works

AutoHarness runs as a background pipeline alongside Claude Code. It consists of several components:

Component Role
CAP (Capture) A simple hook that grabs each turn (user input, agent output, tool I/O), redacts sensitive data, and counts tool calls. When the count crosses a threshold, it triggers a reflection.
REF (Reflect) Reads the recent episode, compares it against the existing skill index, and decides what to do: add, merge, patch, or delete a skill. It only proposes — it has no write access.
Promoter The only component that actually writes. It validates the proposal (safety, structure, self-authored-only) and atomically moves the new/updated skill into the live skill directory.
IDX (Surface) Builds the session-start index: a grouped, truncated list of AutoHarness's own skills, tagged by layer (project vs global).
MNG (Lifecycle) Runs at session start. Ranks skills by usage rate (loads divided by requests since creation). New skills are on probation; after enough requests they face graduation review. Unused skills are archived (not deleted) when capacity is exceeded.
Curator A rarer whole-library pass that merges near-duplicate skills under "umbrella" skills — a judgment that a single episode can't make. Takes snapshots before merging.
LED (Ledger) Appends to a per-skill log for every create/update, storing the scenario and decision.

Installation & usage

  • Requires Python 3.11+ on your PATH (no third-party dependencies).
  • Install inside Claude Code with:
    /plugin marketplace add tigerless-labs/autoharness
    /plugin install autoharness@autoharness
    
    then run /reload-plugins or restart.
  • Zero configuration — it starts watching automatically and writes learned skills to .claude/skills/.
  • Use /learn to distill the current session on demand.

Configuration

All settings are environment variables with sensible defaults. You can tune:

  • Placement — which layers it manages (global vs project), where state lives, skill name prefix.
  • Cadence — how often it reflects (default every 50 tool calls), how often the curator runs (every 250), which model to use for reflection.
  • Recall — whether to inject the session-start index, description length limits, body line limits.
  • Lifecycle — probation periods, capacity caps, whether to suspend graduation review.
  • Notifications — optional desktop or custom command notifications when a run finishes.

What it doesn't do

  • It never touches skills you wrote or installed — only the ones it generated itself.
  • It doesn't run a separate data-collection loop; it learns from the sessions you're already having.
  • It doesn't use a benchmark to validate skills; it relies on real usage.

AutoHarness is an open-source project (MIT license) that aims to make AI agents self-improving by maintaining their own skill library. It's currently built for Claude Code but the concept could extend to other agents.

Related

  • Project
  • Project
  • Project
  • Project
  • Project