docfork CLAUDE.md

Repository instructions for Docfork, a monorepo containing multiple related packages and IDE plugins. They list commands for building, testing, linting, formatting, and checking types across the project or within one package.

In plain words
What is it for?
Running Docfork’s checks, working on individual packages, and following its TypeScript, pnpm, and Turborepo setup.
Why use it?
They give the coding agent the project’s expected commands and structure before it changes code or commits work.

Instructions file

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/docfork/docfork/claude-md
Clone the repo
git clone --depth 1 https://github.com/docfork/docfork
Per session 711 This file is loaded in full into every session.
When invoked 711 The same file — it is already loaded in full.
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.00711 $0.00711
Opus 5 $0.00356 $0.00356
Sonnet 5 $0.00142 $0.00142
Haiku 4.5 $0.00071 $0.00071

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

Security

Grade A, and why

docfork 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 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.

CLAUDE.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 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.

Commands

Root (monorepo)

pnpm build            # Build all packages (turbo)
pnpm dev              # Start all dev servers
pnpm lint             # Lint all packages
pnpm lint:check       # Check linting (CI)
pnpm format           # Format all code
pnpm format:check     # Check formatting (CI)
pnpm typecheck        # Type-check all packages
pnpm test             # Run all tests
pnpm clean            # Clean all dist/node_modules

Package-scoped

pnpm --filter dgrep build
pnpm --filter dgrep typecheck
pnpm --filter dgrep test
pnpm --filter docfork build        # MCP server package
pnpm --filter docfork typecheck

Before committing

pnpm lint:check && pnpm typecheck

Architecture

Monorepo structure

docfork/
├── packages/
│   ├── mcp/       # MCP server (npm: docfork, v2.1.0)
│   └── dgrep/     # Documentation grounding CLI (npm: dgrep, v0.1.0-alpha)
└── plugins/       # IDE plugins

Package manager: pnpm v9.0.0+ with workspaces Build orchestration: Turborepo TypeScript: Strict mode, ES2022 target, Node16 module resolution

MCP server (packages/mcp/)

Docfork MCP server supporting stdio and HTTP transports. Published to npm as docfork. Has its own API client in src/api/ — intentionally isolated from dgrep.

dgrep CLI (packages/dgrep/)

Documentation context CLI. Alpha stage. Uses obuild for single-file bundling (zero runtime node_modules). Has its own standalone API client — will migrate to ConnectRPC when api-v2 is ready.

Code Style

Formatting (Prettier)

Print width: 100, tab width: 2, semicolons: true, double quotes, trailing commas: all.

TypeScript

  • Strict mode. Prefer unknown over any.
  • ESM only ("type": "module" in all packages).

Naming

  • Files: kebab-case. Types/Interfaces: PascalCase. Variables/functions: camelCase.
  • Constants: SCREAMING_SNAKE_CASE.

Read the full file on GitHub · 97 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. 2d ago First seen · 97 lines · 711 tokens per session scan A 0f643a237e31

Subscribe to this mod's changes

docfork CLAUDE.md is an instructions file published in the GitHub repository docfork/docfork (488 stars, last pushed 2mo ago), licensed MIT. It adds 711 tokens to every session, about $0.0036 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.