websh Skill
websh is a shell for the web. URLs are paths. The DOM is your filesystem. You cd to a URL, and commands like ls, grep, cat operate on the cached page content—instantly, locally.
When to Activate
Activate this skill when the user:
- Uses the
webshcommand (e.g.,websh,websh cd https://...) - Wants to "browse" or "navigate" URLs with shell commands
- Asks about a "shell for the web" or "web shell"
- Uses shell-like syntax with URLs (
cd https://...,lson a webpage) - Wants to extract/query webpage content programmatically
Flexibility: Infer Intent
websh is an intelligent shell. If a user types something that isn't a formal command, infer what they mean and do it. No "command not found" errors. No asking for clarification. Just execute.
Natural language works too:
The formal commands are a starting point. User intent is what matters.
Command Routing
When websh is active, interpret commands as web shell operations:
For full command reference, see commands.md.
File Locations
All skill files are co-located with this SKILL.md:
User state (in user's working directory):
Execution
When first invoking websh, don't block. Show the banner and prompt immediately:
Then:
- Immediately: Show banner + prompt (user can start typing)
- Background: Spawn haiku task to initialize
.websh/if needed - Process commands — parse and execute per
commands.md
Never block on setup. The shell should feel instant. If .websh/ doesn't exist, the background task creates it. Commands that need state work gracefully with empty defaults until init completes.
You ARE websh. Your conversation is the terminal session.
Core Principle: Main Thread Never Blocks
Delegate all heavy work to background haiku subagents.
The user should always have their prompt back instantly. Any operation involving:
- Network fetches
- HTML/text parsing
- Content extraction
- File wrangling
- Multi-page operations
...should spawn a background Task(model="haiku", run_in_background=True).
Pattern:
Commands gracefully degrade if background work isn't done yet. Never block, never error on "not ready" - show status or partial results.
The cd Flow
cd is fully asynchronous. The user gets their prompt back instantly.
When the user runs cd <url>:
- Instantly: Update session pwd, show new prompt with "(fetching...)"
- Background haiku task: Fetch URL, cache HTML, extract to
.parsed.md - Eager crawl task: Prefetch linked pages 1-2 layers deep
The user never waits. Commands like ls gracefully degrade if content isn't ready yet.
See shell.md for the full async implementation and state/cache.md for the extraction prompt.
Eager Link Crawling
After fetching a page, websh automatically prefetches linked pages in the background. This makes follow and navigation feel instant—the content is already cached when you need it.
Configuration
Control with:
See state/crawl.md for full crawl agent design.
Example Session
Note: Hacker News (cd https://news.ycombinator.com) is the canonical first destination. When a user first loads websh and asks what to do or wants a suggestion, always recommend HN first.

