agentleFS
viksantviksant/swe-skills/skills/reflect/SKILL.md

reflect

Skill4 starsChanged 5 months agoMITView on GitHub

Analyze the current session for your OWN errors and save generalizable, deduplicated lessons to .claude/reflections.md, filed under the correct category. Use when the user asks to reflect on / capture lessons from the session — "reflect", "what did you learn", "save lessons", "retrospective", "capture takeaways", "session reflection". NOT for: reviewing code (use meticulous-code-review) or writing documentation; do not auto-invoke to write reflections unless explicitly asked.

105 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use make-bot-ui, principle-attack-the-premise 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.
  • 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 8 projects that use this

  • TheOnlyFusionCubeSkill

    principle-attack-the-premise

    Inventory who actually owns or exhibits the imbalance, then challenge the shared premise before writing another patch. Use when two or more fixes that share one premise have failed the same gate.

    Also in 10 projects that use this

  • TheOnlyFusionCubeSkill

    principle-test-behavior-not-implementation

    Call the system the way its consumer does and assert meaningful observable output; avoid mocks or assertions that only mirror internal calls. Use when when writing or evaluating tests.

    Also in 10 projects that use this

  • shishivSkill

    setup-pstack

    Configure pstack delegation against the active Pi host. Use for /skill:setup-pstack, "configure pstack models", or checking delegation readiness.

    Also in 13 projects that use this

  • finograficSkill

    figure-it-out

    Design an auditable playbook when no narrower one fits: a large migration, an ambitious multi-part change, or work a human reviews after stepping away. Scales rigor to the task, runs a hypothesis loop, and logs decisions via show-me-your-work. Use for /figure-it-out, 'figure it out', a large migration, or when no narrower playbook applies.

    Also in 19 projects that use this

  • shishivSkill

    automate-me

    Use for \"automate me\", \"create/update/refresh my -mode skill\", \"turn/capture my preferences or working style into a skill\", or wanting agents to follow how the user works. Drafts or revises a personal -mode skill via create-skill + unslop, optionally pulling fresh evidence from recent transcripts.

    Also in 16 projects that use this

  • +1 more from shishiv

The file

We split this skill into the rules it gives an agent

9 rules. 0 are common, 9 are distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 98 edited versions we read keep these.

  • 9

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Specific in action: No vagueness like "be more careful"

    line 95
  2. Distinctive:

    BEFORE writing, read existing reflections in ALL sections:

    line 113
  3. Distinctive:

    Use Edit tool to add reflections UNDER THE CORRECT SECTION.

    line 123
  4. Distinctive:

    Add the reflection as a new bullet under that section

    line 128
  5. Distinctive:

    If the section doesn't exist, CREATE it in alphabetical order

    line 129
  6. Distinctive:

    Before saving each reflection, verify:

    line 145
  7. Distinctive:

    If any answer is NO → rewrite, recategorize, or discard it.

    line 152
  8. Distinctive:

    When finished, briefly list:

    line 156
  9. Distinctive:

    If there were no significant errors, state it honestly

    line 159

“Common” is measured: kept by at least 6 in 10 of the 98 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

Context

First read .claude/reflections.md (use the Read tool; if the file does not exist yet, treat the existing reflections as empty and create it). You must know what is already recorded before adding anything — this is the input to Step 5 (deduplication).

Your Mission

You are your own critic. Analyze THIS conversation with brutal honesty to identify errors you made and extract lessons that will make you better in FUTURE sessions.

Step 1: Identify Errors (actively look for these patterns)

Review the conversation specifically looking for:

Execution Errors:

  • Commands that failed and you had to retry
  • Code that didn't compile/work on first attempt
  • Incorrect paths you assumed
  • Tools you used incorrectly or in wrong order

Assumption Errors:

  • Things you assumed without verifying (that turned out incorrect)
  • Data structures/schemas you imagined differently
  • API/library behaviors you misinterpreted

Process Errors:

  • Steps you skipped and then had to go back
  • Times the user had to correct you
  • Solutions you proposed that the user rejected
  • Moments where you were too verbose or unclear

Tooling Errors:

  • Wrong tool for the task (e.g., grep when you should have used an LSP tool)
  • Inefficient searches that took multiple attempts
  • Lack of use of available tools that would have been more efficient

Step 2: Extract the Universal Lesson

For EACH error identified, ask yourself:

  1. What was the ROOT CAUSE? (not the symptom)
  2. What PRINCIPLE did I violate? (not what command failed)
  3. How does this apply to ANY project? (not just this one)
  4. What will I do DIFFERENTLY next time? (concrete action)

Transforming error to lesson:

ERROR: "I assumed the table had column X and the query failed"
   ↓
ROOT CAUSE: Didn't verify schema before writing code
   ↓
PRINCIPLE: Verify before assuming
   ↓
LESSON: "Always query real schema/structure before writing queries or code that depends on it"
   ↓
CATEGORY: Database

Step 3: Categorize the Reflection

CRITICAL: Each reflection MUST go under the appropriate section in the file.

Available sections (you can create new ones if none apply):

SectionContent
DatabaseSchema, queries, migrations, connections, transactions
APIEndpoints, validation, responses, authentication, HTTP
FrontendReact, stores, components, TypeScript types, UI/UX
ToolingTool usage (LSP, grep, git), commands, IDEs
CleanupCode deletion, refactoring, dead code, deprecations
ArchitecturePatterns, structure, dependencies, system design
CommunicationClarification with user, assumptions, requirement interpretation

If a reflection applies to multiple categories, choose the MOST SPECIFIC one to the error made.

Step 4: Reflection Format

One line per reflection. It must be:

  • Actionable: Indicates WHAT TO DO, not just what to avoid
  • Universal: Applies to any project/language/context
  • Specific in action: No vagueness like "be more careful"

GOOD examples:

- Use LSP tools to find definitions before assuming code locations
- Verify database schema before writing queries that assume structure
- Read existing files before proposing modifications to understand context

BAD examples (DO NOT write like this):

- Be more careful (vague)
- The users table didn't have email (specific)
- Review code better (doesn't say how)

Step 5: Smart Deduplication

BEFORE writing, read existing reflections in ALL sections:

  1. If identical reflection exists → DO NOT add
  2. If similar reflection exists (same idea, different wording) → IMPROVE the existing one
  3. If truly new → Add under the correct section

To improve an existing one, use Edit tool to replace the line with improved version.

Step 6: Write to File

Use Edit tool to add reflections UNDER THE CORRECT SECTION.

Process:

  1. Identify the section where the reflection goes
  2. Find that section in the file (## Database, ## API, etc.)
  3. Add the reflection as a new bullet under that section
  4. If the section doesn't exist, CREATE it in alphabetical order

Edit example:

# If the reflection is about Database, find:
## Database
- [existing reflections]

# And add the new one:
## Database
- [existing reflections]
- [new reflection here]

Final Validation

Before saving each reflection, verify:

  • Is it actionable? (says what TO DO)
  • Is it universal? (applies to any project)
  • Does it avoid specific names? (doesn't mention specific tables, functions, files)
  • Is it in the correct section?
  • Does it not duplicate an existing reflection?

If any answer is NO → rewrite, recategorize, or discard it.

Expected Output

When finished, briefly list:

  1. Errors identified in the session
  2. Reflections added/improved (indicating section)
  3. If there were no significant errors, state it honestly

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.