agentleFS
chetan25chetan25/harness-claude-skills/skills/harness-learnings/SKILL.md

harness-learnings

Skill1 starsChanged 3 months agoMITView on GitHub

Use at the end of a harness-orchestrator run, or on demand, to graduate staged learning candidates from .claude/harness/state.md into the right generated project-* skill's Learnings block — so project-specific corrections accumulate where they're selectively loaded, instead of bloating root CLAUDE.md.

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. microsoft/devsquad-copilot★ 57same name
    2. microsoft/frontiersquad-copilot★ 57same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .claude/harness/state.md's ## Learning candidates section.

    line 20
  2. Very specific:

    Read the target skill's .claude/skills/<project-skill>/SKILL.md.

    line 28
  3. Distinctive:

    Never write outside these markers, and never touch the rest of the skill file.

    line 32
  4. Distinctive:

    Dedupe before appending: Don't let the same correction accumulate as five near-identical lines.

    line 50
  5. Very specific:

    Don't invent routing: If a candidate's area genuinely can't be determined, default to project-architecture rather than guessing a specific …

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Harness Learnings

Move staged learnings out of the transient run state and into durable, selectively-loaded grounding. You do this directly with Read, Write, and Grep — there is no external program.

When to run

  • Called by harness-orchestrator once per run, after the feature-complete spec-conformance and code-review passes, before the final report. A no-op if there's nothing staged.
  • Invokable on demand mid-session by the user for a forced review.

Procedure

1. Read the staged candidates

Read .claude/harness/state.md's ## Learning candidates section. If it's empty or says "(nothing yet)", report "no learnings to graduate" and stop.

2. Route each candidate

For each candidate line, read .claude/skills/project-index.md and match the candidate's subject matter (which files/area it concerns) to the owning project-* skill — the same area-matching the context loader uses. If no area matches clearly, default to project-architecture.

3. Graduate into the target skill's Learnings block

Read the target skill's .claude/skills/<project-skill>/SKILL.md. If it has no ## Learnings section yet (generated by a harness-analyzer version older than 4.0.0), append one at the end of the file first: ## Learnings followed by an empty <!-- harness:learnings:start --> / <!-- harness:learnings:end --> marker pair. Then, inside those markers:

  • Skip the candidate if an existing line already says materially the same thing (dedupe).
  • Otherwise append it as one line, date-stamped: - <YYYY-MM-DD> <the learning, stated as a concrete rule or fact>.

Never write outside these markers, and never touch the rest of the skill file.

4. Clear the staged candidates

Replace .claude/harness/state.md's ## Learning candidates section with - (nothing yet) now that they've been graduated.

5. Report

LEARNINGS GRADUATED
  "Auth errors always wrap the original cause" → project-patterns-ts (Learnings)
  "Never call the payments webhook from a client component" → project-architecture (Learnings)
RESULT: 2 learnings graduated, 0 duplicates skipped

Guardrails

  • Only write inside the Learnings markers. This skill must never edit a project-* skill's generated body, and must never write to root CLAUDE.md — that's the exact bloat this skill exists to prevent.
  • Dedupe before appending. Don't let the same correction accumulate as five near-identical lines.
  • Don't invent routing. If a candidate's area genuinely can't be determined, default to project-architecture rather than guessing a specific pattern skill it doesn't belong in.

See also

  • harness-orchestrator — calls this at end-of-run
  • harness-analyzer — generates the Learnings block this writes into, and prunes it on re-analyze
  • harness-context-loader — the reason Learnings live per-skill: only loaded when that skill is relevant to the task

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.