Skip to main content
skill CX Codex

reflect · sneg55 — Claude Code skill: per-project self-improvement

Reads the .harness ledger and your feedback memories, then proposes rule, threshold and ADR changes so the project stops repeating the same mistakes.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add sneg55/agent-starter --skill reflect -a claude-code
Open on GitHub

What reflect does

The skill runs in four phases. First it gathers signal: a stats script over .harness/ledger.jsonl, the project rules in CLAUDE.md, recent feedback memories, and the last report under .harness/reflections/. Then it clusters what repeats. Every recurring <rule> <prefix> <count> line marks one friction cluster; one-off events get dropped.

Each cluster gets exactly one proposal, and the type depends on the problem. A convention goes into the project section of CLAUDE.md. A guardrail that fires too often or too rarely becomes a diff to .claude/settings.json or the hook. A mechanically catchable mistake turns into a lint rule for eslint.config.mjs or biome.jsonc. The durable “why” lands in a memory file or docs/adr/. All proposals arrive as one numbered list, and none of them is applied on its own.

You approve, edit or reject each item, the approved ones are committed, and a report with the metric snapshot and the reasons for rejections is written to .harness/reflections/YYYY-MM-DD.md. The report is tracked in git; the raw ledger stays gitignored. One thing to know up front: the stats script normally lives in ~/.claude/hooks/, so without the hooks installed you have to run it from wherever the project keeps them. All zeros in the output mean no signal has been captured yet, and the skill stops there.

What it helps with

  • spot checks that keep firing in the same part of the codebase
  • turn a developer correction from a feedback memory into a project rule
  • loosen or tighten a guardrail threshold without editing the hook by hand
  • add a lint rule for a mistake a machine can catch
  • record the reasoning behind a decision in docs/adr/ so it stops coming back

Example prompts for the agent

  • Run reflect and show me which checks recur most often
  • Cluster the entries in .harness/ledger.jsonl and draft one change per cluster
  • Write the reflection report to .harness/reflections/ and compare the metric with last time

How to install reflect

1Skills CLI (Vercel)

npx skills add sneg55/agent-starter --skill reflect -a claude-code

2Manually: put the files in place

~/.claude/skills/reflect/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/reflect/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about reflect

How do I install reflect in Claude Code?

Run npx skills add sneg55/agent-starter --skill reflect -a claude-code. The skill lands at ~/.claude/skills/reflect/SKILL.md.

What does the reflect skill do?

It reads the .harness ledger and your feedback memories, finds recurring problems, and proposes changes to rules, thresholds, lint config or ADRs. Only what you approve gets applied.

What does reflect need to work?

A non-empty .harness/ledger.jsonl and the harness-ledger-stats.sh script, which usually sits in ~/.claude/hooks/. If the stats come back as zeros, no signal was captured and the skill stops.

Source text

SKILL.md · MIT
---
name: reflect
description: 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.
user_invocable: true
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep
---

# 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:

| Type | When | Where it lands |
|------|------|----------------|
| **Project rule** | a convention would stop the repeat | append to `CLAUDE.md` project-specific section |
| **Threshold change** | a guardrail is too strict/loose | a diff to `.claude/settings.json` or the hook - **shown, never auto-applied** |
| **Lint rule** | the mistake is mechanically catchable | a diff to `eslint.config.mjs` / `biome.jsonc` |
| **ADR / knowledge** | durable "why" worth keeping | a 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.

© sneg55 · MIT · sneg55/agent-starter

Similar skills

All skills for Agent setup: memory, context, orchestration →

reflect by other authors comes first.

reflect backnotprop Mines the current session transcript using three review subagents and turns discovered lessons into concrete skill edits. CX Codex +1 5,300installs reflect Alireza Rezvani Pauses active task execution to re-evaluate conversation direction, assumptions, and bias across five analytical dimensions. 320installs reflect NeoLabHQ A skill that makes the agent reread its own answer and list the flaws before you accept the work. CX Codex +1 1,400installs reflect haowjy Reviews delivered work before the final report and routes session knowledge into project files. Useful for catching overlooked needs while context is fresh. CX Codex +1 378installs memory-reflect basicmachines-co The skill reviews what changed in Basic Memory and carries the durable parts into the notes where they belong. Run it daily or after a burst of work. CX Codex +1 1,200installs self-improving-agent Alireza Rezvani This plugin reviews Claude Code auto-memory and helps move recurring patterns into rules or turn them into reusable skills. ★ 28,786repo stars claude-self-reflect ramakay Stores Claude Code conversation history locally and retrieves past context with sub-millisecond vector search. Keeps your decisions and task state across multiple sessions. ★ 228repo stars capability-evolver EvoMap Runs autonomous self-evolution for AI agents based on runtime history. It syncs code improvements with EvoMap Hub via a local JSONL mailbox proxy. CX Codex +1 4,900installs ultracite haydenbleasel The ultracite skill sets up linting and formatting for JS/TS projects through Oxlint, Biome or ESLint with one command. CX Codex +1 11,400installs mantis-reflect official google Extracts insights, failures, and false assumptions from Mantis agent transcripts, appending them to workspace/learnings.jsonl. CX Codex +1 1,500installs

From the same set2

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor