harken: Instructions file for Claude Code

CLAUDE.md

harken CLAUDE.md is an instructions file for Claude Code from montezuma-p/harken. It costs 2,689 tokens per session, scanned A, original, Apache-2.0.

Project guidance for harken, an offline Rust audio-transcription command-line tool that also handles WhatsApp chat exports and can run as an MCP server.

In plain words
What is it for?
Use it when developing, testing, building, or reviewing harken and its whisper.cpp integration.
Why use it?
It documents the architecture, required checks, tests, build requirements, and special tests needed when changing its native audio integration.

Instructions file for Claude Code

Written for Claude Code: Claude Code plugin machinery. Also seen: reads .claude/ paths; mentions CLAUDE.md.

This is montezuma-p/harken's own configuration. It tells Claude Code how to work on harken itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything harken configures →

Reuse

Borrowing it

Nothing to install: this file belongs to montezuma-p/harken. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/montezuma-p/harken/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/montezuma-p/harken

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 harken CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/montezuma-p/harken/claude-md.svg)](https://agentmods.dev/instructions/montezuma-p/harken/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/montezuma-p/harken/claude-md"><img src="https://agentmods.dev/badge/instructions/montezuma-p/harken/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 2,689 This file is loaded in full into every session.
When invoked 2,689 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.02689 $0.02689
Opus 5 $0.01345 $0.01345
Sonnet 5 $0.00538 $0.00538
Haiku 4.5 $0.00269 $0.00269

Measured 8d ago against content hash 0dda963c93a4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

harken CLAUDE.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 8d 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.

CLAUDE.md · 163 lines

How it starts

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

CLAUDE.md — harken

Local, offline audio transcription CLI (whisper.cpp via direct FFI + vendored sources) with WhatsApp chat-export support and an MCP server mode (harken mcp). Rust crate harken — full port from Python is done, the Python tree is gone. Architecture map: docs/ARCHITECTURE.md.

Local context: if an untracked hub/ dir exists, read hub/README.md (personal notes, roadmap, ADRs — never commit it).

Commands

  • make check — full local CI: fmt + clippy -D warnings + test + cargo audit + cargo machete. Run before claiming anything done.
  • cargo test — 166 integration tests, instant and offline.
  • cargo test --test ffi_smoke_test -- --ignored — opt-in smoke test that loads a real whisper context through src/ffi.rs (skips if ggml-tiny.bin is not already cached; never runs in CI). Run it after touching src/ffi.rs, build.rs, or the submodule pin — the 166 tests above use FakeEngine and cannot catch an FFI mistake.
  • cargo build — needs a C++ toolchain (whisper.cpp is compiled in) and the vendor/whisper.cpp submodule checked out (git submodule update --init --recursive); build.rs panics with that hint if it is missing.
  • dist plan / dist build — cargo-dist release artifacts.
  • make install-dev-tools — installs cargo-audit + cargo-machete.

Inviolable rules

  • The 166 tests in tests/ are the behavior SPEC (the original 88 were ported from the Python suite's 81; the MCP server added 27, 2026-07-28 compliance added 22 more in tests/mcp_protocol_test.rs, the 2026-08-25 issue sweep added 21 across tests/audio_test.rs, tests/model_test.rs and tests/mcp_status_test.rs, and the warm-up follow-ups added 4 in tests/mcp_status_test.rs plus 4 schema-drift guards in tests/mcp_schema_test.rs). A behavior change requires consciously changing the corresponding test — never "fix" a test to make code pass.
  • stdout stays clean. All progress, logs, and summaries go to stderr. The one exception is harken mcp, where stdout is the protocol channel: it carries only newline-delimited JSON-RPC frames, and logs still go to stderr.
  • Exit codes: 0 ok (skips are not failures), 1 at least one transcription failed, 2 input error (bad path, bad date, no chat log).
  • Tests stay offline. The batch pipeline is generic over the Transcriber trait; tests use FakeEngine (tests/common/mod.rs). Never write a test that downloads a model, loads a real whisper context, or touches the network.

Read the full file on GitHub · 163 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. 8d ago First seen · 163 lines · 2,689 tokens per session scan A 0dda963c93a4

Subscribe to this mod's changes

harken CLAUDE.md is an instructions file published in the GitHub repository montezuma-p/harken (13 stars, last pushed 7d ago), licensed Apache-2.0. It adds 2,689 tokens to every session, about $0.0134 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 instructions, from other repositories

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,153 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens