reflect
Skill1 starsChanged 8 months agoMITView on GitHub
Project knowledge base — accumulated memory from all coding sessions. Reflect maintains a wiki that compounds knowledge over time: decisions, preferences, patterns, gotchas, architecture, business rules, and anything discussed in sessions. Knowledge is searchable via qmd. Use this skill when the user asks about past decisions, project history, conventions, preferences, or any "why" question. Also use for retrospectives, onboarding context, and managing the knowledge base. Commands: /reflect, /reflect ingest, /reflect lint, /reflect status, /reflect sessions [session_id], /reflect timeline, /reflect search <query>, /reflect improve, /reflect metrics. Admin: /reflect init, /reflect upgrade.
187 other projects use a version of this.
Adopted by
Most recently taken up by
- andrewsoonqn/skillstheir own version, first seen Nov 29, 2026
- romerma/mstacktheir own version, first seen Nov 29, 2026
- mlschodkowski/skillstheir own version, first seen Nov 29, 2026
- MondayNotAGoodDay/skillstheir own version, first seen Nov 29, 2026
- sodejm/copilot-operation-plugin-for-securitytheir own version, first seen Nov 29, 2026
- sirius-cc-wu/sirius-skillstheir own version, first seen Nov 29, 2026
Used with
Projects with it also use setup-pstack, make-bot-ui 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.
bnemaSkillsetup-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 29 projects that use this
eryzerzSkillmake-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 22 projects that use this
jaydubya818Skillpoteto-mode
Use when non-trivial work should follow the smallest rigorous Jstack workflow.
Also in 34 projects that use this
jaydubya818Skillautomate-me
Use when the user wants working preferences captured in a reusable mode skill.
Also in 47 projects that use this
- +8 more from jaydubya818
Other versions187 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 187
- Yeachan-Heo/oh-my-claude-sisyphus★ 41ksame name
- Yeachan-Heo/oh-my-claudecode★ 41ksame name
- github/gh-aw★ 5.7ksame name
- backnotprop/pstack★ 5.4ksame name
- github/squad★ 3.5ksame name
- rilldata/rill★ 3ksame name
- microsoft/waza★ 1.5ksame name
- osmlab/name-suggestion-index★ 893same name
- llama-farm/llamafarm★ 837same name
- haddock-development/claude-reflect-system★ 373same name
177 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository5 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cli-for-agentsSkill
- entire-cliSkill
- reflectSkill
- skill-creatorSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 5 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 169 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 103
Use project memory whenever:
- Very specific: line 122
When invoked with no arguments or just /reflect:
- Very specific: line 124
Check if .reflect/ exists.
- Very specific: line 125
Run reflect status to show the current state.
- Very specific: line 126
If evidence has changed since last ingest, suggest reflect ingest.
- Distinctive: line 181
Orphan pages: no inbound related links from other pages
- Very specific: line 270
If the hook output contains REFLECT_WIKI_INGEST, run reflect ingest to update the knowledge base from new evidence.
- Distinctive: line 281
Search qmd for relevant wiki pages
- Very specific: line 282
Use reflect search, reflect timeline, reflect sessions for breadth
- Very specific: line 295
NEVER read .entire/metadata/ directly — use reflect CLI or entire CLI
- Distinctive: line 297
NEVER include secrets, API keys, or credentials in output
- Distinctive: line 298
Pitfall entries are blocking: if a past mistake is relevant to your current work, investigate before proceeding
“Common” is measured: kept by at least 6 in 10 of the 169 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.
Files
Reflect — Project Knowledge Base
Reflect is a persistent, compounding knowledge base for your project. It reads
session transcripts (Entire CLI) and git history, extracts ALL knowledge worth
remembering, and maintains a wiki at .reflect/wiki/. The wiki is indexed by
qmd for hybrid search (BM25 + vector + reranking).
You don't need to inject context. The knowledge base is always available via qmd. When you need project context — past decisions, preferences, patterns, gotchas — search qmd directly.
Parse $ARGUMENTS to determine which command to run:
ingest→ go to Command: Ingestlint→ go to Command: Lintstatus→ go to Command: Statussearch <query>→ go to Command: Searchsessions [session_id]→ go to Command: Sessionstimeline→ go to Command: Timelineimprove→ go to Command: Improvemetrics→ go to Command: Metricsinit/upgrade→ go to Command: Init & Upgrade- Everything else (including no arguments) → go to Command: Default
Accessing Project Memory
The knowledge base is a qmd collection named reflect-<directory-name>
(e.g., reflect-myapp). When you need to recall project knowledge during any
task, query it directly — qmd provides structured output built for agents.
Use these patterns — always prefer --json or --files over plain output:
# Get ranked hits with snippets + scores (best for reasoning over results)
qmd query "why do we use Supabase" -c reflect-myapp --json
# Get just the file paths above a relevance threshold, then read them yourself
qmd query "deployment process" -c reflect-myapp --files --min-score 0.4
# Get all matches (not top-10) above a threshold
qmd query "brand colors" -c reflect-myapp --all --min-score 0.5 --json
# Retrieve full document content when you need the complete page
qmd get decisions/database-choice.md --full -c reflect-myapp
# Grab a line range from a large page
qmd get guides/deployment.md:20 -l 40 -c reflect-myapp
# Batch fetch related pages via glob
qmd multi-get "decisions/*.md" -c reflect-myapp --json
# Pure keyword search (BM25, no LLM — fastest)
qmd search "stripe webhook" -c reflect-myapp --json
# Pure semantic search (vector similarity)
qmd vsearch "how do we handle payment retries" -c reflect-myapp --jsonQuery type cheat sheet:
qmd query— hybrid (BM25 + vector + LLM reranking) — best quality, use by defaultqmd search— BM25 only — fastest, best for exact keywords/names/codeqmd vsearch— vector only — best for semantic questionsqmd get— retrieve a specific page by pathqmd multi-get— batch fetch via glob pattern
Key agentic flags:
--json— structured output (prefer this over plain text)--files— paths only, one per line (forxargs,cat, agent self-read)--min-score <N>— threshold filter (0.4-0.6 is a reasonable floor)--all— return all matches above threshold, not just top-N--full— full document content (forqmd get)-n <N>— limit results (default 10)--no-rerank— skip LLM reranking (faster on CPU)-c <collection>— scope to a specific collection
Use project memory whenever:
- You're about to make an architectural decision (check if there's prior context)
- You need project conventions, preferences, or brand guidelines
- You encounter something unfamiliar in the codebase
- The user asks "why" about anything
- You want to avoid repeating past mistakes
A dedicated qmd skill is also installed (.claude/skills/qmd/) with
detailed guidance on lex/vec/hyde query types, intent steering, and combining
search types. Consult it for advanced queries.
qmd also ships an MCP server (qmd mcp) that exposes query, get, and
status tools via stdio. If you prefer MCP tool calls over shelling out to
Bash, register qmd as an MCP server in your agent config.
Command: Default
When invoked with no arguments or just /reflect:
- Check if
.reflect/exists. If not, suggestreflect init. - Run
reflect statusto show the current state. - If evidence has changed since last ingest, suggest
reflect ingest.
Command: Ingest
Usage: /reflect ingest
reflect ingest # process new sessions/commits into wiki
reflect ingest --verbose # show triage + write subagent progress
reflect ingest --force # suppress non-default-branch warningIngests new evidence into the wiki via a two-step subagent pipeline:
- Triage: Given new evidence + existing page index, produces a JSON plan. Extracts ALL knowledge: decisions, preferences, patterns, gotchas, pitfalls, architecture, business rules, brand guidelines — anything worth remembering. Can create new wiki categories dynamically.
- Write: For each planned action, produces page content with frontmatter.
- Index: Updates index.md and re-indexes the qmd collection.
Report the result: how many pages were created, updated, or resolved.
Branch Policy (Important)
The wiki is project memory — it belongs on the default branch (main),
not on feature branches. Recommended workflow:
1. Develop on feature branches → sessions accumulate in Entire CLI
2. Merge feature branch into main
3. On main: reflect ingest ← updates canonical wikireflect ingest warns when run on a non-default branch because branch-local
wiki updates create silos and merge conflicts. Entire CLI captures sessions
globally, so ingesting on main still picks up conversations that happened
on any branch. Use --force only when you intentionally want a branch-local
wiki (e.g., for experimentation).
Command: Lint
Usage: /reflect lint
reflect lint # report wiki health issues
reflect lint --fix # auto-fix resolvable issues
reflect lint --json # machine-readable outputChecks wiki health:
- Stale pages: updated date older than category recency window
- Orphan pages: no inbound related links from other pages
- Possibly resolved: open-work pages whose keywords appear in recent git log
- Coverage gaps: format.yaml sections with few or no wiki pages
- Near-duplicates: pages in the same category with >70% title overlap
--fix auto-resolves open-work and archives superseded pages. Returns non-zero
exit code when issues are found.
Command: Search
Usage: /reflect search <query>
reflect search <query> # search across all evidence sources
reflect search --phrase <query> # exact phrase match
reflect search <query> --wiki-only # search only wiki pages
reflect search <query> --json # machine-readable JSON outputFor richer semantic search, use qmd directly:
qmd query "<natural language question>" -c reflect-<repo-name>Command: Status
Usage: /reflect status
Shows evidence source availability, wiki page count, qmd collection status, and freshness state.
Command: Sessions
Usage: /reflect sessions [session_id]
reflect sessions # list recent sessions
reflect sessions --limit 30 # show more
reflect sessions <session_id> # inspect one sessionCommand: Timeline
Usage: /reflect timeline [--days N]
reflect timeline # last 7 days
reflect timeline --days 14 # expand windowCommand: Improve
Usage: /reflect improve
Analyzes the knowledge base quality and proposes format.yaml changes.
Command: Metrics
Usage: /reflect metrics
Outputs quantitative health of the knowledge base.
Command: Init & Upgrade
reflect init # scaffold .reflect/, install qmd, register collection
reflect init --no-wiki # skip wiki layer
reflect init --migrate # migrate from legacy harness
reflect upgrade # update templates and agents to latestSessionStart Hook
If the hook output contains REFLECT_WIKI_INGEST, run reflect ingest to
update the knowledge base from new evidence. The hook fires when new sessions
or commits are detected since last ingest.
Deep History: Keeper Agent
For questions that need deeper investigation than the wiki provides, spawn the Keeper agent. Keeper follows an evidence ladder:
- Search qmd for relevant wiki pages
- Use
reflect search,reflect timeline,reflect sessionsfor breadth - Drill into raw checkpoints with
entire explain --checkpoint <id> - Cross-reference with
git logandgit show
Spawn Keeper when:
- You need to trace a decision across multiple sessions
- You want to understand what was tried vs what landed
- A pitfall entry needs verification before you proceed
Rules
- NEVER read
.entire/metadata/directly — usereflectCLI orentireCLI - To customize knowledge categories, edit
.reflect/format.yaml - NEVER include secrets, API keys, or credentials in output
- Pitfall entries are blocking: if a past mistake is relevant to your current work, investigate before proceeding
skill/SKILL.mdis the source of truth;.claude/skills/reflect/SKILL.mdis a copy installed byreflect init
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
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.

