Creator · aden-hive
Last updated · Sep 2, 2026
Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode),
Creator · aden-hive
Last updated · Sep 2, 2026
Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode),
Creator · aden-hive
Last updated · Sep 2, 2026
Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode),
Creator · aden-hive
Last updated · Sep 2, 2026
Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode),
Sandbox only
Install targets
Codex install prompt
Install the "hive.terminal-tools-pty-sessions" agent skill from https://github.com/aden-hive/hive/tree/main/core/framework/skills/_preset_skills/terminal-tools-pty-sessions. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"aden-hive-hive-terminal-tools-pty-sessions","task":"Install hive.terminal-tools-pty-sessions","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Maintenance
fresh
15d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
11K
88/100 Quality · 76/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
11K GitHub stars
Repo activity
11K stars, 5.7K forks
Maintenance
15d since push
License
Apache-2.0
Install
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Agent should check
Copy prompt
Task: Use hive.terminal-tools-pty-sessions in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Install command: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
LLM text format
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install?format=text
Find alternatives
/api/skills/search?q=hive.terminal-tools-pty-sessions&limit=3
Agent prompt
Use hive.terminal-tools-pty-sessions for this task. Review https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install, then install with: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions
LLM text
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions?format=text
Install alias
/api/registry/install/aden-hive-hive-terminal-tools-pty-sessions
Recommend
/api/registry/recommend?task=Use%20hive.terminal-tools-pty-sessions%20in%20an%20agent%20workflow&limit=3
Agent fit
Design and creative
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Design and creative
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS11K GitHub stars
Stars/forks activity
PASS11K stars, 5.7K forks; issue activity unavailable in current metadata
Recent maintenance
PASS15d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: hive.terminal-tools-pty-sessions description: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. metadata: author: hive type: preset-skill version: "1.0" ---
# Persistent PTY sessions
PTY sessions are how you talk to interactive programs — programs that detect a terminal (`isatty()`) and behave differently when they don't see one. Use a session when:
- You need state to persist across calls (`cd`, env vars, sourced scripts) - You're driving a REPL (`python -i`, `mysql`, `psql`, `node`, `irb`) - A program demands an interactive prompt (`sudo`, `ssh`, `npm login`, `gh auth login`)
For everything else, `terminal_exec` is simpler. Sessions cost more (per-session bash process, ring buffer, idle-reaping bookkeeping) and have a hard cap (`TERMINAL_TOOLS_MAX_PTY`, default 8).
## Why PTY (and not subprocess pipes)
Subprocess pipes break on every interactive program. The moment a program calls `isatty()` and sees False, it disables prompts, color, line-editing, password masking, progress bars — sometimes refuses to start. PTY makes us look like a real terminal so these programs work the same as in your shell.
The cost: PTY output includes terminal escape codes (cursor moves, color codes). The session captures them as-is; if you need clean text, strip ANSI escapes in your processing layer.
## Bash on macOS — by deliberate policy
`terminal_pty_open` always invokes `/bin/bash`, regardless of the user's `$SHELL`. macOS users: yes, even when zsh is your interactive default. This is the **terminal-tools-foundations** policy applied to PTYs.
Reasons: - zsh has command/builtin classes (`zmodload`, `=cmd` expansion, `zpty`, `ztcp`) that bypass bash-shaped security checks - One shell behavior across platforms eliminates "works on Linux, breaks on macOS" surprises - Bash is universal: any shell you've used will accept the bash subset
The bash invocation uses `--norc --noprofile` so user dotfiles don't leak in. PS1 is set to a unique sentinel for prompt detection. PS2 is empty. PROMPT_COMMAND is empty.
## Three modes of `terminal_pty_run`
### 1. Default: send command, wait for prompt sentinel
``` terminal_pty_run(session_id, command="ls -la") → { output, prompt_after: True, ... } ```
The session writes `ls -la\n`, waits for the sentinel that its custom PS1 emits, returns the slice between submission and prompt. **One in-flight call per session** — a concurrent call returns a `"session busy"` error.
### 2. raw_send: send raw input, no waiting
``` terminal_pty_run(session_id, command="print('hi')\n", raw_send=True) → { bytes_sent: 12 } ```
For REPLs, vim keystrokes, password prompts. The session writes the bytes and returns immediately — it doesn't wait for a prompt (REPLs don't print bash's prompt; they print their own).
After a `raw_send`, you typically follow with:
### 3. read_only: drain currently-buffered output
``` terminal_pty_run(session_id, read_only=True, timeout_sec=2) → { output: "hi\n", more: False, ... } ```
Reads whatever the session has accumulated since the last drain, with a brief settle window. Use after raw_send to capture the REPL's response.
## Custom prompt detection (`expect`)
When the command launches a program with its own prompt (Python REPL's `>>> `, mysql's `mysql> `, sudo's password prompt), the bash sentinel won't appear until the program exits. Override:
``` terminal_pty_run(session_id, command="python3", expect=r">>>\s*$", timeout_sec=10) → output up to and including ">>>", then control returns ```
For sudo:
``` terminal_pty_run(session_id, command="sudo -k && sudo whoami", expect=r"[Pp]assword:") terminal_pty_run(session_id, command="<password>", raw_send=True, command="<password>\n") terminal_pty_run(session_id, read_only=True, timeout_sec=5) ```
(Treat passwords carefully — they end up in the ring buffer.)
## Always close
``` terminal_pty_close(session_id) ```
Leaked sessions count against `TERMINAL_TOOLS_MAX_PTY` (default 8). Idle reaping happens lazily on every `_open` call (sessions inactive longer than `idle_timeout_sec`, default 1800s, are dropped) — but don't rely on it. Close when you're done.
For unresponsive sessions, `force=True` skips the graceful "exit" attempt and goes straight to SIGTERM/SIGKILL.
## Common patterns
### Stateful navigation
``` sid = terminal_pty_open(cwd="/") terminal_pty_run(sid, command="cd /var/log") terminal_pty_run(sid, command="ls -la *.log | head") terminal_pty_close(sid) ```
### Python REPL
``` sid = terminal_pty_open() terminal_pty_run(sid, command="python3", expect=r">>>\s*$") terminal_pty_run(sid, command="x = 42", raw_send=True) terminal_pty_run(sid, command="print(x*x)\n", raw_send=True) result = terminal_pty_run(sid, read_only=True) # → "1764\n>>> " terminal_pty_run(sid, command="exit()", raw_send=True) terminal_pty_close(sid) ```
### ssh with host-key prompt
``` sid = terminal_pty_open() terminal_pty_run(sid, command="ssh user@new-host", expect=r"\(yes/no.*\)\?") terminal_pty_run(sid, command="yes\n", raw_send=True) terminal_pty_run(sid, read_only=True, timeout_sec=10) # password prompt or login ```
Source provenance
Decision snapshot
11,005 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for hive.terminal-tools-pty-sessions, ready for a manual X post.
hive.terminal-tools-pty-sessions: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (... 11.0K stars https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x
Listing + install path for hive.terminal-tools-pty-sessions: https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x Install: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to aden-hive but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions/audit)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)aden-hive
@aden-hive
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "hive.terminal-tools-pty-sessions" agent skill from https://github.com/aden-hive/hive/tree/main/core/framework/skills/_preset_skills/terminal-tools-pty-sessions. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"aden-hive-hive-terminal-tools-pty-sessions","task":"Install hive.terminal-tools-pty-sessions","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Maintenance
fresh
15d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
11K
88/100 Quality · 76/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
11K GitHub stars
Repo activity
11K stars, 5.7K forks
Maintenance
15d since push
License
Apache-2.0
Install
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Agent should check
Copy prompt
Task: Use hive.terminal-tools-pty-sessions in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Install command: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
LLM text format
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install?format=text
Find alternatives
/api/skills/search?q=hive.terminal-tools-pty-sessions&limit=3
Agent prompt
Use hive.terminal-tools-pty-sessions for this task. Review https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install, then install with: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions
LLM text
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions?format=text
Install alias
/api/registry/install/aden-hive-hive-terminal-tools-pty-sessions
Recommend
/api/registry/recommend?task=Use%20hive.terminal-tools-pty-sessions%20in%20an%20agent%20workflow&limit=3
Agent fit
Design and creative
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Design and creative
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS11K GitHub stars
Stars/forks activity
PASS11K stars, 5.7K forks; issue activity unavailable in current metadata
Recent maintenance
PASS15d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: hive.terminal-tools-pty-sessions description: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. metadata: author: hive type: preset-skill version: "1.0" ---
# Persistent PTY sessions
PTY sessions are how you talk to interactive programs — programs that detect a terminal (`isatty()`) and behave differently when they don't see one. Use a session when:
- You need state to persist across calls (`cd`, env vars, sourced scripts) - You're driving a REPL (`python -i`, `mysql`, `psql`, `node`, `irb`) - A program demands an interactive prompt (`sudo`, `ssh`, `npm login`, `gh auth login`)
For everything else, `terminal_exec` is simpler. Sessions cost more (per-session bash process, ring buffer, idle-reaping bookkeeping) and have a hard cap (`TERMINAL_TOOLS_MAX_PTY`, default 8).
## Why PTY (and not subprocess pipes)
Subprocess pipes break on every interactive program. The moment a program calls `isatty()` and sees False, it disables prompts, color, line-editing, password masking, progress bars — sometimes refuses to start. PTY makes us look like a real terminal so these programs work the same as in your shell.
The cost: PTY output includes terminal escape codes (cursor moves, color codes). The session captures them as-is; if you need clean text, strip ANSI escapes in your processing layer.
## Bash on macOS — by deliberate policy
`terminal_pty_open` always invokes `/bin/bash`, regardless of the user's `$SHELL`. macOS users: yes, even when zsh is your interactive default. This is the **terminal-tools-foundations** policy applied to PTYs.
Reasons: - zsh has command/builtin classes (`zmodload`, `=cmd` expansion, `zpty`, `ztcp`) that bypass bash-shaped security checks - One shell behavior across platforms eliminates "works on Linux, breaks on macOS" surprises - Bash is universal: any shell you've used will accept the bash subset
The bash invocation uses `--norc --noprofile` so user dotfiles don't leak in. PS1 is set to a unique sentinel for prompt detection. PS2 is empty. PROMPT_COMMAND is empty.
## Three modes of `terminal_pty_run`
### 1. Default: send command, wait for prompt sentinel
``` terminal_pty_run(session_id, command="ls -la") → { output, prompt_after: True, ... } ```
The session writes `ls -la\n`, waits for the sentinel that its custom PS1 emits, returns the slice between submission and prompt. **One in-flight call per session** — a concurrent call returns a `"session busy"` error.
### 2. raw_send: send raw input, no waiting
``` terminal_pty_run(session_id, command="print('hi')\n", raw_send=True) → { bytes_sent: 12 } ```
For REPLs, vim keystrokes, password prompts. The session writes the bytes and returns immediately — it doesn't wait for a prompt (REPLs don't print bash's prompt; they print their own).
After a `raw_send`, you typically follow with:
### 3. read_only: drain currently-buffered output
``` terminal_pty_run(session_id, read_only=True, timeout_sec=2) → { output: "hi\n", more: False, ... } ```
Reads whatever the session has accumulated since the last drain, with a brief settle window. Use after raw_send to capture the REPL's response.
## Custom prompt detection (`expect`)
When the command launches a program with its own prompt (Python REPL's `>>> `, mysql's `mysql> `, sudo's password prompt), the bash sentinel won't appear until the program exits. Override:
``` terminal_pty_run(session_id, command="python3", expect=r">>>\s*$", timeout_sec=10) → output up to and including ">>>", then control returns ```
For sudo:
``` terminal_pty_run(session_id, command="sudo -k && sudo whoami", expect=r"[Pp]assword:") terminal_pty_run(session_id, command="<password>", raw_send=True, command="<password>\n") terminal_pty_run(session_id, read_only=True, timeout_sec=5) ```
(Treat passwords carefully — they end up in the ring buffer.)
## Always close
``` terminal_pty_close(session_id) ```
Leaked sessions count against `TERMINAL_TOOLS_MAX_PTY` (default 8). Idle reaping happens lazily on every `_open` call (sessions inactive longer than `idle_timeout_sec`, default 1800s, are dropped) — but don't rely on it. Close when you're done.
For unresponsive sessions, `force=True` skips the graceful "exit" attempt and goes straight to SIGTERM/SIGKILL.
## Common patterns
### Stateful navigation
``` sid = terminal_pty_open(cwd="/") terminal_pty_run(sid, command="cd /var/log") terminal_pty_run(sid, command="ls -la *.log | head") terminal_pty_close(sid) ```
### Python REPL
``` sid = terminal_pty_open() terminal_pty_run(sid, command="python3", expect=r">>>\s*$") terminal_pty_run(sid, command="x = 42", raw_send=True) terminal_pty_run(sid, command="print(x*x)\n", raw_send=True) result = terminal_pty_run(sid, read_only=True) # → "1764\n>>> " terminal_pty_run(sid, command="exit()", raw_send=True) terminal_pty_close(sid) ```
### ssh with host-key prompt
``` sid = terminal_pty_open() terminal_pty_run(sid, command="ssh user@new-host", expect=r"\(yes/no.*\)\?") terminal_pty_run(sid, command="yes\n", raw_send=True) terminal_pty_run(sid, read_only=True, timeout_sec=10) # password prompt or login ```
Source provenance
Decision snapshot
11,005 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for hive.terminal-tools-pty-sessions, ready for a manual X post.
hive.terminal-tools-pty-sessions: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (... 11.0K stars https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x
Listing + install path for hive.terminal-tools-pty-sessions: https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x Install: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to aden-hive but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions/audit)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)aden-hive
@aden-hive
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "hive.terminal-tools-pty-sessions" agent skill from https://github.com/aden-hive/hive/tree/main/core/framework/skills/_preset_skills/terminal-tools-pty-sessions. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"aden-hive-hive-terminal-tools-pty-sessions","task":"Install hive.terminal-tools-pty-sessions","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Maintenance
fresh
15d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
11K
88/100 Quality · 76/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
11K GitHub stars
Repo activity
11K stars, 5.7K forks
Maintenance
15d since push
License
Apache-2.0
Install
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Agent should check
Copy prompt
Task: Use hive.terminal-tools-pty-sessions in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Install command: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
LLM text format
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install?format=text
Find alternatives
/api/skills/search?q=hive.terminal-tools-pty-sessions&limit=3
Agent prompt
Use hive.terminal-tools-pty-sessions for this task. Review https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install, then install with: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions
LLM text
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions?format=text
Install alias
/api/registry/install/aden-hive-hive-terminal-tools-pty-sessions
Recommend
/api/registry/recommend?task=Use%20hive.terminal-tools-pty-sessions%20in%20an%20agent%20workflow&limit=3
Agent fit
Design and creative
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Design and creative
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS11K GitHub stars
Stars/forks activity
PASS11K stars, 5.7K forks; issue activity unavailable in current metadata
Recent maintenance
PASS15d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: hive.terminal-tools-pty-sessions description: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. metadata: author: hive type: preset-skill version: "1.0" ---
# Persistent PTY sessions
PTY sessions are how you talk to interactive programs — programs that detect a terminal (`isatty()`) and behave differently when they don't see one. Use a session when:
- You need state to persist across calls (`cd`, env vars, sourced scripts) - You're driving a REPL (`python -i`, `mysql`, `psql`, `node`, `irb`) - A program demands an interactive prompt (`sudo`, `ssh`, `npm login`, `gh auth login`)
For everything else, `terminal_exec` is simpler. Sessions cost more (per-session bash process, ring buffer, idle-reaping bookkeeping) and have a hard cap (`TERMINAL_TOOLS_MAX_PTY`, default 8).
## Why PTY (and not subprocess pipes)
Subprocess pipes break on every interactive program. The moment a program calls `isatty()` and sees False, it disables prompts, color, line-editing, password masking, progress bars — sometimes refuses to start. PTY makes us look like a real terminal so these programs work the same as in your shell.
The cost: PTY output includes terminal escape codes (cursor moves, color codes). The session captures them as-is; if you need clean text, strip ANSI escapes in your processing layer.
## Bash on macOS — by deliberate policy
`terminal_pty_open` always invokes `/bin/bash`, regardless of the user's `$SHELL`. macOS users: yes, even when zsh is your interactive default. This is the **terminal-tools-foundations** policy applied to PTYs.
Reasons: - zsh has command/builtin classes (`zmodload`, `=cmd` expansion, `zpty`, `ztcp`) that bypass bash-shaped security checks - One shell behavior across platforms eliminates "works on Linux, breaks on macOS" surprises - Bash is universal: any shell you've used will accept the bash subset
The bash invocation uses `--norc --noprofile` so user dotfiles don't leak in. PS1 is set to a unique sentinel for prompt detection. PS2 is empty. PROMPT_COMMAND is empty.
## Three modes of `terminal_pty_run`
### 1. Default: send command, wait for prompt sentinel
``` terminal_pty_run(session_id, command="ls -la") → { output, prompt_after: True, ... } ```
The session writes `ls -la\n`, waits for the sentinel that its custom PS1 emits, returns the slice between submission and prompt. **One in-flight call per session** — a concurrent call returns a `"session busy"` error.
### 2. raw_send: send raw input, no waiting
``` terminal_pty_run(session_id, command="print('hi')\n", raw_send=True) → { bytes_sent: 12 } ```
For REPLs, vim keystrokes, password prompts. The session writes the bytes and returns immediately — it doesn't wait for a prompt (REPLs don't print bash's prompt; they print their own).
After a `raw_send`, you typically follow with:
### 3. read_only: drain currently-buffered output
``` terminal_pty_run(session_id, read_only=True, timeout_sec=2) → { output: "hi\n", more: False, ... } ```
Reads whatever the session has accumulated since the last drain, with a brief settle window. Use after raw_send to capture the REPL's response.
## Custom prompt detection (`expect`)
When the command launches a program with its own prompt (Python REPL's `>>> `, mysql's `mysql> `, sudo's password prompt), the bash sentinel won't appear until the program exits. Override:
``` terminal_pty_run(session_id, command="python3", expect=r">>>\s*$", timeout_sec=10) → output up to and including ">>>", then control returns ```
For sudo:
``` terminal_pty_run(session_id, command="sudo -k && sudo whoami", expect=r"[Pp]assword:") terminal_pty_run(session_id, command="<password>", raw_send=True, command="<password>\n") terminal_pty_run(session_id, read_only=True, timeout_sec=5) ```
(Treat passwords carefully — they end up in the ring buffer.)
## Always close
``` terminal_pty_close(session_id) ```
Leaked sessions count against `TERMINAL_TOOLS_MAX_PTY` (default 8). Idle reaping happens lazily on every `_open` call (sessions inactive longer than `idle_timeout_sec`, default 1800s, are dropped) — but don't rely on it. Close when you're done.
For unresponsive sessions, `force=True` skips the graceful "exit" attempt and goes straight to SIGTERM/SIGKILL.
## Common patterns
### Stateful navigation
``` sid = terminal_pty_open(cwd="/") terminal_pty_run(sid, command="cd /var/log") terminal_pty_run(sid, command="ls -la *.log | head") terminal_pty_close(sid) ```
### Python REPL
``` sid = terminal_pty_open() terminal_pty_run(sid, command="python3", expect=r">>>\s*$") terminal_pty_run(sid, command="x = 42", raw_send=True) terminal_pty_run(sid, command="print(x*x)\n", raw_send=True) result = terminal_pty_run(sid, read_only=True) # → "1764\n>>> " terminal_pty_run(sid, command="exit()", raw_send=True) terminal_pty_close(sid) ```
### ssh with host-key prompt
``` sid = terminal_pty_open() terminal_pty_run(sid, command="ssh user@new-host", expect=r"\(yes/no.*\)\?") terminal_pty_run(sid, command="yes\n", raw_send=True) terminal_pty_run(sid, read_only=True, timeout_sec=10) # password prompt or login ```
Source provenance
Decision snapshot
11,005 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for hive.terminal-tools-pty-sessions, ready for a manual X post.
hive.terminal-tools-pty-sessions: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (... 11.0K stars https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x
Listing + install path for hive.terminal-tools-pty-sessions: https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x Install: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to aden-hive but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions/audit)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)aden-hive
@aden-hive
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsSandbox only
Install targets
Codex install prompt
Install the "hive.terminal-tools-pty-sessions" agent skill from https://github.com/aden-hive/hive/tree/main/core/framework/skills/_preset_skills/terminal-tools-pty-sessions. Read its SKILL.md or equivalent instructions first, install only the files needed for this workspace, and summarize any required setup before using it. Skill purpose: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. After the install attempt, report the result to https://www.openagentskill.com/api/agent/outcome with POST JSON {"event_id":"install_<unique-id>","skill_slug":"aden-hive-hive-terminal-tools-pty-sessions","task":"Install hive.terminal-tools-pty-sessions","agent":"codex","outcome":"success","install_used":true}. Replace event_id with a unique value and outcome with success or failed. Report success only after the skill is installed and a minimal verification passes.Supply asset profile
Design assets, images, video, audio, multimodal media, presentation, and creative production skills.
Scenario
Design and creative
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Agent fit
Claude Code + Cursor + CLI
Codex, Claude Code, Cursor, CLI, or custom agents.
Install
Ready
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Maintenance
fresh
15d since push
Risk
Needs review
Dependency or permission surface needs review
GitHub quality
11K
88/100 Quality · 76/100 Trust
Coverage tags
Review notes
Dependency or permission surface needs review · Permission surface may require sandboxing
Agent adoption scorecard
These scores combine public repository metadata, OpenAgentSkill review signals, maintenance freshness, and install readiness. They are a shortlist signal, not a replacement for human review.
Quality
ExcellentHigh-confidence pick with strong adoption and healthy maintenance signals.
Trust
Sandbox onlyUseful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
Audit
Needs reviewA machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
OpenAgentSkill Trust Score v5
Run only in a sandbox and compare close alternatives before using it for real work.
Stars
11K GitHub stars
Repo activity
11K stars, 5.7K forks
Maintenance
15d since push
License
Apache-2.0
Install
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Install safety
Agent-readable metadata
Use this block or the embedded JSON to decide whether an agent should install this skill, choose an alternative, or ask for human review first.
Suited tasks
Suited agents
Install decision
Trust and risk
Outcome loop
Install command
npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsDo not use when
Alternative
174.2K Stars
npx skills add anthropics/skills --skill frontend-design
Alternative
84.4K Stars
npx skills add Leonxlnx/taste-skill --skill design-taste-frontend
Alternative
174.2K Stars
npx skills add anthropics/skills --skill canvas-design
Alternative
174.2K Stars
npx skills add anthropics/skills --skill brand-guidelines
Agent safety v2
Sparse or mixed signals. Useful for discovery, but not for autonomous installation.
Test manually in an isolated workspace and compare against safer alternatives.
high
Skill metadata references terminal, CLI, shell, subprocess, or command execution workflows.
medium
Skill likely fetches remote pages, APIs, repositories, or external services.
high
Skill metadata references credentials, tokens, environment variables, or secret-bearing workflows.
medium
Skill may inspect schemas, query databases, or work with persistent stores.
Agent resolve plan
The Resolve API returns the selected skill, alternatives, safety policy, audit notes, install target, and copy-paste prompt an agent can follow without scraping this page.
Open JSON
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Resolve text
/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium&format=text
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Agent should check
Copy prompt
Task: Use hive.terminal-tools-pty-sessions in this workspace.
Resolve first: https://www.openagentskill.com/api/agent/resolve?task=Use%20hive.terminal-tools-pty-sessions%20for%20an%20agent%20workflow&agent=codex&max_risk=medium
Review install handoff: https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
Install command: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Before running it, summarize audit warnings, required permissions, and the fallback skill if install is risky.Agent handoff
Use the public install endpoint to fetch the command, safety checklist, target prompts, and canonical links for this skill.
Install handoff
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install
LLM text format
/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install?format=text
Find alternatives
/api/skills/search?q=hive.terminal-tools-pty-sessions&limit=3
Agent prompt
Use hive.terminal-tools-pty-sessions for this task. Review https://www.openagentskill.com/api/skills/aden-hive-hive-terminal-tools-pty-sessions/install, then install with: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessionsRegistry metadata
This page exposes the same decision, trust, audit, use-case, and install signals through the Registry API, so agents can rank this skill without scraping the UI.
Manifest
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions
LLM text
/api/registry/manifest/aden-hive-hive-terminal-tools-pty-sessions?format=text
Install alias
/api/registry/install/aden-hive-hive-terminal-tools-pty-sessions
Recommend
/api/registry/recommend?task=Use%20hive.terminal-tools-pty-sessions%20in%20an%20agent%20workflow&limit=3
Agent fit
Design and creative
Use-case tags
Platforms
Claude Code, Cursor
Audit report
A machine-readable review of install readiness, security metadata, maintenance, and adoption risk.
Agent decision cockpit
Use this as a leading candidate, then validate the README and install path in your own agent stack.
Role in stack
Primary pick
Primary fit
Design and creative
Trust label
Production-ready
Install path
Command ready
Use when
Evidence
review first
Implementation path
Trust profile
Useful candidate with missing or mixed trust signals. Keep it in an isolated workspace until the outcome loop proves task fit.
GitHub adoption
PASS11K GitHub stars
Stars/forks activity
PASS11K stars, 5.7K forks; issue activity unavailable in current metadata
Recent maintenance
PASS15d since push
License clarity
PASSApache-2.0
Good signals
Review before install
Recommended action
Run only in a sandbox and compare close alternatives before using it for real work.
Quality profile
High-confidence pick with strong adoption and healthy maintenance signals.
Workflow fit
Create assets
I need my agent to produce design assets, UI directions, presentations, or creative media workflows.
Operate local tools
I need my agent to operate local files and desktop apps in a repeatable workflow.
Operate web apps
I need my agent to control a browser, fill forms, and verify web app workflows.
Workflow fit
Design, build, test, and ship interfaces
A practical workflow for agents that turn product briefs or Figma designs into polished frontend code, review the result, test it in a browser, and prepare a safe deployment.
Operate and verify web apps
A workflow for agents that navigate products, fill forms, take screenshots, and verify real user flows across web applications.
Inspect, patch, and verify code
A workflow for software agents that inspect repositories, review pull requests, generate tests, and turn findings into shippable patches.
Alternative shortlist
Similar skills that may fit this task.
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
--- name: hive.terminal-tools-pty-sessions description: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (python -i, mysql, psql, node), or responding to interactive prompts (sudo password, ssh host-key confirmation, mysql connection). Teaches the prompt-sentinel exec pattern (default mode), raw I/O for REPLs (raw_send=True then read_only=True), the one-in-flight-per-session rule, and the close-or-leak-against-the-cap discipline. Bash on macOS — never zsh; explicit shell=/bin/zsh is rejected. Read before calling terminal_pty_open. metadata: author: hive type: preset-skill version: "1.0" ---
# Persistent PTY sessions
PTY sessions are how you talk to interactive programs — programs that detect a terminal (`isatty()`) and behave differently when they don't see one. Use a session when:
- You need state to persist across calls (`cd`, env vars, sourced scripts) - You're driving a REPL (`python -i`, `mysql`, `psql`, `node`, `irb`) - A program demands an interactive prompt (`sudo`, `ssh`, `npm login`, `gh auth login`)
For everything else, `terminal_exec` is simpler. Sessions cost more (per-session bash process, ring buffer, idle-reaping bookkeeping) and have a hard cap (`TERMINAL_TOOLS_MAX_PTY`, default 8).
## Why PTY (and not subprocess pipes)
Subprocess pipes break on every interactive program. The moment a program calls `isatty()` and sees False, it disables prompts, color, line-editing, password masking, progress bars — sometimes refuses to start. PTY makes us look like a real terminal so these programs work the same as in your shell.
The cost: PTY output includes terminal escape codes (cursor moves, color codes). The session captures them as-is; if you need clean text, strip ANSI escapes in your processing layer.
## Bash on macOS — by deliberate policy
`terminal_pty_open` always invokes `/bin/bash`, regardless of the user's `$SHELL`. macOS users: yes, even when zsh is your interactive default. This is the **terminal-tools-foundations** policy applied to PTYs.
Reasons: - zsh has command/builtin classes (`zmodload`, `=cmd` expansion, `zpty`, `ztcp`) that bypass bash-shaped security checks - One shell behavior across platforms eliminates "works on Linux, breaks on macOS" surprises - Bash is universal: any shell you've used will accept the bash subset
The bash invocation uses `--norc --noprofile` so user dotfiles don't leak in. PS1 is set to a unique sentinel for prompt detection. PS2 is empty. PROMPT_COMMAND is empty.
## Three modes of `terminal_pty_run`
### 1. Default: send command, wait for prompt sentinel
``` terminal_pty_run(session_id, command="ls -la") → { output, prompt_after: True, ... } ```
The session writes `ls -la\n`, waits for the sentinel that its custom PS1 emits, returns the slice between submission and prompt. **One in-flight call per session** — a concurrent call returns a `"session busy"` error.
### 2. raw_send: send raw input, no waiting
``` terminal_pty_run(session_id, command="print('hi')\n", raw_send=True) → { bytes_sent: 12 } ```
For REPLs, vim keystrokes, password prompts. The session writes the bytes and returns immediately — it doesn't wait for a prompt (REPLs don't print bash's prompt; they print their own).
After a `raw_send`, you typically follow with:
### 3. read_only: drain currently-buffered output
``` terminal_pty_run(session_id, read_only=True, timeout_sec=2) → { output: "hi\n", more: False, ... } ```
Reads whatever the session has accumulated since the last drain, with a brief settle window. Use after raw_send to capture the REPL's response.
## Custom prompt detection (`expect`)
When the command launches a program with its own prompt (Python REPL's `>>> `, mysql's `mysql> `, sudo's password prompt), the bash sentinel won't appear until the program exits. Override:
``` terminal_pty_run(session_id, command="python3", expect=r">>>\s*$", timeout_sec=10) → output up to and including ">>>", then control returns ```
For sudo:
``` terminal_pty_run(session_id, command="sudo -k && sudo whoami", expect=r"[Pp]assword:") terminal_pty_run(session_id, command="<password>", raw_send=True, command="<password>\n") terminal_pty_run(session_id, read_only=True, timeout_sec=5) ```
(Treat passwords carefully — they end up in the ring buffer.)
## Always close
``` terminal_pty_close(session_id) ```
Leaked sessions count against `TERMINAL_TOOLS_MAX_PTY` (default 8). Idle reaping happens lazily on every `_open` call (sessions inactive longer than `idle_timeout_sec`, default 1800s, are dropped) — but don't rely on it. Close when you're done.
For unresponsive sessions, `force=True` skips the graceful "exit" attempt and goes straight to SIGTERM/SIGKILL.
## Common patterns
### Stateful navigation
``` sid = terminal_pty_open(cwd="/") terminal_pty_run(sid, command="cd /var/log") terminal_pty_run(sid, command="ls -la *.log | head") terminal_pty_close(sid) ```
### Python REPL
``` sid = terminal_pty_open() terminal_pty_run(sid, command="python3", expect=r">>>\s*$") terminal_pty_run(sid, command="x = 42", raw_send=True) terminal_pty_run(sid, command="print(x*x)\n", raw_send=True) result = terminal_pty_run(sid, read_only=True) # → "1764\n>>> " terminal_pty_run(sid, command="exit()", raw_send=True) terminal_pty_close(sid) ```
### ssh with host-key prompt
``` sid = terminal_pty_open() terminal_pty_run(sid, command="ssh user@new-host", expect=r"\(yes/no.*\)\?") terminal_pty_run(sid, command="yes\n", raw_send=True) terminal_pty_run(sid, read_only=True, timeout_sec=10) # password prompt or login ```
Source provenance
Decision snapshot
11,005 GitHub stars
Audit
Install and adoption review
Agent-proven evidence
Outcome reports after resolve, review, install, and one narrow run.
No agent outcome data yet. The first agent run can report success, setup needs, risk blocks, failure, or not-relevant through /api/agent/outcome.
Install
Free and open source. Review the report before installing into production agents.
Growth loop
Scenario-led draft for hive.terminal-tools-pty-sessions, ready for a manual X post.
hive.terminal-tools-pty-sessions: Use when you need state across calls — building env vars, navigating with cd, driving REPLs (... 11.0K stars https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x
Listing + install path for hive.terminal-tools-pty-sessions: https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=x Install: npx skills add aden-hive/hive --skill hive.terminal-tools-pty-sessions
Listing source
This listing was indexed from public sources and is not marked official until a maintainer claim is approved.
Attribution links to the public repository or creator profile. Creators can claim the listing to update ownership signals.
Claim this skillOwner claim
This Registry indexed listing is attributed to aden-hive but is not marked official yet. Claim it to add a verified owner signal and make future launch, install, and audit updates easier to trust.
Creator backlink kit
Show the canonical listing, current trust and audit signals, and real Agent-Proven evidence where developers evaluate the repository.
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions/audit)
[](https://www.openagentskill.com/skills/aden-hive-hive-terminal-tools-pty-sessions?ref=github&utm_source=github&utm_medium=referral&utm_campaign=creator_badge)aden-hive
@aden-hive
Share whether this skill looks useful for your agent workflow. Aggregated feedback improves rankings over time.
Sandbox only
Frontend Design
Guidance for distinctive, intentional UI design, typography, visual direction, and non-template-like product interfaces.
174.2K StarsTaste Skill: Anti-Slop Frontend
Design and implementation guidance for distinctive landing pages, portfolios, product demos, and purposeful redesigns.
84.4K StarsCanvas Design
Create original visual art, posters, PNG assets, and PDF documents through a clear design philosophy.
174.2K StarsAnthropic Brand Guidelines
Apply Anthropic official brand colors, typography, and visual standards to appropriate Anthropic-related artifacts.
174.2K StarsPermission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness
Permission surface
secrets or environment access, shell or command execution
Agent outcomes
No agent outcome data yet
Docs
Usable metadata, review docs
Risk summary
Install readiness