defog CLAUDE.md

defog CLAUDE.md is an instructions file for coding agents from defog-ai/defog. It costs 607 tokens per session, scanned A, original, MIT.

A project instruction file describing how an agent should behave while working on the defog-ai/defog codebase. It covers documentation updates, code checks, pull-request reviews, and model use.

In plain words
What is it for?
Use it when contributing to defog-ai/defog, especially when changing code, updating docs, running lint checks, or reviewing pull requests.
Why use it?
It gives the agent project-specific expectations that general coding instructions may not include. This helps keep changes, reviews, and documentation consistent with the repository.

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

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/defog-ai/defog/claude-md.svg)](https://agentmods.dev/instructions/defog-ai/defog/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/defog-ai/defog/claude-md"><img src="https://agentmods.dev/badge/instructions/defog-ai/defog/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 607 This file is loaded in full into every session.
When invoked 607 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.1 $0.00607 $0.00607
Opus 5 $0.00303 $0.00303
Sonnet 5 $0.00121 $0.00121
Haiku 4.5 $0.00061 $0.00061

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

Security

Grade A, and why

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

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 · 34 lines

What it actually says

General Behaviour

  • Do not be obsequious. Do not say "You are absolutely right" or "You are right". You do not have to please the user – you just need to make the code work.
  • Do NOT use emotional words or exclaimations like "Perfect!", or "Great!". Be more stoic

Updating documentation

  • After you implement or change code, always remember to check if you need to update documentation. Documentation is in README.md and in the docs/ folder

Linting and Checking

  • Use ruff check to make sure your implementations are not broken
  • Use ruff format for code formatting

Reviewing PRs

  • Be honest, technically focused, and blunt. Pay special attention to security issues.

Using LLMs

  • Recall that this is 2025 and that new LLM models have been released.
    • Claude 4 Sonnet and Claude 4 Opus are now valid models
    • OpenAI's gpt-4.1, o3, and o4-mini are now valid models
    • Gemini's 2.5 flash and 2.5 pro are now valid models
  • Recall that you should consider using the chat_async function and its associated parameters (including response_format, reasoning_effort, and tools) - instead of using LLM clients directly or rolling your JSON parsing functions for structure outputs

Testing

  • Remember to run all tests with python -m pytest .... This is to ensure you are using the correct version of python and pytest
  • Add PYTHONPATH=. when running tests, so that the tests/examples use the version of defog in this repo - instead of the machine installed version
  • Use the --envfile .env argument to load environment variables (API keys etc.) when running tests
  • Try to run scoped tests that directly affect changed code instead of running all tests at once

Model Pricing

  • Prices live in defog/llm/cost/models.py as per-1k-token rates.
  • When adding or updating an entry, use ONLY the provider's official pricing page:
  • Convert the published per-1M-token numbers to per-1k (divide by 1000). Keys are input_cost_per1k, cached_input_cost_per1k, output_cost_per1k, and (for Anthropic) cache_creation_input_cost_per1k.
  • Do not infer prices from neighbouring entries or prior versions. A newer tier name (e.g. gpt-5.4-mini) does not necessarily share pricing with the matching gpt-5-mini entry — look each model up on the source page.
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 · 34 lines · 607 tokens per session scan A 5c787c3f3bb0

Subscribe to this mod's changes

defog CLAUDE.md is an instructions file published in the GitHub repository defog-ai/defog (55 stars, last pushed 13d ago), licensed MIT. It adds 607 tokens to every session, about $0.0030 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

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,182 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

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

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

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

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