agentleFS
anorthanorth/agent-skills/skills/reflect/SKILL.md

reflect

Skill1 starsChanged 10 days agoMITView on GitHub

After an implementation effort, re-read the new code, reflect, and improve it. Apply non-product simplifications and improvements immediately; Report silent product decisions and unclear forks. Use when the user requests reflection, re-read, a second pass.

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

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

  • 0

    Common

    Most of the 163 edited versions we read keep these.

  • 6

    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:

    Do not use during planning, while waiting on a design question, or as a substitute for a formal review

    line 31
  2. Distinctive:

    Leave it for the report when:

    line 43
  3. Distinctive:

    Wait for the user to respond.

    line 59
  4. Distinctive:

    Ask these of what you've just written:

    line 67
  5. Distinctive:

    Do we need this? Is it doing anything?

    line 81
  6. Distinctive:

    Treat this as review-diff or a commit gate

    line 104

“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

The first implementation is a draft. Now that the code exists, review and re-think whether it was done in the best way. Ask questions of the code and context. Act on improvements that do not depend on a product decision. Raise the rest.

Goal: a higher-quality first pass before the user looks in detail. This is not a code review. Formal review comes later.

"Best" means:

  • Simplest solution that solves the problem
  • The domain model is clearly expressed
  • Coherent and consistent with the existing codebase
  • Re-uses existing objects, helpers, conventions when appropriate
  • Isn't contorted around existing code that wasn't built with the new requirements in mind
  • Comments explain the intent and rationale for the code
  • Raises the average quality of the codebase, sets examples that others can follow
  • The right long-term architecture, not the smallest change

When to use

  • The user says reflect, look again, second pass, shape this
  • Implicitly, after finishing a first implementation, including incremental changes to a WIP
  • Do not use during planning, while waiting on a design question, or as a substitute for a formal review

Workflow

1. See the code

Re-read the change as if seeing it for the first time. Read the new/changed files and the surrounding modules they plug into. The goal is a high quality final shape, not the smallest diff.

2. Hunt and apply

Work through the questions below. For each realization that does not depend on a product decision: do it. Do not ask permission to improve the code just written.

Leave it for the report when:

  • A requirement would be relaxed, changed, or dropped
  • Two product-valid paths exist and it is not obvious which is better
  • A product decision was taken silently during the build
  • A significant refactor to existing code is called for

3. Repeat

Fresh problems and opportunities will appear with each iteration. Repeat the reflection and improvement process until it stabilizes, or you reach only product or design decisions that require the user's input.

4. Report

Brief. What changed. Then leftover observations and decisions, numbered.

Wait for the user to respond.

Questions

Mostly, use your own judgement.

Now that you can see the code: was this the simplest and best way to address the need? Can it be simpler or more obvious?

Ask these of what you've just written:

  • Which requirements drove the complexity? Were any requirements interpreted too strictly? Which requirements were implicit? Challenge the user about them.
  • Now that you see the code, can it be rearranged to be more coherent?
  • What opportunities for simplification or improvement have emerged?
  • Are core concepts expressed just once, in a re-usable way?
  • Is anything awkward or surprising? Why?
  • Is the new code working around deficiencies in the codebase? Is there a straightforward fix?
  • What coupling emerged or was discovered? Is it justified?
  • Does this belong here, or should it pass through and live closer to where it's used?
  • Am I backing out or introspecting something that should have been constructed and passed through?
  • Can similar paths or structures be fruitfully unified?
  • Are there two different ways to do the same thing? Just pick one.
  • Is each piece of code in the right place?
  • Do we need this? Is it doing anything?
  • Are optional things truly optional?
  • What code smells are present?
  • Are names still appropriate, describing the now-current concepts?
  • What's the right architecture for this overall problem?
  • Would I actually build it this way if starting over?
  • Is this a hack?

Silent product decisions

Report these even when the code is fine. The user did not confirm them.

  • One of two user-visible behaviors was chosen
  • An application rule was encoded
  • A gate, cap, empty state, or copy path was invented
  • A default was picked that the user might want to see

Do not

  • Silently drop or loosen a requirement
  • Invent a base class or a prospective second caller
  • Rename a landed API field
  • Keep a workaround
  • Treat this as review-diff or a commit gate

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.