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.
npx agentmods add instructions/bmentges/django-cart/claude-mdgit clone --depth 1 https://github.com/bmentges/django-cartWrote 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.
[](https://agentmods.dev/instructions/bmentges/django-cart/claude-md)<a href="https://agentmods.dev/instructions/bmentges/django-cart/claude-md"><img src="https://agentmods.dev/badge/instructions/bmentges/django-cart/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.06118 | $0.06118 |
| Opus 5 | $0.03059 | $0.03059 |
| Sonnet 5 | $0.01224 | $0.01224 |
| Haiku 4.5 | $0.00612 | $0.00612 |
Grade A, and why
django-cart 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.
How it starts
The opening of the file, as written. The whole thing — 517 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
Guidance for Claude Code when working in this repository. Conversational rules
shared by the maintainer already live under .claude/rules/; this file covers
project-specific architecture, conventions, and gotchas that are not
derivable from the code in seconds.
1. What this project is
django-cart is a lightweight, session-backed shopping cart library for Django
4.2+. It is distributed on PyPI and has been maintained since ~2012. The public
API surface is the Cart class in cart/cart.py; everything else (models,
templatetags, signals, pluggable calculators) exists to support that class.
- Package name on PyPI:
django-cart - Importable app name:
cart(notdjango_cart) - Python: 3.10+, Django: 4.2+ (CI matrix up to Py 3.14 / Dj 6.0)
- Current version: see
pyproject.toml(versionfield). Bump this when releasing; CI publishes on tag push. - License: MIT (
LICENSE). Relicensed from LGPL-3.0 in v3.0.11 — seeCHANGELOG.mdfor the rationale. Copying code in from other MIT / BSD / Apache-2.0 projects is fine; avoid copying from GPL / LGPL / AGPL sources without clearing it first.
2. Repository map
cart/ # the installable Django app
├── __init__.py # (legacy default_app_config — see gotcha §7.1)
├── apps.py # CartConfig
├── admin.py # CartAdmin + ItemInline (Discount NOT registered — §7.7)
├── cart.py # Cart class + exceptions + CART_ID — main API
├── models.py # Cart, Item (GFK), ItemManager, Discount, DiscountType
├── signals.py # 5 Django signals (optional import in cart.py)
├── session.py # CartSessionAdapter, DjangoSessionAdapter, CookieSessionAdapter
│ # ⚠️ declared but NOT wired into Cart — see §7.2
├── tax.py # TaxCalculator base + DefaultTaxCalculator + get_tax_calculator()
├── shipping.py # ShippingCalculator base + default + factory
├── inventory.py # InventoryChecker base + default + factory
├── templatetags/cart_tags.py # cart_item_count, cart_summary, cart_is_empty, cart_link
├── management/commands/clean_carts.py # cron-friendly purge command
├── migrations/ # 0001..0005 — do NOT squash without version bump
└── views.py # intentionally empty
tests/
├── settings.py # used by pytest (pyproject sets DJANGO_SETTINGS_MODULE)
├── urls.py # admin only — most tests don't hit HTTP
├── test_app/ # FakeProduct + FakeProductNoPrice (test-only product models)
├── fixtures/fake_products.json # present but UNUSED by tests (§7.9)
├── test_cart.py # ~2200 lines, 177 tests — the bulk of the suite
├── test_v300.py # discounts/tax/shipping/inventory (64 tests)
├── test_integration.py # "integration" — still uses MagicMock requests (§7.3)
├── test_performance.py # 3 loose timing benchmarks
├── test_session.py # session adapters (14 tests)
├── test_signals.py # 7 tests
└── test_templatetags.py # 13 tests
docs/
├── PROJECT_ANALYSIS.md # Mar 2026 analysis (partly stale — ref v2.2.13)
├── PROJECT_ANALYSIS_2026_03_29_0243am.md # earlier snapshot
└── ROADMAP.md # thin "future considerations" list
pyproject.toml # pytest + coverage config (runtests.py deleted in Phase 8; .coveragerc folded in at Phase 0)
.pre-commit-config.yaml # black, isort, flake8, mypy — NOT run in CI (§7.8)
.github/workflows/ci.yml # test matrix + publish-on-tag to PyPI
.github/dependabot.yml # weekly pip + gh-actions updates
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.
- 6d ago First seen · 517 lines · 6,118 tokens per session scan A 1bba8c23faad
django-cart CLAUDE.md is an instructions file published in the GitHub repository bmentges/django-cart (333 stars, last pushed 1mo ago), licensed MIT. It adds 6,118 tokens to every session, about $0.0306 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.
Other instructions, from other repositories
vibetags com-example-service-OrderService.instructions.md
Instructions for PIsberg/vibetags, covering copilot instructions for orderservice, rules for method calculatetax, rules for method processpayment, rules for method validateorder and context & focus.
rubydex AGENTS.md
AGENTS.md instructions for Shopify/rubydex, covering instructions, project overview, documentation, ruby gem and structure.
hw-mcp CLAUDE.md
Instructions for Hertwill/hw-mcp, covering project, constraints, technology stack, executive recommendation and recommended stack.
VectorCart copilot-instructions.md
Copilot instructions for Rounit-1st/VectorCart, covering vectorcart shopping assistant — llm instructions, role, 1. understand the customer, 2. convert the request into search inputs and visual search query.
gengeo-agent-registry AGENTS.md
Instructions for warwickwood-cell/gengeo-agent-registry: GenGEO provides machine-readable merchant verification infrastructure for AI agents.
kronan-mcp CLAUDE.md
Instructions for sandsower/kronan-mcp, covering kronan-mcp, build, configure, usage in claude code and api reference.