stealth-cli AGENTS.md

Project instructions for stealth-cli, a command-line tool and software library for controlling an anti-detection Camoufox browser through Playwright. Playwright is a tool for automating web browsers.

In plain words
What is it for?
Working on stealth-cli's browser control, background daemon, profiles, saved sessions, cookies, proxies, and human-like browser behavior.
Why use it?
They tell the coding assistant where important parts of the project live and warn it to check the actual Camoufox API instead of guessing.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/youhai020616/stealth-cli/agents-md
Clone the repo
git clone --depth 1 https://github.com/Youhai020616/stealth-cli

Made for: Codex, OpenCode.

Per session 2,087 This file is loaded in full into every session.
When invoked 2,087 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02087 $0.02087
Opus 5 $0.01043 $0.01043
Sonnet 5 $0.00417 $0.00417
Haiku 4.5 $0.00209 $0.00209

Measured 3d ago against content hash 21d082435214, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

stealth-cli AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 138 lines

How it starts

The opening of the file, as written. The whole thing — 138 lines — stays where its author put it; the contents beside it link to each section on GitHub.

stealth-cli

Anti-detection browser CLI and SDK, powered by Camoufox (Firefox) + Playwright.

IMPORTANT: camoufox-js is a niche library with limited training data. Always read src/browser.js for actual API usage before writing code. Do NOT guess its API.

Project Structure

bin/stealth.js           — CLI entry (Commander)
src/
  index.js               — SDK public API (re-exports all modules)
  browser.js             — Core: launch/close/navigate + state snapshots via camoufox-js
  browser-lifecycle.js   — Headed browser lifetime, signals, and durable checkpoints
  daemon.js              — Background browser server (unix socket ~/.stealth/daemon.sock)
  client.js              — HTTP client for daemon communication
  daemon-entry.js        — Daemon process entrypoint
  config.js              — Global config (~/.stealth/config.json)
  profiles.js            — Browser identity profiles ($STEALTH_HOME/profiles; default ~/.stealth/profiles/)
  session.js             — Session persistence (cookies + state under $STEALTH_HOME/sessions)
  cookies.js             — Netscape cookie file parser
  proxy-pool.js          — Proxy rotation pool
  humanize.js            — Human behavior simulation (scroll, mouse, type)
  retry.js               — Retry with exponential backoff
  macros.js              — Search engine URL templates
  output.js              — Output formatting (text/json/jsonl/markdown) + log helpers
  errors.js              — Error hierarchy with exit codes (used by all commands via handleError)
  mcp-server.js          — MCP server (stdio JSON-RPC) for AI agents
  utils/
    browser-factory.js   — Shared browser bootstrap (getHostOS, createBrowser, TEXT_EXTRACT_SCRIPT)
    close-browser-cli.js — CLI close wrapper that surfaces persistence and cleanup failures
    json-file.js         — Descriptor-bound private reads + atomic owner-only JSON writes
    resolve-opts.js      — Merge global config + CLI opts (used by all core commands)
    state-lock.js        — Single-writer profile/session locks held for browser lifetime
    storage-paths.js     — STEALTH_HOME profile/session/lock paths + strict state-name validation
  extractors/
    index.js             — Extractor registry (by engine name or URL)
    base.js              — Generic fallback extractor
    google.js            — Google search result extractor
    bing.js              — Bing extractor
    duckduckgo.js        — DuckDuckGo extractor
    github.js            — GitHub extractor
    youtube.js           — YouTube extractor
  commands/              — Commander subcommands (one file per command)
tests/
  unit/                  — Unit tests (no browser, no network)
  e2e/                   — E2E tests (real browser)
  fixtures/              — Test data (cookies.txt, urls.txt)

Read the full file on GitHub · 138 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 138 lines · 2,087 tokens per session scan A 21d082435214

Subscribe to this mod's changes

stealth-cli AGENTS.md is an instructions file published in the GitHub repository Youhai020616/stealth-cli (43 stars, last pushed 1mo ago), licensed MIT. It adds 2,087 tokens to every session, about $0.0104 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.