Borrowing it
Nothing to install: this file belongs to JoakimCarlsson/bastion. 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/JoakimCarlsson/bastion/main/.claude/agents/_bastion-conventions.mdgit clone --depth 1 https://github.com/JoakimCarlsson/bastionWrote 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/agents/joakimcarlsson/bastion/_bastion-conventions)<a href="https://agentmods.dev/agents/joakimcarlsson/bastion/_bastion-conventions"><img src="https://agentmods.dev/badge/agents/joakimcarlsson/bastion/_bastion-conventions/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/agents/joakimcarlsson/bastion/_bastion-conventions"><img src="https://agentmods.dev/badge/agents/joakimcarlsson/bastion/_bastion-conventions.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.00000 | $0.00746 |
| Opus 5 | $0.00000 | $0.00373 |
| Sonnet 5 | $0.00000 | $0.00149 |
| Haiku 4.5 | $0.00000 | $0.00075 |
Grade A, and why
_bastion-conventions scanned grade A with 1 finding 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 9d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
2. **New or changed API routes:** start the API (`go run ./cmd/api`, `docker compose up`, or `commands_to_verify.serve`), then **`curl` every new/changed endpoint** — record status and body; compare to acceptance criteri 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.
Bastion conventions (all delivery agents)
Read repo-root AGENTS.md first, then docs/backend-architecture.md, then LEARNINGS.md, before planning or implementing.
Verification — mandatory E2E
- Everything observable must be verified end-to-end. Unit tests alone are not enough for HTTP APIs or running services.
- New or changed API routes: start the API (
go run ./cmd/api,docker compose up, orcommands_to_verify.serve), thencurlevery new/changed endpoint — record status and body; compare to acceptance criteria. - smoke-tester must not mark pass without live endpoint evidence when the issue touches HTTP.
- coder must list every new/changed route in its handoff with concrete
expectvalues.
Architecture (Go)
Package by subsystem (bounded context), not by layer. Top-level dirs under internal/ are domain slices. Flat packages with many .go files; sub-folders only when a sub-feature has its own vocabulary and ~10+ files.
Forbidden:
internal/
controllers/
services/
repositories/
models/
Layout:
bastion/
cmd/api/main.go
deps/minmux/ # git submodule
migrations/
docs/backend-architecture.md
internal/
health/ # pure domain
http/ # minmux routes, static SPA
store/ # DB pool + migrate
web/ # Bun + React SPA — all frontend here
| Rule | Detail |
|---|---|
| Domain purity | internal/<subsystem>/ — no net/http, no HTTP request DTOs |
| HTTP | internal/http/*_endpoint.go per subsystem; minmux routes |
| SQL | internal/<subsystem>/store.go — not internal/repositories/ |
| Shared DB | internal/store/ — pool + migrate only |
main.go |
Wiring only — env, pool, http.NewHandler, listen |
When adding a subsystem: domain package → optional store.go → http/<name>_endpoint.go → wire in NewHandler. Mirror internal/health + health_endpoint.go.
Pipeline note
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.
- 9d ago First seen · 56 lines · 0 tokens per session scan A cefa34c260c5
_bastion-conventions is an agent published in the GitHub repository JoakimCarlsson/bastion (2 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 746 tokens. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
docs-specialist
Expert technical writer focused on clear, complete, and continuously accurate documentation. Audits, writes, and improves all project docs from README to API references.
ijfw-accessibility-reviewer
Design-phase WCAG 2.1 AA review of UI artefacts: contrast, semantics, focus, ARIA. Trigger per design review pass.
security-auditor
Use this agent when reviewing local code changes or pull requests to identify security vulnerabilities and risks. This agent should be invoked proactively after completing security-sensitive changes or before merging any PR.
evidence-cohort-teacher
Produces one bounded, review-only SKILL.md body proposal from an already-selected local evidence cohort.
cpp-build-resolver
C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.
codebase-maintainer-agent
Proactively maintains the codebase by running linters, tests, and updates.