AGENT SKILL

reflect

Consolidate what recent sessions learned into the project's long-term memory (.agents/memory). Use at the end of a substantial session, after a correction from the user, after a painful debugging session, when the session-start healthcheck says reflect is overdue or a pending-reflection seed is waiting, or when MEMORY.md exceeds its budget.

License 许可
MIT
最近更新
2026-10-06
Stars
★ 0
Forks
0

01 前言 Front Matter

name
reflect
description
Consolidate what recent sessions learned into the project's long-term memory (.agents/memory). Use at the end of a substantial session, after a correction from the user, after a painful debugging session, when the session-start healthcheck says reflect is overdue or a pending-reflection seed is waiting, or when MEMORY.md exceeds its budget.

03 SKILL.md 正文

Reflect

Memory lives in .agents/memory/: one markdown note per lesson, indexed one line per note in MEMORY.md, git-tracked so every agent and every machine sees it.

1. Gather signal

python3 .claude/hooks/harness_paths.py        # prints pending_reflection + captures paths
python3 .claude/hooks/pattern-extractor.py --days 14 --output text
git log --since="14 days ago" --pretty=format:"%h %ad %s" --date=short

Read the pending-reflection seed if the first command's pending_reflection file exists (the Stop hook writes it after a session that touched 3+ files or committed). If transcripts_scanned is 0, say so: the extractor is disconnected (run harness-check), so "no corrections" means nothing.

For each correction or challenge the extractor found, ask: one-off, or a behaviour to change? Seen 2x: write a feedback_ note. Seen 3x: also propose a rule line for AGENTS.md (the harness-optimize skill owns that change).

What deserves a note

Only things that are non-obvious and still true in 30 days:

  • a correction the user gave ("don't X, because Y")
  • a trap that cost time (an env quirk, a misleading error, a tool that lies)
  • a decision and its reason, if it isn't already in docs/decision-log.md

Not: code patterns, file paths, anything grep would find, session narration.

Note format

.agents/memory/<type>_<slug>.md, where type is feedback, ops, project, reference or user:

---
title: Short title
description: One line: the rule and why
tags: [area, tool]
---
The lesson in a few sentences. **How to apply:** the concrete behaviour change.
Related: [[other_note_slug]]

Then add one line to MEMORY.md: - [Title](file.md): one-line description.

Consolidate

  • Merge duplicates; update a stale note rather than adding a contradicting one.
  • Link each new note to at least one related note ([[slug]]) where one exists.
  • Keep MEMORY.md ≤ 45 lines; demote the least-used notes out of the index (they stay findable by the recall hook) rather than deleting lessons.
  • Commit on a chore/memory-<date> branch and open a PR.

Finish

Delete the seed and stamp the cadence clock (the session-start healthcheck reads it):

python3 -c "import sys,os; sys.path.insert(0,'.claude/hooks'); from harness_paths import pending_reflection_file as p; f=p(); os.path.exists(f) and os.remove(f)"
python3 .claude/hooks/harness_paths.py stamp reflect

Print: Memory consolidated. N added, N updated, N removed.

04 同仓库更多 Skills

foxinthehenhouse
foxinthehenhouse/app-in-a-box

ship

Release checklist for getting a build to testers or the stores. Runs the risk gate first (refuses while a risk item is open) and walks the owner through the compliance checklist. Covers the version bump, EAS build and submit, OTA updates and when they're safe, changelog, store listing, privacy nutrition label / data safety form, the Accessibility Nutrition Labels, and the account-deletion requirement. Guidance-level; it never handles signing secrets. Use when asked to ship, release, submit to TestFlight / App Store / Play, or push an OTA update.

★ 0
foxinthehenhouse
foxinthehenhouse/app-in-a-box

routines

Put the project's recurring rituals on a schedule, with the owner's consent. Weekly north-star report, monthly market watch, dependency triage, Supabase advisor sweep, reflect and harness-optimize. Uses Claude Code Routines (cloud cron) where they fit, and documents the Codex / local cron equivalent. Use when asked to automate, schedule or "keep the project moving on its own", or after setup finishes.

★ 0
foxinthehenhouse
foxinthehenhouse/app-in-a-box

pr-review

Review a pull request on the owner's behalf and fix what's safe to fix. Runs the deterministic gates first, then correctness/security, design-system, accessibility and analytics review passes, verifies each blocking finding, applies safe fixes, re-checks, and ends with a plain-English verdict. Use when a PR is opened, when asked to review a PR, a branch or a pasted diff, or before merging anything.

★ 0
foxinthehenhouse
foxinthehenhouse/app-in-a-box

north-star-report

Weekly product-analytics and reliability readout. Pulls the funnel of the brief's 5 north-star events from PostHog, finds the biggest drop-offs and errors, checks each SLO in docs/slo.yaml against its error budget, compares with last week, and proposes (then, with a yes, files) tickets that target them. Use weekly, when the session-start line says it's overdue, when the backlog is empty, or when asked "how is the app doing?".

★ 0
foxinthehenhouse
foxinthehenhouse/app-in-a-box

next

Decide the single next best thing to work on, with two alternates. Reads setup progress, work in progress, open PRs and failing CI, the backlog (GitHub Issues or Linear), overdue harness rituals, product decisions parked until now, and north-star analytics if PostHog is connected. Use when someone asks "what next?", "what should I work on?", at the start of a session, or after a PR merges.

★ 0
foxinthehenhouse
foxinthehenhouse/app-in-a-box

new-worktree

Create an isolated git worktree + branch off origin/main for one unit of work, so parallel agents or sessions never share a checkout. Use when starting any ticket, or when another session may be working in the main checkout.

★ 0