一键导入
context-writes
writes the current context to the ".claude/context" directory. ONLY use this after `/compact` has been executed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
writes the current context to the ".claude/context" directory. ONLY use this after `/compact` has been executed.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
reads and loads conversation context from ".claude/context" directory
analyzes and optimizes prompts/agents using best practices
Analyzes and optimizes skills, agents, and prompts for Claude Code. Evaluates frontmatter configuration, tool alignment, instruction quality, and execution context. Use when skills produce inconsistent results, don't leverage tools effectively, or need modernization
reviews uncommitted changes and suggests improvements
Systematic debugging specialist using first-principles thinking. Use when standard debugging fails, errors persist after 2+ fix attempts, or for complex distributed system issues, performance degradation, and intermittent failures
| name | context-writes |
| description | writes the current context to the ".claude/context" directory. ONLY use this after `/compact` has been executed. |
| allowed-tools | Bash(git rev-parse:--show-toplevel), Read, Write |
| argument-hint | ["filename.md"] |
Write the current context to ".claude/context" directory at git repository root. Use this to preserve context for future sessions.
$ARGUMENTS (optional): Filename for the summary (basename only)
{git-root-basename}_context_{YYYY-MM-DDTZH:M:S}.mdgit rev-parse --show-toplevel
If command fails: report "Not a git repository" and exit
If $ARGUMENTS provided:
basename "$ARGUMENTS"If not provided:
git_basename=$(basename "$repo_root")
today=$(date +%Y-%m-%d%Z%T)
filename="${git_basename}_context_${today}.md"
target_dir="${repo_root}/.claude/context"
target_path="${target_dir}/${filename}"
If file exists at "$target_path":
mkdir -p "$target_dir"
Write the generated content to "$target_path".
If write fails: Report "Cannot write to $target_path" with error details and stop execution.
Report exactly:
Context written to "{absolute_path}"
({file_size} bytes)
/context-writes
→ Context written to "/home/user/myproject/.claude/context/myproject_context_2025-10-23.md"
/context-writes refactor_session.md
→ File exists at ".claude/context/refactor_session.md". Overwrite? (yes/no)
→ Context written to "/home/user/myproject/.claude/context/refactor_session.md"
(3124 bytes)
/context-writes ../escape.md
→ Error: Invalid filename (contains path separators)
/context-writes .hidden.md
→ Error: Invalid filename (hidden files not allowed)
/context-writes notes.txt
→ Error: Invalid filename (must end with .md)
/ or ..): Reject immediately