一键导入
end-session
Lean memory capture before /clear. Scans conversation for reusable patterns, appends max 5 bullet points to project MEMORY.md. Prevents memory bloat.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Lean memory capture before /clear. Scans conversation for reusable patterns, appends max 5 bullet points to project MEMORY.md. Prevents memory bloat.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold a new research project: creates method.md, agenda.md, CLAUDE.md, and AGENTS.md with standard Big 5 folder structure. CLAUDE.md/AGENTS.md embed the lab's truth-over-harmony, coding-discipline, and research-integrity guardrails. Removes the friction of starting from scratch every time.
Use when drafting or revising scientific prose (proposals, paper intros, grant narratives, significance sections) and the sentences feel choppy, list-like, or jump between ideas — or when a reviewer says the writing 'doesn't flow.' Applies the known-new chaining technique distilled from Kangning Huang's NASA NESSF proposal: each sentence ends on a new idea that becomes the next sentence's opening topic (A→B, B→C), and each paragraph's first sentence reaches back to the previous paragraph's last idea. Keywords: flow, transitions, coherence, choppy, doesn't flow, topic chaining, known-new contract, anadiplosis, paragraph hinge.
Analyze causal relationships by searching for and evaluating scientific evidence. Use when the user asks whether X causes Y, inquires about causal mechanisms, or wants to distinguish causation from correlation. Triggers include questions like "does X cause Y", "is there a causal relationship between", "what's the evidence that X leads to Y", or "causation vs correlation" discussions.
Transform dense academic papers into compelling narratives using Malcolm Gladwell's storytelling techniques. Use when users ask to explain, interpret, summarize, or make accessible a research paper, academic article, or scientific study—especially when they want engaging, readable prose rather than technical summaries. Triggers include requests like "explain this paper," "help me understand this research," "make this accessible," "write about this study," or "Gladwell-style explanation."
Transform academic papers into pop-science summaries using the 'ladder-building' science-writing approach developed by Kangning Huang (start from what the reader already knows, then build up step by step). Requires WebSearch to research authors, Read for PDFs. Use when user shares a paper PDF or asks for a paper summary.
Strategic field reconnaissance for a domain you know a little but not enough. Produces an 8-dimension landscape map ending in a gap table ranked by a 3-filter comparative-advantage test against the user's own research pillars. Domain coverage: complexity science, urban science, urban sustainability, industrial ecology, economic geography. Scouting mode only — no prose drafting, no PDF ingestion. Conductor pattern: delegates verification and deep-read work to other Lu Lab skills.
| name | end-session |
| description | Lean memory capture before /clear. Scans conversation for reusable patterns, appends max 5 bullet points to project MEMORY.md. Prevents memory bloat. |
| allowed-tools | ["Read","Edit","Write","Bash","Grep"] |
Usage: /end-session
Purpose: Extract lean, reusable learnings from the current conversation and append to project MEMORY.md before /clear.
Philosophy: Memory is expensive (loaded every session). Only patterns with future reusability earn a slot. When in doubt, don't record.
The per-project MEMORY.md path follows Claude Code's convention:
# Find the current project's memory directory
ls ~/.claude/projects/*/memory/MEMORY.md 2>/dev/null
Claude Code stores per-project memory under ~/.claude/projects/<encoded-project-path>/memory/MEMORY.md — the encoded path is the project's absolute path with / replaced by -. Use the ls command above to find the correct one for the current project.
Read the existing MEMORY.md to understand current contents and avoid duplicates.
Before scanning for learnings, check whether scripts were modified but method.md or agenda.md were not updated in the same session. If drift is detected, perform the co-update yourself — do NOT ask the user.
# Compare modification times: scripts vs method.md/agenda.md
# Look for scripts modified MORE RECENTLY than method.md or agenda.md
stat -f "%m %N" */scripts/*.R */scripts/*.py */method.md agenda.md 2>/dev/null | sort -rn
method.md was NOT updated:method.mdmethod.md documenting: what the script does, inputs, outputs, key decisionsagenda.md was NOT updated:agenda.md[x] [YYYY-MM-DD] and add a one-line result summaryThis is not optional. The co-update rule exists because method.md and agenda.md drift causes future sessions to start with stale context. Fix it now, not later.
Review the entire conversation for these categories (in priority order):
Filter criteria (MUST pass ALL):
Write 1-5 bullet points. Each bullet:
Good examples:
- `node_sync.py` must run AFTER `link_type1_tree.py` (dependency order)
- Squarespace receipts: NOT emailed; must log in → Settings → Billing → Invoices
- Gmail MCP: read Name note FIRST for email, never use web search results
Bad examples (reject these):
- Always double-check things before proceeding ← too vague
- The agenda.md file is important ← obvious
- We discussed grant writing today ← not actionable
If nothing passes the filter criteria, say:
"Nothing worth remembering this session. Safe to /clear."
This is the CORRECT outcome for routine sessions. Do not force learnings.
Group under a topic header (reuse existing headers when possible, create new ones sparingly).
Format:
## [Topic Name]
- Bullet point here
- Another bullet point
Rules:
Output:
Memory updated (N items). Safe to /clear.
If zero items:
Nothing worth remembering this session. Safe to /clear.
MEMORY.md is loaded into system prompt every session. Lines after 200 are truncated. Guard this space fiercely.
memory/debugging.md, memory/patterns.md) — for detailed notes that don't need to be in system prompt. Link from MEMORY.md.