一键导入
glean-extract
Manually trigger glean extraction on pending sessions, or on a specific session by ID. Reports processed, extracted, skipped, and errors
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Manually trigger glean extraction on pending sessions, or on a specific session by ID. Reports processed, extracted, skipped, and errors
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | glean-extract |
| description | Manually trigger glean extraction on pending sessions, or on a specific session by ID. Reports processed, extracted, skipped, and errors |
| argument-hint | [session-id] |
| allowed-tools | Bash |
| user-invocable | true |
Manually trigger the glean worker. Feels like make deploy - show progress, end with a summary.
Decide which mode to run based on $ARGUMENTS:
If $ARGUMENTS is non-empty, treat it as a session id and run:
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/scripts" python3 -m glean.worker --session "$1"
If $ARGUMENTS is empty, drain the pending queue:
PYTHONPATH="${CLAUDE_PLUGIN_ROOT}/scripts" python3 -m glean.worker --drain
Stream stdout/stderr to the user as the worker runs. The worker emits structured progress lines for each session it touches.
After the worker exits, parse its final output (JSON summary on stdout) and render a summary block:
glean extract summary
---------------------
Sessions processed: N
Fragments extracted: N
Sessions skipped: N
- {session_short}: {reason} (e.g. too short, dedup hit, already delivered)
Errors: N
- {session_short}: {error}
If the worker returned non-zero, surface its exit code and the last lines of stderr. Do not retry automatically - let the user decide.
If no pending sessions existed in drain mode, say so plainly:
Nothing to do. Queue is empty.
worker.lock). If locked, the worker will say so - relay that to the user.--drain and --session defined in CONTRACTS.md.Review delivered glean fragments interactively - star, archive, or trash each one, capture a short note on why, feeds signals into feedback.jsonl
Show glean pipeline health - pending queue, delivered fragments, outbox, recent activity, last extraction timestamp, and config summary