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.
npx agentmods add instructions/townsendmerino/ken/claude-mdgit clone --depth 1 https://github.com/townsendmerino/kenWrote 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.
[](https://agentmods.dev/instructions/townsendmerino/ken/claude-md)<a href="https://agentmods.dev/instructions/townsendmerino/ken/claude-md"><img src="https://agentmods.dev/badge/instructions/townsendmerino/ken/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.06633 | $0.06633 |
| Opus 5 | $0.03317 | $0.03317 |
| Sonnet 5 | $0.01327 | $0.01327 |
| Haiku 4.5 | $0.00663 | $0.00663 |
Grade B, and why
ken CLAUDE.md scanned grade B with 1 finding 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
`~/.codex/config.toml`: How it starts
The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
What this is
ken is a pure-Go, no-cgo port of MinishLab/semble, a hybrid code-search tool (lexical BM25 + Model2Vec semantic embeddings + RRF fusion + rerank heuristics). The authoritative docs:
docs/DESIGN.md— algorithm spec, precision contracts, license chain, risk register. Read it before any non-trivial change.docs/internal/DECISIONS.md— ADR-style record of every architectural decision (alternatives considered, consequences). Cross-linked from DESIGN.md's "Decisions" summary.docs/BENCH.md— NDCG benchmark reproduction + empirical findings.
The repo is on GitHub at townsendmerino/ken.
Repository ownership (read this first)
Claude Code is the sole editor of this repository. A second Claude instance ("the claude app") is used for design/planning discussion only and has been instructed by the user not to modify files here. Implications:
- There is no lane partition. Every package in this repo is maintained here directly; the old "report, don't cross lanes" rule no longer applies. (The algorithm packages themselves now live in the sibling
aikitrepo — ADR-034; edit them there.) docs/DESIGN.mdis the shared design doc and may be discussed conceptually with the other instance, but all file edits (code anddocs/DESIGN.md) happen here.- Keep the whole tree
gofmt-clean andgo test ./...green on every change.
Commands
go build ./... # build everything
go test ./... # all tests
go test ./internal/search/ -run TestSerializeRoundtrip_BM25 -v # a single test (regexp on name)
go vet ./... # must be clean
make gofmt-check # gofmt scope = Makefile GOFMT_DIRS (cmd internal mcp bench demos); CI runs this exact target
go fix ./... # Go 1.26 modernizers (SplitSeq, min, range-int)
go run ./cmd/ken index <path> [--watch|--no-watch] [--write-snapshot] [--chunker=regex|treesitter|line] [--mode=bm25|semantic|hybrid] [--model=DIR]
go run ./cmd/ken search <path> <query>... [-k N] [--chunker=...] [--mode=...] [--model=...]
go run ./cmd/ken doctor [--json] [--verbose] # health check + recommendations (folds status/savings/rerank-cache/config into advice)
go run ./cmd/ken-mcp # stdio MCP server (env-configured; see MCP section)
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.
- 6d ago First seen · 127 lines · 6,633 tokens per session scan B 582a377f42a0
ken CLAUDE.md is an instructions file published in the GitHub repository townsendmerino/ken (30 stars, last pushed 2d ago), licensed MIT. It adds 6,633 tokens to every session, about $0.0332 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
mosaic AGENTS.md
Instructions for hexxla/mosaic, covering project instructions, your responsibilities as an agent, hexagonal architecture, core concepts and layer responsibilities & rules.
mnemotree AGENTS.md
Instructions for kurcontko/mnemotree, covering mnemotree, project summary, common commands, install (pip) and optional extras, e.g.
rag-vault AGENTS.md
AGENTS.md instructions for maxrotemberg04-spec/rag-vault, covering rag-vault — agent instructions and hard rules.
rag-vault CLAUDE.md
Claude Code instructions for maxrotemberg04-spec/rag-vault, a project described as: Local-first RAG over my Obsidian vault — hand-rolled hybrid retrieval (BM25 + embeddings + RRF), cited answers, MCP server for AI agents.
codesage AGENTS.md
AGENTS.md instructions for iliaal/codesage, covering codesage, build, sanity check before pushing, crate map and search pipeline.
agent-skills GEMINI.md
Instructions for powabase-ai/agent-skills: This repository ships the powabase agent skill at skills/powabase/SKILL.md — it teaches you to build on Powabase, the AI Backend-as-a-Service (RAG / knowledge bases, agents, multi-agent orchestration, workflows) and its Supabase-style BaaS layer (PostgREST, auth, storage…