- New common/misc/tmux-launch-agent skill with detect-agent script and agents-seed.md (moved from engineering/setup-skills) - implement-issue simplified: delegates agent dispatch to tmux-launch-agent instead of inlining it - setup-skills stripped of Section E (agent CLI config) - New in-progress/agent-handoff skill using tmux-launch-agent - PKM skills simplified: conversation-summary and pkm-curation rewritten with leaner process, crit streamlined - knowledge-gardener removed (moved to common/in-progress/) - All READMEs updated to match
3.2 KiB
name, description, disable-model-invocation
| name | description | disable-model-invocation |
|---|---|---|
| tmux-launch-agent | Fork a new agent CLI session into a new tmux window, detected from the current agent. | true |
Agent CLI Seed Data
The agent config (binary, args convention per agent) and field meanings are in agents-seed.md. Step 2 reads it to find the calling agent's entry.
Process
-
Detect the calling agent — Run
./detect-agent(sibling to this skill). If it exits 1 (agent unknown), report the failure and stop — the agent name is required.Completion criterion: The agent name is known and non-empty.
-
Look up the agent config — Find the agent's entry in
agents-seed.mdbyname. Extract itsbinaryandargsfields.Completion criterion: The agent's entry is found and its
binaryandargsare known. -
Parse flags — Scan the user's arguments for optional flags (which must come before the prompt text):
--name <title>or-n <title>— the tmux window title. Extract the title and remove the flag and its value from the arguments list.-c <path>— the working directory for the new window. Extract the path and remove the flag and its value from the arguments list.
The remaining text after stripping both flags is the prompt for the child agent.
If
--name/-nis absent, tmux auto-names the window. If-cis absent, the new window inherits the current pane's working directory.Completion criterion: The arguments are split into an optional window name, an optional directory path, and the remaining prompt text.
-
Build the inner command — Combine the agent config with the remaining user-supplied prompt arguments. The
argstemplate determines how the prompt is delivered:- Prompt-file agents (
argscontains{prompt}) — Write the prompt text to a temporary file under/tmp/and substitute the file path for{prompt}in the args template. For example, an agent withargs: "@{prompt}"becomes<binary> @/tmp/tmux-launch-XXXX.md. - Stdin-pipe agents (
argsis empty) — Pipe the prompt text viaechointo the binary. - No prompt — If the user passed no arguments (after removing flags), launch the binary bare (interactive start) with no prompt file or pipe.
Completion criterion: The inner command is correctly built per the target agent's
argsconvention (prompt-file, stdin-pipe, or bare). - Prompt-file agents (
-
Wrap with the environment runner — Detect whether
miseis available viacommand -v mise:- mise available — Wrap the inner command as
mise x --allow-env='*' -- <inner-command>. - mise absent — Wrap the inner command as
$SHELL -c '<inner-command>'.
Completion criterion: A valid shell command string is ready.
- mise available — Wrap the inner command as
-
Fork into a new tmux window — Build and run:
tmux new-window <name-flag> <dir-flag> "<shell-command>"<shell-command>— the wrapped command from step 5.<name-flag>—-n "<title>"if a window name was parsed in step 3, omitted otherwise.<dir-flag>—-c <path>if a directory was parsed in step 3, omitted otherwise.
Completion criterion:
tmux new-windowexits 0 and a new tmux window appears with the agent CLI session active.