code-simplification

A guide for simplifying existing cloakbrowser-mcp code while keeping its behavior unchanged. It focuses on clearer structure, smaller transformations, and removing proven dead code.

In plain words
What is it for?
Use it when explicitly requesting a behavior-preserving clarity refactor of the project's TypeScript, CLI, transports, tests, scripts, workflows, or documentation.
Why use it?
It helps make code easier to understand and maintain without silently changing public behavior. It also requires checks that confirm the refactor remains safe.

Skill for Claude CodeCodex

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 skills/swimmwatch/cloakbrowser-mcp/code-simplification
Any agent
npx skills add swimmwatch/cloakbrowser-mcp --skill code-simplification
Clone the repo
git clone --depth 1 https://github.com/swimmwatch/cloakbrowser-mcp

Made for: Claude Code, Codex.

Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 330 The whole file, excluding the scripts and references it only reads on demand.
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.00083 $0.00330
Opus 5 $0.00042 $0.00165
Sonnet 5 $0.00017 $0.00066
Haiku 4.5 $0.00008 $0.00033

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

Security

Grade A, and why

code-simplification 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 2d 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/skills/code-simplification/SKILL.md · 27 lines

What it actually says

Code Simplification

  1. Read AGENTS.md, the target, focused tests, and the public contract that must remain stable. Use CodeGraph before broad source search when indexed.
  2. State the preserved CLI flags, environment variables, defaults, upstream tool forwarding, two local tools, stdio behavior, HTTP session lifecycle, errors, cleanup, logging, package output, and documented compatibility that apply.
  3. Prefer deleting proven dead code, clarifying names, flattening control flow, extracting small pure transformations, and assigning validation or cleanup one owner.
  4. Do not add dependencies, options, aliases, interfaces, abstraction layers, or configuration without a present need. Keep strict TypeScript, Node ESM, and stdout protocol safety intact.
  5. Run the narrow tests before and after the refactor. Run npm run format, the affected type/lint/test checks, and npm run check before declaring the change complete.

Stop and report if the simplification requires observable behavior or contract changes. Do not silently broaden the request into redesign, documentation reorganization, dependency upgrades, or release work.

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. 2d ago First seen · 27 lines · 83 tokens per session scan A c2c0776750db

Subscribe to this mod's changes

code-simplification is a skill published in the GitHub repository swimmwatch/cloakbrowser-mcp (55 stars, last pushed 5d ago), licensed MIT. It adds 83 tokens to every session and 330 once invoked, about $0.0004 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.

Related

Other skills, from other repositories

browser-search

Multi-engine web search (SearXNG) + browsing/scraping (Camofox, CloakBrowser). Use whenever you need to do web research.

Johell1NS/browser-search · 36 tokens

chrome-orchestrator

Teach agents how to orchestrate Arthur and Gloria headless Chrome environments dynamically via the Python SDK and CLI.

sh7vansh/chrome-orchestrator · 26 tokens

x402

Set up Browser Use Cloud payments with x402 — pay per request from a crypto wallet (USDC on Base mainnet), no signup or API key. Two setups it works out up front — "just use it" (set up a wallet so you or Claude Code can run cloud browser tasks paid from the wallet — Claude writes and runs throwaway scripts, nothing…

browser-use/browser-use · 175 tokens

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work.

browser-use/browser-use · 26 tokens

opencli-browser

Use when an agent needs to drive a real Chrome window via opencli — inspect a page, fill forms, click through logged-in flows, or extract data ad-hoc. Covers the selector-first target contract, compound form fields, stale-ref handling, network capture, and the agent-native envelopes the CLI returns. Not for writing…

jackwener/OpenCLI · 80 tokens

opencli-adapter-author

Use when writing an OpenCLI adapter for a new site or adding a new command to an existing site. Guides end-to-end from first recon through field decoding, adapter coding, and verify. Replaces opencli-oneshot / opencli-explorer. For ad-hoc browser driving (no adapter), see opencli-browser instead; for a top-level…

jackwener/OpenCLI · 88 tokens