skillfed

Writing User Outputs

This skill documents worktrunk's output system architecture, including shell integration via directive files, message formatting functions with symbols and colors, and the decision logic for routing content to stdout, stderr, or directive files. It covers when to page output, security considerations for shell injection prevention, and Windows path compatibility.

Writing User Outputs teaches you to format CLI messages, manage shell integration, and route output streams correctly in worktrunk.

AI-generated summary based on this skill's SKILL.md

6,109 219 NOASSERTION updated by max-sixty

Install

max-sixty/worktrunk/writing-user-outputs · repository language: Rust

CLI (skillfed)coming soon
git clone https://github.com/max-sixty/worktrunk
cp -r worktrunk ~/.claude/skills/writing-user-outputs

generated, unverified - the skill's exact subdirectory could not be determined; check the repository on GitHub

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How do I write outputs to users in Claude Code?

Writing User Outputs in Claude Code involves using worktrunk's output system architecture. Route content to stdout for standard results, stderr for errors or warnings, or directive files for shell integration. Use message formatting functions with symbols and colors to enhance clarity. Apply decision logic to determine the appropriate output channel based on content type and user context.

What are the best practices for user output handling?

Writing User Outputs best practices include: prevent shell injection by sanitizing user input before routing to directive files; ensure Windows path compatibility when writing outputs; page output when content exceeds terminal display capacity; use stderr for errors and warnings to separate them from standard results; apply consistent message formatting with symbols and colors for better user comprehension.

How should I format outputs for end users?

Writing User Outputs formatting relies on message formatting functions that incorporate symbols and colors to create effective user-facing messages. Structure outputs clearly, distinguish between different message types (success, error, info), and maintain consistent styling. Consider terminal capabilities and readability when applying formatting, and use paging for lengthy outputs to prevent overwhelming users.

What's the difference between stdout, stderr, and directive files?

Writing User Outputs uses three routing channels: stdout carries standard results and normal output; stderr handles errors, warnings, and diagnostic messages; directive files enable shell integration for advanced scripting scenarios. Choose the appropriate channel based on content purpose—this routing decision logic ensures outputs reach users through the most suitable pathway for their context.

How do I generate effective user-facing messages?

Writing User Outputs effectiveness comes from combining clear messaging with proper formatting. Use message formatting functions with symbols and colors to make outputs scannable and visually distinct. Structure messages logically, provide context when needed, and apply security considerations like shell injection prevention. Test outputs across different terminal environments to ensure compatibility and readability.

What security considerations apply to user output writing?

Writing User Outputs securely requires preventing shell injection when content routes to directive files or shell contexts. Sanitize all user-provided data before output, especially when writing to files that shell processes will execute. Validate paths for Windows compatibility, escape special characters appropriately, and follow the decision logic for routing to ensure sensitive data doesn't leak through unintended channels.

Related skills

Tags

user-communication output-formatting message-generation user-facing-results response-delivery