tauri-pty
Skill0 starsChanged 7 months agoApache-2.0View on GitHub
Implementation guardrail for terminal emulator and PTY features in Tauri apps, covering Rust PTY setup, xterm integration, resizing, lifecycle, security, and multi-tab behavior.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- yofabr/tauri-ptytheir own version, first seen Apr 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- yofabr/tauri-pty★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository57 other files it gives its agents.
- ai-app-integrationSkill
- anti-llm-frontend-designSkill
- aspnet-core-web-developmentSkill
- async-python-patternsSkill
- browser-game-foundationsSkill
- browser-local-qaSkill
- build-mcp-server-sdk-v2Skill
- canva-design-opsSkill
- check-completionSkill
- cli-tool-creatorSkill
- cloudflare-agents-mcpSkill
- cloudflare-durable-objectsSkill
- cloudflare-workers-platformSkill
- deployment-preview-workflowsSkill
- docx-document-artifactsSkill
- durable-workflow-orchestrationSkill
- dynamic-og-imagesSkill
- eval-auditSkill
- evaluate-ragSkill
- figma-design-to-code-rulesSkill
- fine-tuningSkill
- frontend-product-builderSkill
- game-asset-pipeline-expansionSkill
- game-ui-playtestSkill
- generate-synthetic-dataSkill
- github-pr-ci-opsSkill
- gmail-inbox-opsSkill
- golden-datasetSkill
- huggingface-llm-trainerSkill
- javascript-monorepo-buildsSkill
- linear-issue-managementSkill
- media-generation-transcriptionSkill
- millrace-rs-contract-paritySkill
- minecraft-mod-qa-automationSkill
- notion-workspace-flowsSkill
- openai-docsSkill
- optimize-agentic-cliSkill
- pdf-artifact-workflowSkill
- phaser-2d-game-developmentSkill
- postgres-query-performanceSkill
- product-ui-polish-reviewSkill
- pydantic-v2-patternsSkill
- python-repo-refactoring-hygieneSkill
- rag-corpus-hygieneSkill
- react-next-performance-reviewSkill
- rust-best-practicesSkill
- shadcn-ui-compositionSkill
- skill-evaluation-harnessSkill
- tauri-desktopSkill
- tauri-mcp-cliSkill
- tile-pixel-art-transitionsSkill
- train-sentence-transformersSkill
- typer-cli-patternsSkill
- using-dbt-for-analytics-engineeringSkill
- validate-evaluatorSkill
- visual-asset-pipelineSkill
- watchdog-file-watcher-patternsSkill
The file
We split this skill into the rules it gives an agent
9 rules. About 0 are common, 9 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 47
Treat interactive shells as powerful execution surfaces.
- Distinctive: line 48
Do not confuse one-shot command APIs with a real PTY.
- Distinctive: line 49
Use platform-aware shell selection and environment setup.
- Distinctive: line 51
Avoid blocking the UI thread with PTY reads or process waits.
- Distinctive: line 67
Call out security constraints around command, cwd, env, and file access.
- Distinctive: line 76
Add multi-tab state only after one terminal session works end to end.
- Distinctive: line 77
Add shutdown cleanup for tabs, app close, failed spawns, and backend errors.
- Distinctive: line 78
Test on each target platform that changes shell behavior or permissions.
- Distinctive: line 90
Start with one working terminal session.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tauri PTY
Purpose
Help agents build or debug terminal emulator features inside Tauri apps. This skill covers PTY process lifecycle, Tauri plugin or manual Rust backend wiring, xterm-style frontend integration, resize handling, shell selection, streaming, multi-tab state, and security boundaries.
Use When
- the user is embedding a terminal, shell, PTY, interactive CLI, or terminal tab in a Tauri app
- code mentions
portable_pty,tauri-plugin-pty,xterm, terminal panes, shell spawning, or PTY resizing - the problem involves streaming terminal output or forwarding keyboard input to a shell
Do Not Use When
- the app only needs one-shot command execution, not an interactive terminal
- the work is ordinary Tauri IPC or packaging unrelated to PTY behavior
- the terminal is a web-only mock with no backend process
Quick Start
- Decide whether the standard PTY plugin is enough or manual
portable_ptycontrol is required. - Register the Rust-side plugin or PTY backend before writing frontend terminal code.
- Install and wire a terminal frontend such as xterm with fit, links, and Unicode support as needed.
- Pick the platform shell explicitly instead of assuming one shell exists everywhere.
- Wire bidirectional data: PTY output to terminal, terminal input to PTY, resize events to PTY.
- Dispose terminal and PTY resources on unmount, tab close, app shutdown, and failed spawn.
Operating Constraints
- Treat interactive shells as powerful execution surfaces; do not expose arbitrary spawn options without policy.
- Do not confuse one-shot command APIs with a real PTY.
- Use platform-aware shell selection and environment setup.
- Preserve terminal dimensions and resize events; stale
colsandrowscause broken full-screen apps. - Avoid blocking the UI thread with PTY reads or process waits.
- Bound scrollback, output buffers, and retained session history.
- Sanitize or constrain launch directories, environment variables, and commands when users or agents can influence them.
- Clean up child processes and event listeners reliably.
Inputs This Skill Expects
- The Tauri version, frontend framework, and terminal frontend library.
- Whether the desired implementation uses a PTY plugin or manual Rust PTY management.
- Platform targets and default shell expectations.
- Requirements for tabs, splits, persistence, working directories, environment, and command launch policy.
- Existing code for plugin registration, frontend terminal component, and lifecycle cleanup.
Output Contract
- State the chosen PTY approach and why it fits the required control level.
- Name the Rust backend registration and frontend terminal component responsibilities.
- Include shell selection, env, cwd, resize, input/output, and cleanup behavior.
- Call out security constraints around command, cwd, env, and file access.
- Include verification steps for spawn, input, output, resize, multi-tab behavior, and shutdown cleanup.
Procedure
- Inspect current Tauri backend setup and frontend terminal dependencies.
- Choose plugin-based PTY for ordinary terminal panels; choose manual backend only for lifecycle or protocol needs the plugin cannot expose.
- Register backend plugin or commands and verify they compile.
- Build the terminal component with stable container sizing and lifecycle hooks.
- Wire PTY output, terminal input, resize, focus, copy/paste, links, and theme behavior.
- Add multi-tab state only after one terminal session works end to end.
- Add shutdown cleanup for tabs, app close, failed spawns, and backend errors.
- Test on each target platform that changes shell behavior or permissions.
Pitfalls And Gotchas
- Spawning a process without a PTY and expecting interactive terminal behavior.
- Forgetting to resize the PTY after the terminal fit calculation changes.
- Leaving shell child processes running after a tab closes.
- Capturing unlimited output and exhausting memory.
- Assuming
bashexists on Windows or that PowerShell exists on every non-Windows target. - Letting frontend-controlled strings become unrestricted commands.
- Testing only echo output and not full-screen terminal apps, control sequences, or resize.
Progressive Disclosure
Start with one working terminal session. Add themes, links, Unicode, tabs, splits, persistence, and session restore only after spawn, input, output, resize, and cleanup are proven. Escalate from plugin use to manual PTY only when the required lifecycle control is concrete.
Verification Pattern
- Confirm backend plugin or PTY commands compile.
- Confirm a shell starts, displays prompt output, accepts input, and returns command output.
- Confirm resize reaches the PTY and full-screen terminal apps render correctly.
- Confirm tab close and app shutdown terminate or detach processes as designed.
- Confirm output buffering stays bounded under high-volume commands.
- Confirm command, cwd, env, and permission policy is documented and enforced.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

