build-context

build-context is a command for coding agents from latestaiagents/agent-skills. It costs 12 tokens per session (666 once invoked), scanned A, original, MIT.

A command that scans a codebase and creates a CLAUDE.md file with project guidance for AI assistants.

In plain words
What is it for?
Use it to document a project's language, framework, dependencies, directory layout, entry points, and coding conventions.
Why use it?
AI assistants often need project-specific details such as structure, tools, conventions, and important files. Recording this context helps them work with the codebase more accurately.

Command

Part of the latestaiagents plugin — 47 skills, 10 commands, 7 plugins shipped together

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 commands/latestaiagents/agent-skills/build-context
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Or install latestaiagents, the plugin that ships this one along with the rest of its 47 skills, 10 commands, 7 plugins.

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 build-context

README.md
[![agentmods](https://agentmods.dev/badge/commands/latestaiagents/agent-skills/build-context.svg)](https://agentmods.dev/commands/latestaiagents/agent-skills/build-context)
Your own site
<a href="https://agentmods.dev/commands/latestaiagents/agent-skills/build-context"><img src="https://agentmods.dev/badge/commands/latestaiagents/agent-skills/build-context.svg" alt="Measured on agentmods" height="20"></a>
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 666 The whole file, excluding the scripts and references it only reads on demand.
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.00012 $0.00666
Opus 5 $0.00006 $0.00333
Sonnet 5 $0.00002 $0.00133
Haiku 4.5 $0.00001 $0.00067

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

Security

Grade A, and why

build-context 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 5d 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.

commands/build-context.md · 108 lines

How it starts

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

/build-context

Create an optimal CLAUDE.md context file for your codebase.

What is CLAUDE.md?

A CLAUDE.md file in your project root gives AI assistants essential context about your codebase. It helps AI:

  • Understand your project structure
  • Follow your coding conventions
  • Use the right frameworks and patterns
  • Avoid common mistakes specific to your project

I'll Analyze Your Codebase

Let me scan your project to generate a CLAUDE.md. I'll look at:

  1. Project type - Framework, language, architecture
  2. Directory structure - Where things live
  3. Key files - Entry points, config, important modules
  4. Dependencies - Libraries you're using
  5. Conventions - Code style, naming patterns

Generated CLAUDE.md Template

# Project Context

## Overview
[One paragraph describing what this project does]

## Tech Stack
- **Language:** [TypeScript/Python/etc.]
- **Framework:** [Next.js/Django/etc.]
- **Database:** [PostgreSQL/MongoDB/etc.]
- **Key libraries:** [List important dependencies]

## Project Structure

src/ ├── components/ # React components ├── pages/ # Next.js pages (file-based routing) ├── lib/ # Shared utilities ├── api/ # API routes └── types/ # TypeScript definitions


## Key Files
- `src/lib/db.ts` - Database connection and queries
- `src/lib/auth.ts` - Authentication logic
- `src/types/index.ts` - Shared type definitions

## Coding Conventions
- Use TypeScript strict mode
- Prefer functional components with hooks
- Use named exports, not default exports
- Error messages should be user-friendly

## Commands
- `npm run dev` - Start development server
- `npm run test` - Run tests
- `npm run build` - Production build

## Common Patterns

### API calls
```typescript
// Use the fetcher from lib/api
import { fetcher } from '@/lib/api';
const data = await fetcher('/api/users');

Database queries

// Use Prisma client from lib/db
import { prisma } from '@/lib/db';
const users = await prisma.user.findMany();

Things to Avoid

  • Don't use any type - define proper interfaces
  • Don't commit .env files
  • Don't use console.log in production code
  • Don't make database calls in components (use API routes)

Testing

  • Tests are in __tests__/ directories
  • Use React Testing Library for components
  • Mock external APIs in tests

Read the full file on GitHub · 108 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. 5d ago First seen · 108 lines · 12 tokens per session scan A d1a028d6f131

Subscribe to this mod's changes

build-context is a command published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 12 tokens to every session and 666 once invoked, about $0.0001 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-31.