learn

A codebase analysis command that records the real ways a project handles errors, tests, imports, and modules in a patterns.md file.

In plain words
What is it for?
Use it when joining a project, documenting conventions, or checking how new code should fit existing patterns.
Why use it?
It gives developers a project-specific guide without filling it with generic advice that the code does not use.

Command for Claude Code

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/codeverbojan/claude-code-kickstart/learn
Clone the repo
git clone --depth 1 https://github.com/codeverbojan/claude-code-kickstart

Made for: Claude Code.

Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 982 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 $0.00013 $0.00982
Opus 5 $0.00006 $0.00491
Sonnet 5 $0.00003 $0.00196
Haiku 4.5 $0.00001 $0.00098

Measured yesterday against content hash 774e0c998583, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

learn 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 yesterday.

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/commands/learn.md · 116 lines

How it starts

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

Learn Project Patterns

Analyze this codebase and generate (or update) patterns.md at the project root. Do NOT ask questions — discover everything from the code. Do NOT write generic advice — only document patterns that actually exist in this codebase.

What to Extract

For each category below, search the codebase for real examples. If a pattern doesn't exist in this project, skip that category entirely.

1. Error Handling

  • How are errors created? (custom error classes, error factories, Result types)
  • How are errors caught? (try/catch, middleware, error boundaries)
  • Where is the error handler? (file path + pattern)
  • Example: "All API routes use try/catch → AppError → errorHandler middleware"

2. Test Structure

  • Where do tests live? (co-located, __tests__/, tests/, test/)
  • What framework? (vitest, jest, pytest, go test)
  • Fixtures/mocks: where and how?
  • Is the DB mocked or real in tests?
  • Example: "Tests mirror src/. Fixtures in fixtures/. Real test DB, no mocks."

3. Import / Module Patterns

  • Path aliases? (check tsconfig.json paths, pyproject.toml, go.mod)
  • Barrel exports? (index.ts files that re-export)
  • Circular dependency patterns to avoid?
  • Example: "@/ maps to src/. Each module has index.ts barrel export."

4. API / Route Patterns

  • Route file structure (file-based routing, controller pattern, etc.)
  • Middleware chain (auth → validate → handler → error)
  • Request/response types (Zod schemas, Pydantic, typed structs)
  • Example: "app/api/[resource]/route.ts. Auth middleware in middleware.ts."

5. Component Patterns (if frontend)

  • Server vs client component split
  • Styling approach (CSS Modules, Tailwind, styled-components)
  • State management (context, zustand, redux)
  • Naming conventions
  • Example: "Server components by default. 'use client' only in interactive/"

6. Database Patterns

  • ORM/query builder (Drizzle, Prisma, SQLAlchemy, sqlx)
  • Migration approach
  • Naming conventions (snake_case tables, camelCase fields?)
  • Example: "Drizzle ORM. Migrations in packages/db/migrations/."

Read the full file on GitHub · 116 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. yesterday First seen · 116 lines · 13 tokens per session scan A 774e0c998583

Subscribe to this mod's changes

learn is a command published in the GitHub repository codeverbojan/claude-code-kickstart (2 stars, last pushed 4mo ago), licensed MIT. It adds 13 tokens to every session and 982 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.