diff --git a/skills/t3code-cli/SKILL.md b/skills/t3code-cli/SKILL.md index d7df7b5..2acf1a1 100644 --- a/skills/t3code-cli/SKILL.md +++ b/skills/t3code-cli/SKILL.md @@ -122,14 +122,21 @@ t3cli thread archive --thread --format json t3cli thread unarchive --thread --format json ``` -**Terminal (agent-friendly PTY control)** +**Terminal lifecycle** + +- Create a t3code terminal only when the user needs the process visible in t3code. +- Keep commands entered into a user-visible terminal short and readable. Prefer existing project scripts or CLI subcommands. +- List terminals before creating one, then track every terminal id you create. Do not repurpose an existing terminal unless the user explicitly asks. +- Keep a terminal only while the user needs it. Destroy terminals you created when their process stops, they are superseded, or the user no longer needs them. +- Before finishing the task, destroy every unused terminal you created. Never implicitly destroy a terminal you did not create, even when it appears unused. + +**Terminal commands** ```sh export T3CODE_THREAD_ID="$THREAD_ID" t3cli terminal list --format json t3cli terminal create --attach --format json -t3cli terminal create "npm test" --format json t3cli terminal read --history --follow --format ndjson --from-sequence 0 t3cli terminal stream --from-sequence 0 t3cli terminal write --hex 0a --format json