npx skills add https://github.com/0xbigboss/claude-code --skill codex会话 ID:${CLAUDE_SESSION_ID} 输出:~/.claude/codex/${CLAUDE_SESSION_ID}/
任务:$ARGUMENTS
可选标志(仅在用户明确请求时使用):
--model <model>:gpt-5.2-codex(默认),gpt-5.2,gpt-5-mini,o3--sandbox <mode>:read-only,workspace-write,danger-full-accessSession ID: ${CLAUDE_SESSION_ID} Output: ~/.claude/codex/${CLAUDE_SESSION_ID}/
Task: $ARGUMENTS
Optional flags (only if user explicitly requests):
--model <model>: gpt-5.2-codex (default), gpt-5.2, gpt-5-mini, o3--sandbox <mode>: read-only, workspace-write, 广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
省略标志以使用用户的配置默认值。
最小:特定文件/函数 → 仅 git 状态 中等:功能/多文件 → 添加近期更改 完整:调查/不明确 → 添加会话摘要
始终执行:
pwd && git rev-parse --show-toplevel 2>/dev/null || echo "Not a git repo"
git branch --show-current 2>/dev/null && git status --short 2>/dev/null | head -20
中等/完整:
git diff --stat 2>/dev/null | tail -20
git log --oneline -5 --since="4 hours ago" 2>/dev/null
仅完整: 会话摘要(已完成的工作、决策、阻碍)
使用 CTCO 格式(上下文 → 任务 → 约束 → 输出):
<context>
工作目录:{cwd}
仓库:{repo_name}
分支:{branch}
{git_status}
{recent_changes if medium/full}
{session_summary if full}
</context>
<task>
{来自参数的任务}
</task>
<constraints>
- 严格实现所请求的内容
- 修改前先读取文件
- 运行测试/linter 进行验证
- 如果存在歧义,请说明解释
</constraints>
<output>
摘要(≤5 个要点):
- **更改内容**:文件和变更
- **位置**:文件:行号 引用
- **验证**:运行的测试/linter
- **风险**:需要注意的边缘情况
- **后续步骤**:跟进事项或“无”
</output>
设置:
mkdir -p ~/.claude/codex/${CLAUDE_SESSION_ID}
git rev-parse --show-toplevel 2>/dev/null && IN_GIT=true || IN_GIT=false
运行:
codex exec --json \
-o ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-{timestamp}.txt \
{--skip-git-repo-check if not in git} \
{--full-auto OR --sandbox <mode>} \
{-m <model> if requested} \
- <<'CODEX_PROMPT'
{prompt}
CODEX_PROMPT > ~/.claude/codex/${CLAUDE_SESSION_ID}/progress-{timestamp}.jsonl
标志:
--skip-git-repo-check--full-auto(workspace-write + 自动批准)--sandbox <mode> 或 -m <model>后台任务(预计 >30 秒):
run_in_background: true → 返回 task_id前台任务(<30 秒):
令牌高效方法:
TaskOutput(task_id, block=true) 等待完成cat ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-*.txt摘要文件仅包含 Codex 的最终消息(令牌高效)。
进度检查(如需在完成前查看):
TaskOutput(task_id, block=false) - 检查是否仍在运行tail -n 3 ~/.claude/codex/${CLAUDE_SESSION_ID}/progress-*.jsonl - 仅最后 3 个事件请勿读取整个进度文件或使用 tail -f。
读取摘要:
cat ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-*.txt
报告格式(≤5 个要点):
**状态:** {success/error/partial}
**更改:** {文件和变更}
**验证:** {测试/linter}
**风险:** {如果有的话}
**后续:** {跟进事项或“无”}
# 简单修复
/codex fix the null pointer in utils/parser.ts line 42
# 功能工作
/codex add rate limiting to the /api/submit endpoint
# 调查(后台)
/codex investigate why the CI build fails on arm64
# 模型覆盖
/codex --model o3 design a caching strategy
# 只读模式
/codex --sandbox read-only review the auth implementation
每周安装量
67
仓库
GitHub 星标数
36
首次出现
2026年1月26日
安全审计
安装于
codex58
gemini-cli57
opencode56
claude-code55
github-copilot52
cursor50
danger-full-accessOmit flags to use user's config defaults.
Minimal : Specific file/function → git state only Medium : Feature/multi-file → add recent changes Full : Investigation/unclear → add session summary
Always:
pwd && git rev-parse --show-toplevel 2>/dev/null || echo "Not a git repo"
git branch --show-current 2>/dev/null && git status --short 2>/dev/null | head -20
Medium/Full:
git diff --stat 2>/dev/null | tail -20
git log --oneline -5 --since="4 hours ago" 2>/dev/null
Full only: Session summary (work done, decisions, blockers)
Use CTCO format (Context → Task → Constraints → Output):
<context>
Working directory: {cwd}
Repository: {repo_name}
Branch: {branch}
{git_status}
{recent_changes if medium/full}
{session_summary if full}
</context>
<task>
{task from arguments}
</task>
<constraints>
- Implement EXACTLY what is requested
- Read files before changing
- Run tests/linters to validate
- State interpretation if ambiguous
</constraints>
<output>
Summary (≤5 bullets):
- **What changed**: Files and changes
- **Where**: file:line references
- **Validation**: Tests/linters run
- **Risks**: Edge cases to watch
- **Next steps**: Follow-up or "None"
</output>
Setup:
mkdir -p ~/.claude/codex/${CLAUDE_SESSION_ID}
git rev-parse --show-toplevel 2>/dev/null && IN_GIT=true || IN_GIT=false
Run:
codex exec --json \
-o ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-{timestamp}.txt \
{--skip-git-repo-check if not in git} \
{--full-auto OR --sandbox <mode>} \
{-m <model> if requested} \
- <<'CODEX_PROMPT'
{prompt}
CODEX_PROMPT > ~/.claude/codex/${CLAUDE_SESSION_ID}/progress-{timestamp}.jsonl
Flags:
--skip-git-repo-check--full-auto (workspace-write + auto-approval)--sandbox <mode> or -m <model>Background tasks (>30 seconds expected):
run_in_background: true → returns task_idForeground tasks (<30 seconds):
Token-efficient approach:
TaskOutput(task_id, block=true) to wait for completioncat ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-*.txtThe summary file contains only Codex's final message (token-efficient).
Progress checks (if needed before completion):
TaskOutput(task_id, block=false) - check if still runningtail -n 3 ~/.claude/codex/${CLAUDE_SESSION_ID}/progress-*.jsonl - last 3 events onlyDo NOT read entire progress files or use tail -f.
Read summary:
cat ~/.claude/codex/${CLAUDE_SESSION_ID}/summary-*.txt
Report format (≤5 bullets):
**Status:** {success/error/partial}
**Changed:** {files and changes}
**Validation:** {tests/linters}
**Risks:** {if any}
**Next:** {follow-up or "None"}
# Simple fix
/codex fix the null pointer in utils/parser.ts line 42
# Feature work
/codex add rate limiting to the /api/submit endpoint
# Investigation (background)
/codex investigate why the CI build fails on arm64
# Model override
/codex --model o3 design a caching strategy
# Read-only
/codex --sandbox read-only review the auth implementation
Weekly Installs
67
Repository
GitHub Stars
36
First Seen
Jan 26, 2026
Security Audits
Installed on
codex58
gemini-cli57
opencode56
claude-code55
github-copilot52
cursor50
AI新闻播客制作技能:实时新闻转对话式播客脚本与音频生成
1,200 周安装