用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/diegosouzapw/awesome-omni-skill --skill session-memory命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Token-efficient tracking for AI orchestration. CLI-first for status updates (~50 tokens), agent fallback for complex ops (~1KB). Use when: updating task status, querying blockers, creating progress files, validating phases.
AshAi extension guidelines for integrating AI capabilities with Ash Framework. Use when implementing vectorization/embeddings, exposing Ash actions as LLM tools, creating prompt-backed actions, or setting up MCP servers. Covers semantic search, LangChain integration, and structured outputs.
This skill should be used when solving hard questions, complex architectural problems, or debugging issues that benefit from GPT-5 Pro or GPT-5.1 thinking models with large file context. Use when standard Claude analysis needs deeper reasoning or extended context windows.
基于 SOC 职业分类
正在显示 SKILL.md
| name | session-memory |
| description | Internal skill. Use cc10x-router for all development tasks. |
| allowed-tools | Read, Write, Edit, Bash |
EVERY WORKFLOW MUST:
1. LOAD memory at START (and before key decisions)
2. UPDATE memory at END (and after learnings/decisions)
Brevity Rule: Memory is an index, not a document. Be brief—one line per item.
CC10x memory is a small, stable, permission-free Markdown database used for:
.claude/cc10x/activeContext.md
.claude/cc10x/patterns.md
.claude/cc10x/progress.md
docs/plans/*, docs/research/*
progress.md for backup/resume.Information “graduates” to more durable layers:
activeContext.md (Learnings / Recent Changes)patterns.md (Pattern / Gotcha)docs/research/* or docs/plans/* + link from activeContext.mdprogress.md (Verification Evidence)If memory is not loaded: You work blind, repeat mistakes, lose context. If decisions made without checking memory: You contradict prior choices, waste effort.
If memory is not updated: Next session loses everything learned. If learnings not recorded: Same mistakes will be repeated.
BOTH SIDES ARE NON-NEGOTIABLE.
ALL memory operations are PERMISSION-FREE using the correct tools.
| Operation | Tool | Permission |
|---|---|---|
| Create memory directory | Bash(command="mkdir -p .claude/cc10x") | FREE |
| Read memory files | Read(file_path=".claude/cc10x/activeContext.md") | FREE |
| Create NEW memory file | Write(file_path="...", content="...") | FREE (file doesn't exist) |
| Update EXISTING memory | Edit(file_path="...", old_string="...", new_string="...") | FREE |
| Save plan/design files | Write(file_path="docs/plans/...", content="...") | FREE |
| Tool | Use For | Asks Permission? |
|---|---|---|
| Write | Creating NEW files | NO (if file doesn't exist) |
| Write | Overwriting existing files | YES - asks "Do you want to overwrite?" |
| Edit | Updating existing files | NO - always permission-free |
RULE: Use Write for NEW files, Edit for UPDATES.
NEVER use Bash compound commands (mkdir && cat) - they ASK PERMISSION.
ALWAYS use Read tool for reading files - it's PERMISSION-FREE.
# WRONG (asks permission - compound Bash command)
mkdir -p .claude/cc10x && cat .claude/cc10x/activeContext.md
# RIGHT (permission-free - separate tools)
Bash(command="mkdir -p .claude/cc10x")
Read(file_path=".claude/cc10x/activeContext.md")
NEVER use heredoc writes (cat > file << 'EOF') - they ASK PERMISSION.
Use Write for NEW files, Edit for EXISTING files.
# WRONG (asks permission - heredoc)
cat > .claude/cc10x/activeContext.md << 'EOF'
content here
EOF
# RIGHT for NEW files (permission-free)
Write(file_path=".claude/cc10x/activeContext.md", content="content here")
# RIGHT for EXISTING files (permission-free)
Edit(file_path=".claude/cc10x/activeContext.md",
old_string="# Active Context",
new_string="# Active Context\n\n[new content]")
"My memory resets between sessions. The Memory Bank is my ONLY link to previous work."
Without memory persistence:
Memory is the difference between an expert who learns and a novice who forgets.
.claude/
└── cc10x/
├── activeContext.md # Current focus + learnings + decisions (MOST IMPORTANT)
├── patterns.md # Project patterns, conventions, gotchas
└── progress.md # What works, what's left, verification evidence
Edit(...) + Read(...) verify pattern.### Memory Notes (For Workflow-Final Persistence) section. The task-enforced "CC10X Memory Update" task ensures these are persisted.BUILD runs code-reviewer ∥ silent-failure-hunter in parallel. To avoid conflicting edits:
Update memory IMMEDIATELY when you notice:
Checkpoint Pattern:
Edit(file_path=".claude/cc10x/activeContext.md",
old_string="## Current Focus",
new_string="## Current Focus\n\n[Updated focus + key decisions]")
Read(file_path=".claude/cc10x/activeContext.md") # Verify
Rule: When in doubt, update memory NOW. Better duplicate entries than lost context.
Use these purposes to decide where information belongs:
## User Standards entries are non-negotiable — always follow them regardless of other context.CC10x memory files are not "notes" - they are contracts used as Edit anchors.
Hard rules:
# Active Context, # Project Patterns, # Progress Tracking).## Current Focus, ## Last Updated).## Recent Changes (activeContext) and ## Tasks (progress) are replaced (not appended) at workflow end by the Memory Update task. Mid-workflow agents still append normally.## References, ## Decisions, ## Learnings), add it by inserting it just above ## Last Updated.Edit(...), Read back the file and confirm the intended change exists.If an Edit does not apply cleanly:
old_string anchor.Current state of work - ALWAYS check this first:
# Active Context
<!-- CC10X: Do not rename headings. Used as Edit anchors. -->
## Current Focus
[Active work]
## Recent Changes <!-- SNAPSHOT: replaced at workflow end -->
- [Change] - [file:line]
- [DEBUG-N]: {what was tried} → {result} <!-- Use for debug workflow -->
## Next Steps
1. [Step]
## Decisions
- [Decision]: [Choice] - [Why]
## Learnings
- [Insight]
## References
- Plan: `docs/plans/...` (or N/A)
- Design: `docs/plans/...` (or N/A)
- Research: `docs/research/...` → [insight]
## Blockers
- [None]
## Last Updated
[timestamp]
Merged sections:
## Active Decisions + ## Learnings This Session → ## Decisions + ## Learnings## Plan Reference + ## Design Reference + ## Research References → ## References## User Preferences Discovered (goes in Learnings)Project-specific knowledge that persists:
# Project Patterns
<!-- CC10X MEMORY CONTRACT: Do not rename headings. Used as Edit anchors. -->
## User Standards
- [Your non-negotiable coding principles — agents MUST follow these on every workflow]
## Architecture Patterns
- [Pattern]: [How this project implements it]
## Code Conventions
- [Convention]: [Example]
## File Structure
- [File type]: [Where it goes, naming convention]
## Testing Patterns
- [Test type]: [How to write, where to put]
## Common Gotchas
- [Gotcha]: [How to avoid / solution]
- [Gotcha from research]: [Solution] (Source: docs/research/YYYY-MM-DD-topic.md)
## API Patterns
- [Endpoint pattern]: [Convention used]
## Error Handling
- [Error type]: [How project handles it]
## Dependencies
- [Dependency]: [Why used, how configured]
## Project SKILL_HINTS
- [cc10x:skill-name] <!-- auto-populated: detected [tech signal] -->
What's done, what's not:
# Progress Tracking
<!-- CC10X: Do not rename headings. Used as Edit anchors. -->
## Current Workflow
[PLAN | BUILD | REVIEW | DEBUG]
## Tasks <!-- SNAPSHOT: replaced at workflow end -->
- [ ] Task 1
- [x] Task 2 - evidence
## Completed
- [x] Item - evidence
## Verification
- `command` → exit 0 (X/X)
## Last Updated
[timestamp]
Merged sections:
## Active Workflow Tasks + ## In Progress + ## Remaining → ## Tasks## Verification Evidence table → ## Verification bullets## Known Issues, ## Evolution of Decisions, ## Implementation Results (rarely used, clutters template)| Anchor | File | Stability |
|---|---|---|
## Recent Changes | activeContext | GUARANTEED |
## Learnings | activeContext | GUARANTEED |
## References | activeContext | GUARANTEED |
## Last Updated | all files | GUARANTEED (fallback) |
## Common Gotchas | patterns | GUARANTEED |
## Project SKILL_HINTS | patterns | GUARANTEED |
## Completed | progress | GUARANTEED |
## Verification | progress | GUARANTEED |
NEVER use as anchors:
| Col | Col |)- [ ] specific text)Every memory edit MUST follow this exact sequence:
Read(file_path=".claude/cc10x/activeContext.md")
# Check if intended anchor exists in the content you just read
# If "## References" not found → use "## Last Updated" as fallback
Edit(file_path=".claude/cc10x/activeContext.md",
old_string="## Recent Changes",
new_string="## Recent Changes\n- [New entry]\n")
Read(file_path=".claude/cc10x/activeContext.md")
# Confirm your change appears. If not → STOP and retry.
Why this works:
| Trigger | Action | Why |
|---|---|---|
| Session start | Load ALL 3 files | Fresh context needed |
| Workflow start | Load ALL 3 files | Before BUILD/REVIEW/DEBUG/PLAN |
| Continuation session | Load ALL 3 files | Resume from where we left |
| User says "continue" | Load activeContext.md | Get current state |
| Before This Action | Read This File | Why |
|---|---|---|
| Making architectural decision | patterns.md | Check existing patterns |
| Choosing implementation approach | patterns.md + activeContext.md | Align with conventions + prior decisions |
| Starting to build something | progress.md | Check if already done |
| Debugging an error | activeContext.md + patterns.md | May have seen before + known gotchas |
| Planning next steps | progress.md | Know what's remaining |
| Reviewing code | patterns.md | Apply project conventions |
| Making any decision | activeContext.md (Decisions) | Check prior decisions |
| Situation | Action | Why |
|---|---|---|
| User references "what we did" | Load activeContext.md | Get history |
| You're about to repeat work | Load progress.md | Check if done |
| You're unsure of convention | Load patterns.md | Project standards |
| Error seems familiar | Load patterns.md (Common Gotchas) | Known issues |
| Decision feels arbitrary | Load activeContext.md | Prior reasoning |
What do I need? → Which file?
─────────────────────────────────────────
Current state / focus → activeContext.md
Prior decisions + reasoning → activeContext.md (Decisions)
What we learned → activeContext.md (Learnings)
Project conventions → patterns.md
How to structure code → patterns.md
Common gotchas to avoid → patterns.md
What's done / remaining → progress.md
Verification evidence → progress.md
Prior research on topic → activeContext.md (References) → docs/research/
Before ANY decision, ask:
If memory has relevant info:
If memory is empty/irrelevant:
Use separate tool calls (PERMISSION-FREE):
# Step 1: Create directory (single Bash command - permission-free)
Bash(command="mkdir -p .claude/cc10x")
# Step 2: Load ALL 3 memory files using Read tool (permission-free)
Read(file_path=".claude/cc10x/activeContext.md")
Read(file_path=".claude/cc10x/patterns.md")
Read(file_path=".claude/cc10x/progress.md")
# Step 3: Git Context - Understand project state (RECOMMENDED)
Bash(command="git status") # Current working state
Bash(command="git ls-files | head -50") # Project file structure
Bash(command="git log --oneline -10") # Recent commits
NEVER use this (asks permission):
# WRONG - compound command asks permission
mkdir -p .claude/cc10x && cat .claude/cc10x/activeContext.md
If file doesn't exist: Read tool returns an error - that's fine, means starting fresh.
MUST update before completing ANY workflow. Use Edit tool (NO permission prompt).
# First, read existing content
Read(file_path=".claude/cc10x/activeContext.md")
# Prefer small, targeted edits. Avoid rewriting whole files.
# Example A: Add a bullet to Recent Changes (prepend)
Edit(file_path=".claude/cc10x/activeContext.md",
old_string="## Recent Changes",
new_string="## Recent Changes\n- [YYYY-MM-DD] [What changed] - [file:line]\n")
# Example B: Add a decision (stable anchor)
Edit(file_path=".claude/cc10x/activeContext.md",
old_string="## Decisions",
new_string="## Decisions\n- [Decision]: [Choice] - [Why]")
# Example C: Add verification evidence to progress.md (stable anchor)
Read(file_path=".claude/cc10x/progress.md")
Edit(file_path=".claude/cc10x/progress.md",
old_string="## Verification",
new_string="## Verification\n- `[cmd]` → exit 0 (X/X)")
# VERIFY (do not skip)
Read(file_path=".claude/cc10x/activeContext.md")
Read(file_path=".claude/cc10x/progress.md")
WHY Edit not Write? Write asks "Do you want to overwrite?" for existing files. Edit is always permission-free.
Read existing patterns.md, then append using Edit:
# Read existing content
Read(file_path=".claude/cc10x/patterns.md")
# Append under an existing section header (preferred: stable anchor)
Edit(file_path=".claude/cc10x/patterns.md",
old_string="## Common Gotchas",
new_string="## Common Gotchas\n- [Gotcha]: [Solution / how to avoid]\n")
# Read progress.md, then record completion with evidence
Read(file_path=".claude/cc10x/progress.md")
# Option A (preferred): append a completed line under "## Completed"
Edit(file_path=".claude/cc10x/progress.md",
old_string="## Completed",
new_string="## Completed\n- [x] [What was completed] - [evidence: command → exit 0]\n")
# Option B: flip an existing checkbox if one exists (more brittle)
Edit(file_path=".claude/cc10x/progress.md",
old_string="- [ ] [Task being completed]",
new_string="- [x] [Task being completed] - [verification evidence]")
ALL agents MUST:
If an agent cannot safely update memory (e.g., no Edit tool available):
.claude/cc10x/*.md using Edit(...) + Read-back verification.Failure to update memory = incomplete work.
After Memory First read, check patterns.md ## Project SKILL_HINTS:
Skill(skill="[each listed entry]") — skip gracefully if not installed.Edit(old_string="## Project SKILL_HINTS", new_string="## Project SKILL_HINTS\n- cc10x:[skill] <!-- [tech signal] -->\n")If you catch yourself:
STOP. Load/update memory FIRST.
| Excuse | Reality |
|---|---|
| "I know what we decided" | Check the Decisions section. |
| "Small task, no need" | Small tasks have context too. Always update. |
| "I'll remember" | You won't. Conversation compacts. Write it down. |
| "Memory is optional" | Memory is MANDATORY. No exceptions. |
Cannot check all boxes? Memory cycle incomplete.