Borrowing it
Nothing to install: this file belongs to albertoarena/laravel-truss. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/albertoarena/laravel-truss/main/CLAUDE.mdgit clone --depth 1 https://github.com/albertoarena/laravel-trussWrote 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/albertoarena/laravel-truss/claude-md)<a href="https://agentmods.dev/instructions/albertoarena/laravel-truss/claude-md"><img src="https://agentmods.dev/badge/instructions/albertoarena/laravel-truss/claude-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/albertoarena/laravel-truss/claude-md"><img src="https://agentmods.dev/badge/instructions/albertoarena/laravel-truss/claude-md.svg" alt="Reviewed on agentmods" width="80" 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.01469 | $0.01469 |
| Opus 5 | $0.00734 | $0.00734 |
| Sonnet 5 | $0.00294 | $0.00294 |
| Haiku 4.5 | $0.00147 | $0.00147 |
Grade A, and why
laravel-truss 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 11d 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 — 56 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md — Instructions for Claude Code
Project Overview
Package: albertoarena/laravel-truss
Type: Laravel Composer package
Purpose: A live database structure viewer. Scans migrations, builds a cached schema snapshot, and renders it as a scrollable, zoomable ER diagram inside the app. Structure only, no data is ever exposed.
License: MIT
Stack
- PHP 8.2+ (lowered from 8.3 in v1.10, matching what Laravel 12 requires; see
docs/adr/0001-php-82-minimum.md) - Laravel 12+
- Pest for testing
- Laravel native schema introspection (
Schema::getTables/getColumns/getIndexes/getForeignKeys) — no Doctrine DBAL - Mermaid.js for diagram rendering (no build step)
spatie/laravel-package-toolsfor package scaffolding
Commands
composer test— run the Pest suitecomposer lint— Laravel Pint (code style check)composer lint:fix— fix Pint issues automaticallynpm test— Vitest unit tests for the client-side diagram logic (resources/js)npx playwright test— browser tests for the dashboard (tests/e2e)npm run test:a11y— accessibility specs only (keyboard operation + an axe-core WCAG scan); also its own CI stepphp artisan truss:show— print the database structure as a terminal table (structure only)php artisan truss:open— open the Truss dashboard in the browserphp artisan truss:rebuild— manually rebuild the cached schema snapshotphp artisan truss:export— export the structure (dbml/json/csv/markdown/mermaid) for CI and tooling;--checkfails on drift
Frontend assets (JS/CSS + a vendored Mermaid) are served from the package via a gated {prefix}/assets/{file} route — no vendor:publish, no CDN. Set TRUSS_MERMAID_URL to load Mermaid from a CDN instead.
Conventions (always true)
- TDD is mandatory, and it is an ordering rule, not just a coverage rule. For every change (feature, fix, refactor), in this order: (1) write the test, (2) run it and watch it fail for the right reason (red), (3) write the implementation to make it pass (green). Writing production code before its test is a violation even if a passing test is added right afterwards: the test must exist and fail first. Never commit implementation without a corresponding test. No controller, command, class, or function is written before the test that drives it. PHP uses Pest; client-side code under
resources/jsuses Vitest for pure logic and Playwright for rendering/interaction. - No data exposed, ever. Only table, column, index, and foreign key structure. Never row contents. This is the package's core promise, treat it as a hard constraint, not a config default. The boundary is the
CREATE TABLEdefinition vs. table rows: column defaults count as structure and are in scope (seedocs/DECISIONS.md). - Introspection stays pure. Code under
src/Introspection/must have zero knowledge of HTTP, Blade, or Mermaid. It only builds and returns a schema representation. The detailed layer rules live in.claude/rules/introspection.md, which loads automatically when you touch that layer or its tests. - Config is the single source of truth for excluded tables, route path, cache TTL, per-connection settings, diagram styling, focus depth, the large-schema warning threshold, the route middleware stack, and the default viewer allow-list (
authorization.allowed_emails). Don't hardcode any of these. Authorization is a fixedviewTrussgate — the ability name is not configurable, and the gate callback is always the app's to override. The allow-list only feeds the default gate; it is not a renamable ability. The gate is consulted only in non-local environments (local is open), and a denial returns 404. Seedocs/DECISIONS.md→ Authorization: production-gated model. - Git commits:
type: short subject(max 50 chars), then a body paragraph explaining what and why, not how. Never include "Generated with Claude Code" or "Co-Authored-By: Claude". Use a heredoc for multi-line commit messages. - Docs stay in sync. Any change to commands, config, or user-facing behavior must be reflected in
README.mdanddocs/in the same change. The public docs site is a separate repo,albertoarena/laravel-truss-docs(published at trussphp.com); it tracks this package and must be updated there too, but it reads from the latest package release, so its update lands when the next release ships and the docs site rebuilds. - Roadmap check on every release. A release is not done until the public roadmap reflects it. When a release ships, review
src/data/roadmap.tsin thelaravel-truss-docsrepo and move whatever the release delivered into Shipped with its version. A partially delivered item is split: the shipped part moves to Shipped, the remainder stays in Approved next or Exploring (e.g. schema doctor Phase 1 shipped in v1.5.0 while the later phases stayed on the roadmap).
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.
- 11d ago First seen · 56 lines · 1,469 tokens per session scan A a05428e59880
laravel-truss CLAUDE.md is an instructions file published in the GitHub repository albertoarena/laravel-truss (275 stars, last pushed today), licensed MIT. It adds 1,469 tokens to every session, about $0.0073 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
plan-forge caching.instructions.md
Caching patterns for .NET — IDistributedCache, Redis, in-memory, cache-aside, TTL strategies.
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.
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.
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).
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.
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).