Explore the guides +
Skills/reflect
Companion / SKILL GUIDE

reflect

Turn a demonstrated mistake into a prevention you can approve.

Adding another vague instruction after every mistake is a good way to grow a rulebook nobody follows. Reflect starts with evidence, checks whether the problem is recurring, and prefers a test or tool that can catch it next time.

When I’d use it

Use it after a repeated failure, an escaped defect, or a correction that exposes a systematic gap. It isn’t a ritual for the end of every successful task.

Before you start

Bring the failing test, confirmed review finding, regression, or correction. With no demonstrated failure, there’s nothing concrete to learn from.

Install it. Then give it a task.

Run this in your project’s terminal. Choose your coding agent in the installer, then start a new agent session if it needs one to discover the skill.

TERMINAL
$ npx skills add akdevsaha-dev/factory-skills --skill reflect

Once installed, send a prompt like the ones below to your agent. These are example requests to adapt to your own project, not terminal commands or recorded results.

If slash commands aren’t available in your agent, write “Use the reflect skill to…” and describe the same task.

New to skills? Start with the installation walkthrough

What happens next

  1. States the failure and checks whether the pattern appears elsewhere.
  2. Finds a root cause that a check, tool, or instruction could address.
  3. Proposes the smallest durable prevention and validates it where possible.
  4. Shows the exact proposed change and waits for your approval.

A few ways to ask

5 examples

Copy the one closest to your task. Replace names, paths, dates, and refs with ones that exist in your project.

01

Learn from a repeated test failure

SEND TO YOUR AGENT
› /reflect the last two export changes mishandled quoted CSV values. Use the failing test output in this session to find the shared cause and propose a regression check.

The claim needs actual evidence from the session or files you provide.

02

Investigate an escaped permission defect

SEND TO YOUR AGENT
› /reflect the confirmed review finding about cross-organization project access. Check whether the same lookup pattern appears elsewhere and propose the smallest prevention.

A confirmed finding is a better starting point than a hypothetical vulnerability.

03

Prefer a check over a new rule

SEND TO YOUR AGENT
› Use reflect on the repeated missing loading-state correction. First check whether a test or static rule could catch it. Show the proposal before changing anything persistent.

The preference is test, static rule, tooling, and only then an instruction change.

04

Check whether a mistake is isolated

SEND TO YOUR AGENT
› /reflect investigate the regression described in this bug report. If it is an isolated slip, say so rather than adding a broad rule.

Reflect may conclude that a persistent rule is not warranted.

05

Review a proposed prevention

SEND TO YOUR AGENT
› /reflect use the confirmed retry regression and its failing test. Show how the proposed prevention would catch that case and still pass for correct code.

The proposal should be validated against concrete bad and good cases.

What to look for in the result

A failure statement, recurrence assessment, root cause, and a validated proposal. Persistent instructions, tests, lint configuration, and other rules are not changed until you explicitly approve the specific change.

A thing worth watching

Don’t ask it to “remember everything from this task.” That mixes observations, preferences, and real defects. Start with one demonstrated failure and a prevention that addresses it.

Use it with

Based on the repository’s skill instructions.Read the source
PUT IT INTO PRACTICE

Build a workflow you can repeat.

Follow the step-by-step guide to working with agents.

Explore Learn