ketch CLAUDE.md

ketch CLAUDE.md is an instructions file for Claude Code from 1broseidon/ketch. It costs 3,371 tokens per session, scanned B, original, MIT.

Instructions for Ketch, a command-line tool for searching the web and downloading or extracting information from websites. A command-line tool is software operated by typing commands in a terminal.

In plain words
What is it for?
Use it when developing, building, testing, or extending Ketch's search, code search, documentation search, scraping, extraction, crawling, caching, or browser commands.
Why use it?
It explains Ketch's project structure, supported search and scraping methods, configuration files, and development checks.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: positional $N argument; mentions AGENTS.md.

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/1broseidon/ketch/claude-md
Clone the repo
git clone --depth 1 https://github.com/1broseidon/ketch

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ketch CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/1broseidon/ketch/claude-md.svg)](https://agentmods.dev/instructions/1broseidon/ketch/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/1broseidon/ketch/claude-md"><img src="https://agentmods.dev/badge/instructions/1broseidon/ketch/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 3,371 This file is loaded in full into every session.
When invoked 3,371 The same file — it is already loaded in full.
Security scan B 2 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.1 $0.03371 $0.03371
Opus 5 $0.01685 $0.01685
Sonnet 5 $0.00674 $0.00674
Haiku 4.5 $0.00337 $0.00337

Measured 6d ago against content hash 49b10bab5bbf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

ketch CLAUDE.md scanned grade B with 2 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 6d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Hygiene**: cookie values are never printed anywhere (frontmatter, `--json`, errors, `ketch doctor`). `ketch doctor` reports `cookies/jar: configured (N cookies, M expired)`. A group/world-readable jar triggers a one-

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

BYO cookies for session/consent-gated pages (issue #25). ketch loads a **Netscape `cookies.txt`** jar (browser-extension / curl / yt-dlp format) and attaches matching cookies at **both** fetch layers — the HTTP path (`sc
CLAUDE.md · 222 lines

How it starts

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

Ketch

Fast, stateless CLI for agentic web search and scrape. Single Go binary, no daemon.

Architecture

See AGENTS.md for full module layout and design principles, and design/DESIGN.md for the reasoning behind them — read its Non-Goals & Scope before adding a feature.

  • cmd/ — Cobra CLI (root, search, code, docs, scrape, extract, crawl, config, cache, browser, doctor, mcp, version)
  • code/code.Searcher interface with Grep (built-in default), Sourcegraph, and GitHub backends
  • docs/docs.Searcher interface with Context7 backend (local FTS5 planned)
  • search/Searcher interface with Brave (built-in default), DDG, SearXNG, Exa, Firecrawl, Keenable, Tavily, Parallel, and SerpBase backends
  • scrape/ — HTTP fetch + browser fallback via Rod for JS-rendered pages
  • extract/ — readability + html-to-markdown pipeline, JS shell detection heuristic
  • crawl/ — BFS/sitemap crawler with background execution and status tracking
  • config/ — JSON config at ~/.config/ketch/config.json
  • cache/ — TTL-based page cache backed by bbolt (~/.cache/ketch/cache.db)

Build & Test

make build          # builds ./ketch
make lint           # golangci-lint (gocyclo max 15)
make test           # go test ./...

Pre-commit hook (.githooks/pre-commit) runs gofmt, vet, lint, and tests. Git is configured to use .githooks/ as hooks path.

Output Format

Default output uses YAML frontmatter + markdown (cymbal style):

  • ketch scrape — frontmatter (url, title, words) + markdown body
  • ketch search — frontmatter (query, backend, result_count) + result list. Under --multi the frontmatter uses backends: (plural, the engines that contributed) plus a failed: key for partial failures, and each result gains a found in: line / backends JSON field
  • --json flag available on all commands for structured JSON output

Output Flags (all commands)

Flag Scope Default Description
--max-chars N scrape, search --scrape 0 (off) Truncate markdown output to N chars, appends [truncated]
--trim scrape, search --scrape false Strip markdown formatting syntax, keep content text only (~30-40% token reduction)
--minimal search, code, docs false One result per line, tab-separated url/title/snippet, no frontmatter (a 4th backends column is appended under search --multi, plain search only — --scrape --minimal keeps 3 columns)
--multi[=list] search Federated search across backends (RRF fusion, URL-dedup'd); bare/=all = every usable backend, =brave,exa = a set; mutually exclusive with --backend
--select <css> scrape Extract only elements matching CSS selector (skips readability)
--no-llms-txt scrape false Disable automatic /llms.txt detection for bare domains
--raw scrape false Output raw HTML instead of markdown (skips /llms.txt; incompatible with --select/--trim)
--force-browser scrape false Always render via the configured browser, skipping JS-shell auto-detection (errors without a browser); composes with --raw and --select
--cookie-file <path> scrape, search --scrape, crawl off (config cookie_file) Netscape cookies.txt jar; matching cookies attached at both fetch layers. Overrides cookie_file; empty value disables. Values never printed

Read the full file on GitHub · 222 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. 6d ago First seen · 222 lines · 3,371 tokens per session scan B 49b10bab5bbf

Subscribe to this mod's changes

ketch CLAUDE.md is an instructions file published in the GitHub repository 1broseidon/ketch (540 stars, last pushed 5d ago), licensed MIT. It adds 3,371 tokens to every session, about $0.0169 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.