{"id":"5a3eee2a-4ea0-473b-a7ff-c30bdfc8a548","shortId":"CFdJuq","kind":"skill","title":"pty","tagline":"PTY sessions for long-running processes, interactive input, signal sending (Ctrl+C), and live output tailing — use instead of bash when the process can't be run to completion synchronously","description":"## When to Use PTY\n\nUse `pty_spawn` instead of `bash` when:\n- The process runs in the background or long-running (dev servers, watchers, etc.)\n- The command requires interactive input\n- You need to send signals (Ctrl+C, Ctrl+D) mid-run\n- You want to tail output while the process is still running\n\n## Key Sequences\n\n| Action | Data |\n|--------|------|\n| Ctrl+C (interrupt) | `\\x03` |\n| Ctrl+D (EOF) | `\\x04` |\n| Ctrl+Z (suspend) | `\\x1a` |\n| Enter | `\\n` |\n\nSend with `pty_write`: `data=\"\\x03\"`\n\n## Reading Output\n\nUse the `pattern` parameter in `pty_read` to filter lines by regex:\n\n```\npattern=\"error|ERROR\"       # find errors\npattern=\"ERROR|WARN|FATAL\"  # find warnings and errors\npattern=\"failed.*connection\" # more specific match\n```\n\n`pattern` filters first, then `offset`/`limit` apply to the matches — original line numbers are preserved.\n\n## Checking Status\n\n- `pty_list` — see all running/exited sessions\n- `pty_read` with high `offset` or omit offset to see latest output\n- To tail last N lines: `offset = totalLines - N`\n\n## Cleanup\n\n- `pty_kill` with `cleanup=false` (default) — stops process, keeps buffer for reading\n- `pty_kill` with `cleanup=true` — stops process and frees buffer entirely\n\n## notifyOnExit\n\nSet `notifyOnExit=true` to receive a message when the process exits, including exit code and last output line. Useful for build processes where you want to be notified on completion rather than polling.","tags":["pty","dotfiles","athal7","agent-skills"],"capabilities":["skill","source-athal7","skill-pty","topic-agent-skills"],"categories":["dotfiles"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/athal7/dotfiles/pty","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add athal7/dotfiles","source_repo":"https://github.com/athal7/dotfiles","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 6 github stars · SKILL.md body (1,428 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:35.579Z","embedding":null,"createdAt":"2026-05-18T13:22:30.789Z","updatedAt":"2026-05-18T19:14:35.579Z","lastSeenAt":"2026-05-18T19:14:35.579Z","tsv":"'action':88 'appli':149 'background':49 'bash':22,42 'buffer':196,208 'build':231 'c':14,69,91 'check':158 'cleanup':186,190,202 'code':224 'command':59 'complet':31,240 'connect':139 'ctrl':13,68,70,90,94,98 'd':71,95 'data':89,108 'default':192 'dev':54 'enter':102 'entir':209 'eof':96 'error':125,126,128,130,136 'etc':57 'exit':221,223 'fail':138 'fals':191 'fatal':132 'filter':120,144 'find':127,133 'first':145 'free':207 'high':169 'includ':222 'input':10,62 'instead':20,40 'interact':9,61 'interrupt':92 'keep':195 'key':86 'kill':188,200 'last':180,226 'latest':176 'limit':148 'line':121,154,182,228 'list':161 'live':16 'long':6,52 'long-run':5,51 'match':142,152 'messag':217 'mid':73 'mid-run':72 'n':103,181,185 'need':64 'notifi':238 'notifyonexit':210,212 'number':155 'offset':147,170,173,183 'omit':172 'origin':153 'output':17,79,111,177,227 'paramet':115 'pattern':114,124,129,137,143 'poll':243 'preserv':157 'process':8,25,45,82,194,205,220,232 'pti':1,2,36,38,106,117,160,166,187,199 'rather':241 'read':110,118,167,198 'receiv':215 'regex':123 'requir':60 'run':7,29,46,53,74,85 'running/exited':164 'see':162,175 'send':12,66,104 'sequenc':87 'server':55 'session':3,165 'set':211 'signal':11,67 'skill' 'skill-pty' 'source-athal7' 'spawn':39 'specif':141 'status':159 'still':84 'stop':193,204 'suspend':100 'synchron':32 'tail':18,78,179 'topic-agent-skills' 'totallin':184 'true':203,213 'use':19,35,37,112,229 'want':76,235 'warn':131,134 'watcher':56 'write':107 'x03':93,109 'x04':97 'x1a':101 'z':99","prices":[{"id":"33c321a0-b4e2-493b-9ec0-c8efb3fea668","listingId":"5a3eee2a-4ea0-473b-a7ff-c30bdfc8a548","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"athal7","category":"dotfiles","install_from":"skills.sh"},"createdAt":"2026-05-18T13:22:30.789Z"}],"sources":[{"listingId":"5a3eee2a-4ea0-473b-a7ff-c30bdfc8a548","source":"github","sourceId":"athal7/dotfiles/pty","sourceUrl":"https://github.com/athal7/dotfiles/tree/main/skills/pty","isPrimary":false,"firstSeenAt":"2026-05-18T13:22:30.789Z","lastSeenAt":"2026-05-18T19:14:35.579Z"}],"details":{"listingId":"5a3eee2a-4ea0-473b-a7ff-c30bdfc8a548","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"athal7","slug":"pty","github":{"repo":"athal7/dotfiles","stars":6,"topics":["agent-skills"],"license":null,"html_url":"https://github.com/athal7/dotfiles","pushed_at":"2026-05-18T18:53:57Z","description":null,"skill_md_sha":"44a99a92c7ab2c2c63b68f8d7aa400a69b1fff3d","skill_md_path":"skills/pty/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/athal7/dotfiles/tree/main/skills/pty"},"layout":"multi","source":"github","category":"dotfiles","frontmatter":{"name":"pty","license":"MIT","description":"PTY sessions for long-running processes, interactive input, signal sending (Ctrl+C), and live output tailing — use instead of bash when the process can't be run to completion synchronously","compatibility":"opencode"},"skills_sh_url":"https://skills.sh/athal7/dotfiles/pty"},"updatedAt":"2026-05-18T19:14:35.579Z"}}