agterm-split-prs
Hand the pull requests this session has been juggling off to agterm sessions of their own: one sibling session per PR, each in a worktree on the PR's branch, each running a fresh agent with a brief written from this conversation. Optionally starts a flows process (ext-pr, jsf-pr, …) in each. This session lets go of those PRs afterwards.
- License 许可
- MIT
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- agterm-split-prs
- description
- Hand the pull requests this session has been juggling off to agterm sessions of their own: one sibling session per PR, each in a worktree on the PR's branch, each running a fresh agent with a brief written from this conversation. Optionally starts a flows process (ext-pr, jsf-pr, …) in each. This session lets go of those PRs afterwards.
- when_to_use
- Trigger on: agterm-split-prs, /agterm-split-prs, "split the PRs into sessions", "a session per PR", "create separate sessions for both PRs", "раздай PR по сессиям", "отбери PR в отдельные сессии", "по сессии на каждый PR", or when one conversation holds several PRs and the user wants to run a per-session flow (`flow start … --bind`) on each.
- allowed-tools
- [ "Bash", "Read", "Write" ]
- argument-hint
- optional: which PRs; optional: --flow <process>
02 资源文件 48
- 资产文件assets/BOND-template.md344 B
- 资产文件assets/CAPABILITIES-template.md907 B
- 资产文件assets/capability-authoring-template.md3.7 KB
- 资产文件assets/CREED-template.md1.3 KB
- 资产文件assets/first-breath-config-template.md3.2 KB
- 资产文件assets/first-breath-template.md8.2 KB
- 资产文件assets/INDEX-template.md634 B
- 脚本assets/init-sanctum-template.py9.3 KB
- 资产文件assets/memory-guidance-template.md4.1 KB
- 资产文件assets/MEMORY-template.md523 B
- 资产文件assets/PERSONA-template.md714 B
- 资产文件assets/PULSE-template.md1.9 KB
- 资产文件assets/SKILL-template-bootloader.md2.0 KB
- 资产文件assets/SKILL-template.md2.2 KB
- 参考文档references/agent-type-guidance.md4.3 KB
- 参考文档references/build-process.md18.1 KB
- 参考文档references/edit-guidance.md5.8 KB
- 参考文档references/first-breath-adaptation-guidance.md6.5 KB
- 参考文档references/mission-writing-guidance.md3.8 KB
- 参考文档references/quality-analysis.md7.0 KB
- 参考文档references/quality-dimensions.md4.4 KB
- 参考文档references/quality-scan-agent-cohesion.md8.8 KB
- 参考文档references/quality-scan-enhancement-opportunities.md15.4 KB
- 参考文档references/quality-scan-execution-efficiency.md8.9 KB
- 参考文档references/quality-scan-prompt-craft.md19.4 KB
- 参考文档references/quality-scan-sanctum-architecture.md9.1 KB
- 参考文档references/quality-scan-script-opportunities.md11.4 KB
- 参考文档references/quality-scan-structure.md12.9 KB
- 参考文档references/report-quality-scan-creator.md12.3 KB
- 参考文档references/sample-capability-authoring.md3.7 KB
- 参考文档references/sample-capability-prompt.md4.0 KB
- 参考文档references/sample-first-breath.md9.0 KB
- 脚本references/sample-init-sanctum.py9.2 KB
- 参考文档references/sample-memory-guidance.md4.2 KB
- 参考文档references/script-opportunities-reference.md13.0 KB
- 参考文档references/script-standards.md4.4 KB
- 参考文档references/skill-best-practices.md9.8 KB
- 参考文档references/standard-fields.md6.4 KB
- 参考文档references/standing-order-guidance.md5.5 KB
- 参考文档references/template-substitution-rules.md3.7 KB
- 脚本scripts/generate-html-report.py25.5 KB
- 脚本scripts/prepass-execution-deps.py11.4 KB
- 脚本scripts/prepass-prompt-metrics.py15.0 KB
- 脚本scripts/prepass-sanctum-architecture.py12.7 KB
- 脚本scripts/prepass-structure-capabilities.py16.6 KB
- 脚本scripts/process-template.py5.7 KB
- 脚本scripts/scan-path-standards.py11.7 KB
- 脚本scripts/scan-scripts.py26.3 KB
03 SKILL.md 正文
agterm-split-prs
Works only inside agterm (AGTERM_ENABLED=1). Every agtermctl call below takes
--socket "$AGTERM_SOCKET" after the subcommand, as its own argument.
1. The PRs
List every PR this conversation worked on: repo, number, URL, head branch, state
(gh pr view <url> --json number,url,headRefName,state,isDraft). Merged or closed ones stay out.
The user named some: only those. Unclear which: ask, listing them. Show the list in one line each
before going on.
2. A checkout per PR
Never switch the main checkout: it may be dirty or on someone else's branch.
-
A worktree already on that branch (
git worktree list): reuse it. -
Otherwise add one where the repo keeps them:
.worktrees/<slug>ifgit check-ignore -q .worktrees/xsays it is ignored, else a sibling../<repo>-wt-<slug>. Then check the PR out there, which also sets the upstream and handles PRs from forks:git -C <main> worktree add --detach <path> && cd <path> && gh pr checkout <n>
3. A brief per PR
Write <scratchpad>/briefs/<repo>-<n>.md, in English, self-contained: the new agent has none of
this conversation. It holds:
- the PR (URL, branch → base) and that the directory is a worktree of it;
- what the PR does, in a few lines, and its state (draft, CI, reviews);
- what this conversation decided about it, and what is still open for the user;
- shared background the PRs have in common (one paragraph, the same in every brief);
- the rules that applied here: what needs the user's explicit go (marking ready, reviewers, Slack, merge, anything irreversible), commit conventions, the language to talk to the user in;
- the first move: read the PR (
gh pr view <n> --comments,gh pr diff <n>), give the user a short status, wait for instructions.
No single quotes in the brief's path: it is read inside a zsh -lc '…'.
4. The sessions
Launch the agent the way this one was launched: read this pane's foreground from
agtermctl tree --json for the session $AGTERM_SESSION_ID and keep its flags
(--dangerously-skip-permissions, --model …), dropping any prompt or --resume.
prev="$AGTERM_SESSION_ID"
id=$(agtermctl session new --socket "$AGTERM_SOCKET" --after "$prev" --no-select \
--cwd <worktree> --name "<repo>#<n>" \
--command "zsh -lc 'claude <flags> \"\$(cat <brief>)\"'")
agtermctl session context "<repo>#<n> <what it is>" --target "$id" --socket "$AGTERM_SOCKET"
prev="$id" # the next one goes after this one, keeping the PRs in order
--afteralready names the workspace: never pass--workspacewith it.session contexttakes the text first, then the options.
5. Check they came up
About 20 seconds later, for each id: tree --json shows claude in its foreground, and
agtermctl session text --target <id> --lines 15 shows it working. A new folder makes Claude ask
"Do you trust this folder?": do not answer it for the user, tell them which session waits on it.
6. A flow in each (only if asked)
--flow <process> given, or the user asked to run a flow per PR: once a session's agent is at
its prompt, flow start <process> --bind dev=<id> for it. flowd types the step into that
session; its agent reports there, not here.
7. Let go
Report a table: session name, worktree, state (working / waits on trust / flow run id). From now on these PRs belong to their sessions: do not commit, push or comment on them from here. A question about one: point the user to its session.
04 同仓库更多 Skills
yt-dub
Give a YouTube video Yandex's Russian voice-over (the Yandex Browser / voice-over-translation one) at any length — including past Yandex's 4-hour limit — and mux it into the best video YouTube serves, with the original sound kept as a second track; optionally drop the result into Plex on SugarDaddy. Also when only the translated audio is wanted.
codex-proxy
Run an OpenAI-compatible Chat Completions endpoint on localhost that spends the user's ChatGPT/Codex subscription instead of an API key — for apps that take a Base URL, API key and model id (dictation post-processing, editors, scripts). Install it as an always-on LaunchAgent, check its status, print the key, try a request, or debug a failing app.
revdiff-ru
Review a diff in revdiff with everything except the code translated into Russian, line numbering preserved 1:1 so annotations map back to the real files. One command does the translation; then /revdiff:revdiff opens the result.
peer-chat
A prompt starting with "Chat from Codex:" is a peer message: answer it only through peer-chat.py, never in your own output. Also use when the user says "chat with codex", "talk to codex", "work with codex", "do this with codex", "build this with codex", "discuss this with codex" (the agent in the other pane of this agterm split). Not for a one-shot task handed off, and not for a read-only second opinion.
memory-review
Use when an agent memory directory has grown large enough that nobody remembers what is in it, when memories look stale or contradictory, when the same fact seems to live in both memory and a CLAUDE.md, or when the user asks to review, prune, audit or clean up their memories. Also use before retiring a project whose memories should move somewhere else.
decomment
Strip the noise comments an AI agent left behind on a branch — the ones that restate the code line by line or narrate the change as a story ("was X, now Y", "added a guard here"). Git holds the history and the code holds the present; only genuinely non-obvious comments survive.