by only-cli
Turn any website into a compact CLI tailored for AI agents. Browse the web in hundreds of tokens, not tens of thousands.
# Add to your Claude Code skills
git clone https://github.com/only-cli/ococ is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by only-cli. Turn any website into a compact CLI tailored for AI agents. Browse the web in hundreds of tokens, not tens of thousands. It has 52 GitHub stars.
oc's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/only-cli/oc" and add it to your Claude Code skills directory (see the Installation section above).
oc is primarily written in JavaScript. It is open-source under only-cli on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh oc against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

Turn most websites into a command line interface, so AI agents like Claude Code, Codex, and Antigravity can browse without burning tokens on raw HTML or screenshots.
The gap is clearest on a task with a few hops in it, and it still shows on a single page. Measured 2026-08-19: open r/ClaudeAI's front page, follow its top post to the comments, and report the post title and what the top comment argues; and separately, read finance.yahoo.com/quote/AAPL and report the price at the last market close. Bars are on the same scale across both tasks.
-- Reddit, multi-hop --
Codex + oc ############### 112,794 tok $0.24 6 turns ✅ right
Codex default ######################################## 301,009 tok $0.54 12 turns ✅ right
Claude Code + oc ################################# 250,628 tok $0.21 8 turns ✅ right
Claude Code default ########################## 196,675 tok $0.14 7 turns ❌ failed, blocked
-- AAPL, single page --
Codex + oc ######## 59,648 tok $0.13 4 turns ✅ right
Claude Code default ################ 123,866 tok $0.09 3 turns ✅ right
Claude Code + oc ########################## 198,976 tok $0.17 7 turns ✅ right
Codex default ########## 71,947 tok $0.13 4 turns ❌ wrong
Claude Code's own WebFetch and WebSearch are blocked from reddit.com outright, and by default it has no shell to fall back to, so it does not just cost more on the Reddit task, it fails outright and asks for permission it is never going to get. Codex falls back to its own web search and curl there and gets it right, at 2.7x what it costs through oc. On the single AAPL page it flips: Codex's default never opens the page and reports a stale price, while Claude Code's default WebFetch is genuinely the cheapest correct answer in the table, cheaper than oc. Full methodology for both is further down in Against each agent's own defaults.
A typical page is tens of thousands of tokens of markup. The signal on it fits in a few hundred. only-cli fetches the page, distills it into a compact text view with numbered actions, and lets an agent drive the site by number:
$ oc open news.ycombinator.com
# Hacker News
[1] Show HN: I built a tiny CSV toolkit
[2] 312 comments
...
actions: do <n> | read <n> | next | raw
$ oc do 1
No per-site adapters required, no browser extension, no daemon. One generic distillation engine, three runtime dependencies, and a hard token budget on everything it prints.
If you are an LLM reading this repository, llms.txt is the short version.
npm install -g @only-cli/oc
Requires Node 20+. Requests go through impers impersonating Chrome; if impers is unavailable the tool falls back to native fetch.
The fastest setup is one line in your agent's instructions file (CLAUDE.md, AGENTS.md, or equivalent):
When you need content from a web page, run
npx @only-cli/oc open <url>instead of fetching raw HTML. Runnpx @only-cli/oc --helponce to learn the commands.
Claude Code users can install the skill instead: copy skills/only-cli/ into your project's .claude/skills/ directory (or ~/.claude/skills/ to enable it everywhere). A skill costs almost no tokens until the agent actually invokes it, which fits how this whole project thinks. The same skill also installs through the skills.sh directory into Claude Code, Cursor, Codex, Copilot, and others:
npx skills add only-cli/oc
No setup at all also works: npx @only-cli/oc runs without a global install, and the tool teaches its own command surface through --help, the actions: line at the bottom of every render, and error messages that name the next command to run.
oc open <url> fetch and render a page with numbered actions
oc do <n> follow the numbered link [n], or read [n] if it is text
oc find <query> where a string appears on the page already open
oc read <n> full text of the region at [n], up to 2000 tokens
oc next the next budget worth of the page already open
oc raw [url] distilled markdown of the whole page
oc fill <n> <text> type into a numbered input (v0.2)
oc submit [n] submit a form (v0.2)
Flags: --budget <tokens> (default 500, 2000 for read; a target rather than a hard cap, see below), --json, --html (raw as cleaned HTML instead of markdown), --session <name> (separate page state per name), --verbose/-v (metrics on stderr: tokens saved vs the page HTML, HTTP status and client identity, timing, transfer size, memory; alias --stats, or export OC_VERBOSE=1). Metrics are off by default because they cost tokens too; agents should pass --verbose only when running verbosely.
oc open remembers the page it rendered, so oc do 3 follows [3] without the agent ever handling a URL. That state is a JSON file per session under ~/.only-cli (override the directory with OC_HOME); there is no daemon and no background browser. Links that search engines wrap in a tracking redirect resolve to the real destination, so do on a result works like a click. Numbers that turn out to be a heading or a paragraph rather than a link are read instead of refused, since the agent asked to see what is there and the alternative is spending a command to be told which command to run.
A budget only helps if it is spent on the part of the page someone asked for. Most pages open with menus, so the render puts the main content first and everything else after it:
# Best Terminal Web Browser : linuxquestions
[3] Best Terminal Web Browser
IYO What's The Best Terminal Web Browser?
[17] Xendarq
46 points 3 years ago
You mean there's a terminal web browser other than lynx??! Who knew!
...
--- 348 repeated controls hidden (save, report, [-]), 'oc raw' has them ---
--- rest of page: navigation, sidebar, footer ---
The content is found by following the page's own markup (main, role="main", a single article) and falling back to the densest run of prose when a page says nothing. Nothing is dropped: nav and sidebar links still carry numbers oc do can follow, they just stop being what the budget buys. Repeated control labels are the exception, because a forum thread stamps permalink, save, and report onto every comment and a social timeline stamps reply, repost, and like onto every post. On a long page those cost more than the content does, so they are removed and the count says so. A button gets less patience than a link there, since a link's text can be the thing you came to read and a button's never is.
Pages small enough to print whole are left in document order, since nothing is competing for the budget there.
The 500 tokens is what a page is aimed at, not a line it may never cross. A page that would finish within about four times the budget is printed whole instead of being cut, because the cut does not save those tokens, it moves them into a second command. Inside Claude Code a single tool call costs 23,000 to 33,000 tokens of session overhead whatever it prints, so trading roughly 1,500 tokens of page for a turn is a trade worth making. The multiple stays low on purpose: the saving is only collected when the agent would have paged at all, while the overspend is paid on every page that runs a little long, including the ones answered by their first three lines.
A 500 token view of a long page is cheap on the first read and expensive on the second, if the only way to see more is the whole page again. So the view says what it left behind, and there are three ways to collect it that are not the whole page:
$ oc open https://old.reddit.com/r/linuxquestions/comments/xpznb1/best_terminal_web_browser/
...
[26] Lynx because it's the only one I'm aware of. These days the web is ... +53 chars
... 168 more blocks (~2,478 tokens): 'oc next' for the next ~500, 'oc raw' for all
actions: do <n> | read <n> | next | raw
$ oc find w3m # 7 matches with the number to read each by, 142 tokens
$ oc read 23 # that comment in full, 143 tokens
$ oc next # the next ~450 tokens, continuing exactly where the view stopped
$ oc raw # the whole thread, 9,636 tokens
None of the three fetches anything: open saves the distilled page, so working through it afterwards costs one file read. find matches as a phrase, case insensitive, and falls back to the words separately when the phrase is absent. read <n> takes one region, which is the block at [n] with the couple of blocks that lead into it, or the whole section when [n] is a heading. Headings and text blocks long enough to be cut get numbers for exactly this reason, and ... +312 chars on a line is how much of that block the view did not print.
only-cli works on any mostly-static website with no per-site setup: news sites, blogs, documentation, forums, search engines. One generic engine distills whatever HTML comes back. On top of that, clis/ ships tuned command shortcuts for:
| website | domain | shortcuts |
|---|---|---|
| Hacker News | news.ycombinator.com | top, new, item <id>, user <name> |
| reddit.com (via old.reddit.com) |