agentleFS
sneg55sneg55/agent-starter/skills/reflect/SKILL.md

reflect

Skill76 starsChanged 5 months agoMITView on GitHub

Per-project self-improvement - reads the .harness ledger and feedback memories, then proposes gated rule/threshold/ADR changes so the project stops repeating mistakes. Run periodically.

172 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use poteto-help, setup-pstack and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • ianclearySkill

    poteto-help

    Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.

    Also in 14 projects that use this

  • bnemaSkill

    setup-pstack

    Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.

    Also in 24 projects that use this

  • eryzerzSkill

    make-bot-ui

    Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.

    Also in 19 projects that use this

  • ianclearySkill

    principle-explain-the-number

    Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.

    Also in 26 projects that use this

  • jaydubya818Skill

    automate-me

    Use when the user wants working preferences captured in a reusable mode skill.

    Also in 39 projects that use this

  • jaydubya818Skill

    poteto-mode

    Use when non-trivial work should follow the smallest rigorous Jstack workflow.

    Also in 27 projects that use this

  • +6 more from jaydubya818

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 1 is distinctive, and 6 are very specific to this project.

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 6

    Very specific

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

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

    Run the stats script over the ledger: ~/.claude/hooks/harness-ledger-stats.sh --ledger .harness/ledger.jsonl --min-recurr 3 If that path …

    line 21
  2. Very specific:

    If that path doesn't exist, the hooks aren't installed at ~/.claude/hooks/ - run the copy from wherever this project keeps them.

    line 23
  3. Distinctive:

    Read the current project rules in CLAUDE.md so you improve them rather than duplicate.

    line 26
  4. Very specific:

    Read recent feedback-type memory files - these are the developer's explicit corrections and are the highest-value signal.

    line 27
  5. Very specific:

    Read the most recent .harness/reflections/*.md report (if any) to recall the last metric snapshot and what was already changed.

    line 31
  6. Very specific:

    Ask the developer to approve, edit, or reject each proposal (like /remember).

    line 57
  7. Very specific:

    Create .harness/reflections/ if needed (mkdir -p .harness/reflections), then write a reflection report to …

    line 59

“Common” is measured: kept by at least 6 in 10 of the 163 edited versions of this file we could read. “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

Reflect: Per-Project Self-Improvement

You are performing a reflection - turning the signal this project has captured into durable improvements. Nothing is applied without the developer's approval.

Phase 1 - Orient (gather signal)

  • Run the stats script over the ledger: ~/.claude/hooks/harness-ledger-stats.sh --ledger .harness/ledger.jsonl --min-recurr 3 If that path doesn't exist, the hooks aren't installed at ~/.claude/hooks/ - run the copy from wherever this project keeps them. If the script prints all zeros there is no ledger yet (no signal captured) - stop; there is nothing to reflect on.
  • Read the current project rules in CLAUDE.md so you improve them rather than duplicate.
  • Read recent feedback-type memory files - these are the developer's explicit corrections and are the highest-value signal. Locate the memory directory first (it sits next to MEMORY.md; find . -name MEMORY.md if unsure), then grep -l 'type: feedback' <memory-dir>/*.md.
  • Read the most recent .harness/reflections/*.md report (if any) to recall the last metric snapshot and what was already changed.

Phase 2 - Cluster

From the stats output and feedback memories, identify recurring problems:

  • Each recurring <rule> <prefix> <count> line is a friction cluster - the same check keeps firing in the same area.
  • Group related feedback corrections by theme.
  • Ignore one-off events; focus on what repeats.

Phase 3 - Propose (one candidate per cluster)

For each cluster, draft exactly one proposed change, choosing the fitting type:

TypeWhenWhere it lands
Project rulea convention would stop the repeatappend to CLAUDE.md project-specific section
Threshold changea guardrail is too strict/loosea diff to .claude/settings.json or the hook - shown, never auto-applied
Lint rulethe mistake is mechanically catchablea diff to eslint.config.mjs / biome.jsonc
ADR / knowledgedurable "why" worth keepinga new memory file or docs/adr/ note

Present all proposals together as a numbered list with the concrete change for each.

Phase 4 - Gate & Record

  • Ask the developer to approve, edit, or reject each proposal (like /remember).
  • Apply only the approved ones, then commit them (use /commit).
  • Create .harness/reflections/ if needed (mkdir -p .harness/reflections), then write a reflection report to .harness/reflections/YYYY-MM-DD.md containing:
    • the full stats output (the metric snapshot, so the next reflection can compare),
    • the clusters you found,
    • which proposals were approved / rejected and why.

The report is committed; the raw .harness/ledger.jsonl stays gitignored. Signal is private; wisdom is shared.

Measuring success

The headline metric is recurring_events from the stats output. Compare it to the value in the previous reflection report. If a rule you promoted last time worked, the cluster it targeted should have shrunk. Note the trend explicitly in the new report.

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.