pruner: Instructions file for Claude Code

CLAUDE.md

pruner CLAUDE.md is an instructions file for Claude Code from heikki-laitala/pruner. It costs 608 tokens per session, scanned A, original, MIT.

A set of Claude Code instructions for the Pruner project, a tool that selects relevant code files, symbols, and execution paths for a coding agent. The instructions cover simple design, avoiding unnecessary features, test-first development, and secure handling of secrets and system access.

In plain words
What is it for?
Use it when working on Pruner, especially for changes to its code-ranking or context suggestions, to follow the project's testing, design, validation, and security practices.
Why use it?
It gives the coding agent project-specific rules for making and checking changes. Test-driven development, or TDD, means writing a failing test first, then implementing the change and refactoring it.

Instructions file for Claude Code

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

This is heikki-laitala/pruner's own configuration. It tells Claude Code how to work on pruner 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 pruner configures →

Reuse

Borrowing it

Nothing to install: this file belongs to heikki-laitala/pruner. 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/heikki-laitala/pruner/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/heikki-laitala/pruner

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/heikki-laitala/pruner/claude-md/github.svg)](https://agentmods.dev/instructions/heikki-laitala/pruner/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/heikki-laitala/pruner/claude-md"><img src="https://agentmods.dev/badge/instructions/heikki-laitala/pruner/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pruner CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/heikki-laitala/pruner/claude-md"><img src="https://agentmods.dev/badge/instructions/heikki-laitala/pruner/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 608 This file is loaded in full into every session.
When invoked 608 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.00608 $0.00608
Opus 5.5 $0.00243 $0.00243
Sonnet 5.5 $0.00122 $0.00122
Haiku 4.5 $0.00061 $0.00061

Measured 1mo ago against content hash 817d03c19f42, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pruner 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 1mo 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 · 70 lines

How it starts

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

Pruner

Pre-computed code context engine for AI coding agents. Tree-sitter call graphs + keyword matching, no LLM. Injects relevant files, symbols, and execution paths via Claude Code hook.

Engineering Principles

KISS

Prefer straightforward control flow. Keep error paths obvious and localized.

YAGNI

Do not add interfaces, config keys, or abstractions without a concrete caller. No speculative features.

DRY (Rule of Three)

Duplicate small local logic when it preserves clarity. Extract shared helpers only after three repeated, stable patterns.

TDD

Write tests first. Red → Green → Refactor. New features and bug fixes start with a failing test that defines the expected behavior before writing implementation code.

Secure by Default

Never log secrets or tokens. Validate at system boundaries. Keep network/filesystem/shell scope narrow.

Validating Changes

When changing scoring, ranking, context output, or anything that affects pruner's suggestions:

  1. Posthoc analysis first (~5 seconds, no API calls):

    cargo build --release
    python3 tests/posthoc_analysis.py tests/ab-tests/sonnet_nest_oneshot_n10_v027_20260406.json --repo /tmp/pruner-bench/nest --pruner ./target/release/pruner
    

    Check: did recall improve? Did precision change? Which files are still missed?

  2. Fast A/B test if posthoc looks good (~15-20 min, ~$1-2):

    python3 tests/ab_test.py --fast --task implement --rounds 5 --save-raw --validate-cache
    

    Check: did cost/tools/time improve in real Claude sessions?

  3. Full A/B test for final validation (~45 min, ~$5):

    python3 tests/ab_test.py --save-raw --validate-cache
    

Step 1 replaces a 20+ min A/B test with a 5-second offline check. Only proceed to step 2 when posthoc shows improvement. Step 3 is for release validation only.

The test repos need to be cloned first (the A/B test harness does this automatically, or manually: git clone https://github.com/nestjs/nest.git /tmp/pruner-bench/nest).

Read the full file on GitHub · 70 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. 1mo ago First seen · 70 lines · 608 tokens per session scan A 817d03c19f42

Subscribe to this mod's changes

pruner CLAUDE.md is an instructions file published in the GitHub repository heikki-laitala/pruner (16 stars, last pushed 4mo ago), licensed MIT. It adds 608 tokens to every session, about $0.0024 per session on Opus 5.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-09-26.

Related

Other instructions, from other repositories