discover
Skill2 starsChanged 7 days agoMITView on GitHub
Load relevant stored memories and codemap entries for the current task. Use when the user types /discover, asks to "load context," or a task is starting with stored context unsurfaced. Also callable by other skills (prep, review).
57 other projects use a version of this.
Adopted by
Most recently taken up by
- anombyte93/prd-taskmastertheir own version, first seen Nov 8, 2026
- charles-adedotun/sre-plugintheir own version, first seen Nov 8, 2026
- rajanrx/skillstheir own version, first seen Nov 8, 2026
- joeldevz/skynex-pitheir own version, first seen Nov 8, 2026
- AsiaOstrich/EngramGraphtheir own version, first seen Nov 8, 2026
- islandhopper81/claude-skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use daily-arxiv, exp-eval 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.
LambenthanSkilldaily-arxiv
每日从 arXiv 拉取新论文,过滤相关性,auto-ingest 高优先级论文,检测 SOTA 更新
Also in 5 projects that use this
LambenthanSkillexp-eval
实验判决门:Review LLM 独立评判实验结果 → 4 种判决路径 → 自动更新 claims confidence、ideas status、graph edges
Also in 5 projects that use this
skyllwtSkillexp-pilot-eval
Pilot result evaluation — read pilot results, apply success criteria, update idea page (pilot_result, failure_reason if failed), generate PILOT_VERDICT_REPORT. Called by /ideate Phase 5 after /exp-pilot-run.
Also in 4 projects that use this
skyllwtSkillexp-pilot-run
Pilot experiment execution — read Pilot Spec YAML, write pilot code, run experiment(Confirm with the user before operation and require the applicant to conduct manual inspection), return results. Called by /ideate Phase 5. Does NOT modify wiki pages or judge pass/fail.
Also in 4 projects that use this
phanghonghaoSkillposter
HTML/CSS A4 海报生成。从沙龙/活动 Markdown 文件生成科技风 A4 海报 PDF/PNG。Use when user mentions: poster, 海报, 海报生成, make poster, generate poster, 活动海报, 沙龙海报.
Also in 4 projects that use this
- +6 more from Lambenthan
- +1 more from skyllwt
Other versions57 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 57
- skyllwt/OmegaWiki★ 1.7ksame name
- DAIR-AutoResearch/AutoSci★ 1.7ksame name
- PKU-DAIR/AutoSci★ 1.7ksame name
- skyllwt/AutoSci★ 1.7ksame name
- suboss87/FDEOps★ 940same name
- anombyte93/prd-taskmaster★ 608same name
- zaxbysauce/opencode-swarm★ 519same name
- ZaxbyHub/opencode-swarm★ 518same name
- hsantanna88/clo-author★ 262same name
- hugosantanna/clo-author★ 262same name
47 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 repository47 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- autonomizeSkill
- blueprintSkill
- brainstormSkill
- captureSkill
- checkpointSkill
- close-outSkill
- coordinateSkill
- cycleSkill
- deliverSkill
- design-proposalSkill
- dispatchSkill
- draft-planSkill
- envisionSkill
- executeSkill
- extract-conventionsSkill
- glossarySkill
- humanizeSkill
- human-viewSkill
- improve-promptSkill
- memory-auditSkill
- new-agentSkill
- new-agents-mdSkill
- new-hookSkill
- new-mcpSkill
- orchestrateSkill
- pr-authorSkill
- prepSkill
- pre-pushSkill
- pr-triageSkill
- recapSkill
- retrospect-coreSkill
- reviewSkill
- rulesSkill
- shortcutsSkill
- specSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- update-changelogSkill
- update-codemapSkill
- using-git-worktreesSkill
- visualise-codemapSkill
- visualSkill
- work-stateSkill
- wrapSkill
- write-testsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
20 rules. 0 are common, 8 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 50 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Do not auto-fire at session start — explicit invocation only.
- Very specific: line 33
Call mcp__project-memory__discover with the task-derived query:
- Distinctive: line 51
When the engine is unreachable, do not silently re-run the full in-context scan as if nothing happened.
- Very specific: line 53
Read ~/.claude/projects/<slug>/memory/MEMORY.md (the fallback index).
- Very specific: line 67
Use Glob to find: ~/.claude/projects/*/memory/MEMORY.md.
- Very specific: line 71
If no match → report "no project memory found for <cwd>" and proceed with whatever global context is already loaded via ~/.claude/CLAUDE.md.
- Very specific: line 75
Read the full file. It is the index: one line per entry, format - Title — one-line hook.
- Very specific: line 82
Keep nouns, verbs, names. Keep technical terms even if short (api, jwt, ui).
- Very specific: line 88
If keywords_hit == 0 and the entry is not tagged relevance: always (unknown at this stage — flag for second pass), drop from primary …
- Very specific: line 90
Keep entries with keywords_hit ≥ 1 as primary candidates.
- Distinctive: line 94
When architectural rules are in the result, resolve the tier overlay per overlay.md before step 5.
- Very specific: line 100
Suppress superseded memories: If superseded_by: is set, drop the candidate from the surfaced set unless the caller passed it by explicit …
- Very specific: line 108
If a caller passed scopes / kind / relevance_phases filters, apply them as hard filters (drop non-matching entries) before scoring.
- Distinctive: line 125
After 5a, re-sort the surfaced set by score (relation-pulled entries take their source's score minus 1 unless they had their own §5 score, …
- Very specific: line 136
Use discovered scopes as the matching set in §5.
- Distinctive: line 140
If fewer than 2 entries survive with a score ≥ 2, widen:
- Very specific: line 147
Check <project-root>/.claude/codemap.md.
- Distinctive: line 150
Read and identify files/exports matching the inferred scopes and task keywords.
- Distinctive: line 212
When the caller asks for bodies, see reference.md, *render fragment bodies via deliver*.
- Distinctive: line 230
Do not ask generic questions ("tell me more about X").
“Common” is measured: kept by at least 6 in 10 of the 50 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
discover
Unified retrieval layer. Aggregates stored memory fragments (what we've decided/learned) and codebase context (what the code actually looks like) into the current session.
When to run
- User types
/discover(explicit trigger). - User says "load context," "prep yourself," "what do you know about X."
- Another skill invokes this one (prep, review).
- Do not auto-fire at session start — explicit invocation only.
Inputs
- Task text. The most recent user message, plus any arguments passed after
/discover. - Project root.
$CLAUDE_PROJECT_DIRif set, otherwise the current working directory. - Optional caller filters (when invoked by another skill, not by a user):
scopes,kind,relevance_phases. See "Query interface" below.
Architecture — MCP-primary, skill-fallback
Retrieval is MCP-primary: memory + recap + codemap retrieval is owned by the project-memory MCP engine, out of context. This skill is a thin client over it, with a static always-on floor when the engine is unreachable.
Two responsibilities stay in this skill, NOT the MCP:
- Rules-overlay resolution (§4a) — the rules-overlay tier/patch/disable subsystem is a separate module; v1 keeps it skill-resident.
- The fallback — when the MCP is down, surface the static floor (§0b). The skill does not re-implement the full ranking as its primary path.
0. Primary path — query the MCP engine
Call mcp__project-memory__discover with the task-derived query:
mcp__project-memory__discover({
cwd: <project root>, // the engine resolves the layered tier
include_codemap: true,
... // remaining params per "Query interface" below
})The engine returns ranked memory fragments (with 📛 warning prefixes, [related_to] / ⚡ contradicts flags, scope/relevance metadata), plus a ## Codemap block, plus any ⚠️ shadowed-tier / case-split warnings. Surface that result directly (§9 shaping is mostly done by the engine). Then run §4a (rules-overlay) and merge: overlay-resolved rules are appended to the engine's result list and ranked by the same signals the engine reports (scope match, then kind priority, then description keyword overlap with the task); ties break toward the overlay rule, since a tier override outranks a shipped default. The merged list honours the caller's top_n as a single combined cap — overlay rules never bypass the cap. Deliver then renders the merged list's bodies exactly as in the degraded path (§9a applies to engine-returned bodies too).
Open handoffs. Also call mcp__project-memory__list_handoffs. If any are open (another agent or tool stopped mid-task here), list them and offer to claim one with claim_handoff. Claiming is the user's call; a claim can't be undone.
Detecting MCP-unavailable: the tool call errors, returns "No memory tree found" with no result, or the project-memory server is not connected. On any of these → fall through to §0b. Do not retry in a loop.
0b. Fallback — static always-on floor
When the engine is unreachable, do not silently re-run the full in-context scan as if nothing happened. Surface the static floor and say the engine is down:
- Read
~/.claude/projects/<slug>/memory/MEMORY.md(the fallback index). - Surface only the
relevance: alwaysentries (the load-bearing always-applicable set) plus anykind: warningentries whose scope plausibly matches the task. - Tell the user: "project-memory MCP unavailable — showing the always-on floor only; ranked retrieval resumes when the MCP reconnects (restart the session or
/mcp reconnect)."
The richer in-context scan (§1–§9 below) remains documented as the degraded deep-scan the skill MAY run if the user explicitly asks for full retrieval while the MCP is down — but it is not the default fallback. Default fallback = the cheap static floor.
Procedure (degraded deep-scan / reference contract)
Contract-of-record for the engine; run in-context only on explicit request while the MCP is down (§0 supersedes for normal operation).
1. Resolve the project memory directory
Use Glob to find: ~/.claude/projects/*/memory/MEMORY.md.
Pick the match whose path contains the project root directory name (case-insensitive, separator-insensitive).
If no match → report "no project memory found for <cwd>" and proceed with whatever global context is already loaded via ~/.claude/CLAUDE.md. Do not try to derive the slug manually — Claude Code's slug convention is not documented and attempts to reconstruct it are fragile.
2. Read MEMORY.md
Read the full file. It is the index: one line per entry, format - [Title](path) — one-line hook.
3. Extract task keywords
From the task text plus any /discover arguments, extract keywords:
- Lowercase, split on whitespace and punctuation.
- Drop common stopwords (
the,a,an,to,of,and,or,is,for,with,from,on,in,at,by,as,this,that,it,i,you). - Keep nouns, verbs, names. Keep technical terms even if short (
api,jwt,ui).
4. Score candidates from the index
For each MEMORY.md entry, compute a first-pass score:
keywords_hit= count of task keywords appearing in the title or hook.- If
keywords_hit == 0and the entry is not taggedrelevance: always(unknown at this stage — flag for second pass), drop from primary candidates.
Keep entries with keywords_hit ≥ 1 as primary candidates.
4a. Architectural-rule overlay resolution
When architectural rules are in the result, resolve the tier overlay per overlay.md before step 5.
5. Read frontmatter of primary candidates
For each primary candidate, Read the file and parse frontmatter. Extract scope, relevance, kind, relations, superseded_by.
Suppress superseded memories. If superseded_by: is set, drop the candidate from the surfaced set unless the caller passed it by explicit name (e.g. task_keywords includes the candidate's name field exactly). This keeps superseded entries inspectable when asked for, hidden from normal discovery.
Compute a second-pass score per candidate:
+2 × |task_scopes ∩ scope|(tag overlap is the strongest signal; task_scopes come from keyword → scope guess, see §6)+1ifrelevanceincludesalways, or matches the current phase+1 × keywords_hit(already computed)+2ifkind == "warning"(warnings are landmines — surface them ahead of generic lessons when scope matches)
If a caller passed scopes / kind / relevance_phases filters, apply them as hard filters (drop non-matching entries) before scoring.
Sort candidates by score descending. Keep top 8. Cap adjustable by caller.
5a. Single-hop relation expansion
For each candidate that survived §5 scoring, follow its relations: entries one hop:
| relation | action |
supersedes | already filtered by §5 superseded suppression; do not re-pull the target. |
contradicts | pull the target even if it didn't independently match; flag the pair [contradicts] in the report so the user can reconcile. |
supports | if the target is already in the surfaced set, bump its score +1; if not, do not pull it in — a weight bonus, not a magnet. |
related_to | soft pointer: pull the target with a [related_to <source>] flag. No transitive expansion — single-hop only. |
Cap relation-pulled additions at 3 per source candidate; beyond that keep the first 3 by relations order and note [N more relations not expanded] in the report.
After 5a, re-sort the surfaced set by score (relation-pulled entries take their source's score minus 1 unless they had their own §5 score, in which case the higher of the two).
6. Inferring task scopes
Resolver-provided scopes are hard inputs. When the caller (prep) ran the scope-resolution resolver for the task path, treat its resolved scopes as hard scope inputs (a task under a go submodule carries the go/region scopes, not the sibling region's) and pass its corpus-source to §4a. Absent manifests → no resolver input → infer scopes exactly as below (no regression).
From the task text, infer candidate scope tags (seeded by any resolver-provided scopes):
- Strong hints: filenames or module names mentioned (
src/auth/→ scopeauth). - Medium hints: domain words (
login,password,session→ scopeauth). - Fall back to
[global]only if nothing specific surfaces.
Use discovered scopes as the matching set in §5. When uncertain, include [global] so universally-scoped entries are never excluded.
7. Keyword fallback (only if §4–§5 returns thin)
If fewer than 2 entries survive with a score ≥ 2, widen:
- Grep the body of every memory file for task keywords.
- Any file with ≥ 2 keyword hits is a low-confidence match.
- Flag these as "possibly relevant" in the report, separate from the high-confidence matches.
8. Read the codemap (if present)
Check <project-root>/.claude/codemap.md. If missing, skip §8 silently (the project may not have a codemap yet).
If present:
- Read and identify files/exports matching the inferred scopes and task keywords.
- Note the codemap's last-modified timestamp.
8a. Scan session recaps
Path: <memory-root>/sessions/ (the project memory resolved in §1).
Skip silently if the folder does not exist — the project may have no recaps yet.
Scan filenames matching YYYY-MM-DD-<slug>.md. Parse the date.
Apply the 30-day auto-surface cutoff: recaps with date within the last 30 days are auto-candidates; older recaps only if the task text explicitly names a matching project slug, branch, or date (e.g. "the auth branch from March", "last week's recap").
For each surviving recap, Read frontmatter. Score:
+2 × |task_scopes ∩ scope|— scope overlap (same weight as other candidates).+1 × keywords_hitonname/description. Also scan theLearnedsection headings for bonus keyword hits.- Recency bonus:
+2ifdateis within 7 days;+1if 8–30 days.
Scored recaps join the §9 candidate set; when bodies are rendered (§9a) they deliver as tier session-recap. Recaps are opt-in: callers pass include_recaps: true; the default is false and §8a is skipped entirely.
9. Report
Report to the user in this shape:
Loaded N memories + R recaps + M codemap entries (codemap age: X days):
Memories (high confidence):
- 📛 [Warning Title] (scope: <tags>, relevance: <phase>)
- [Title] (scope: <tags>, relevance: <phase>)
- [Title] [related_to <source>] (scope: <tags>, relevance: <phase>)
- [Title-A] ⚡ contradicts [Title-B] (both surfaced — needs reconciliation)
- ...
Memories (possibly relevant):
- [Title] (scope: <tags>, relevance: <phase>)
- ...
Session recaps:
- [Title] (date: <YYYY-MM-DD>, scope: <tags>)
- ...
Codemap:
- path — summary
- ...
No stored context found for: [list of task aspects with no matches].
Want to provide context, or should I proceed with what I have?Display rules:
kind: warningentries get the📛prefix and appear at the top of their tier.[related_to <source>]annotations explain why a fragment surfaced via single-hop expansion (the user can tell direct match from relation pull at a glance).⚡ contradicts <other>flags pairs where the user needs to reconcile two memories that disagree.
Overlay annotations (architectural-rule candidates only) — non-default rules only, a plain shipped rule shows nothing extra:
[company override]/[user override]— a higher tier replaced the shipped file.[user patch over shipped (−1 ~1 +1)]— a field patch applied, with delta counts.[⚠ orphaned patch anchor]— a patch referenced an id that no longer exists; base loaded un-patched.[⚠ override of LOCKED company rule]— the user diverged from a locked company rule (divergence recorded).
Sections are omitted when empty. If nothing matched at all, say so and go to §10.
9a. Optional — render fragment bodies via deliver
When the caller asks for bodies, see reference.md, render fragment bodies via deliver.
10. Escalate when coverage is thin
Thin = any of:
- Zero high-confidence memory matches and zero codemap matches.
- The task names specific aspects that no match addressed (e.g., user asked about "payment gateway webhooks" and nothing in memory or codemap mentions payment).
- Claude's own judgment: "I'm about to guess."
Escalation shape: ask up to 3 targeted, numbered questions. Each names the specific gap.
Before I proceed, I need clarity on:
1. [specific gap — phrased as a question]
2. [specific gap]
3. [specific gap]Do not ask generic questions ("tell me more about X"). Each question must identify a specific piece of missing context.
Query interface (for other skills)
The call shape other skills use: reference.md, Query interface.
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.

