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.
git clone --depth 1 https://github.com/sigistry/marketplaceWrote 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/commands/sigistry/marketplace/harden-endpoint)<a href="https://agentmods.dev/commands/sigistry/marketplace/harden-endpoint"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/harden-endpoint/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/commands/sigistry/marketplace/harden-endpoint"><img src="https://agentmods.dev/badge/commands/sigistry/marketplace/harden-endpoint.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.00025 | $0.01110 |
| Opus 5 | $0.00013 | $0.00555 |
| Sonnet 5 | $0.00005 | $0.00222 |
| Haiku 4.5 | $0.00003 | $0.00111 |
Grade A, and why
harden-endpoint 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 10d 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 — 49 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Harden the endpoint(s) in $ARGUMENTS (a handler/controller/route file, or the file in the current diff) with the boilerplate that teams get subtly wrong: request validation, a consistent error envelope, safe retries, pagination, and rate-limit headers, each idiomatic to the detected stack. Load the error-envelope skill (validation + RFC 9457) and the idempotency-patterns skill (idempotency, pagination, rate limits). This is an additive edit: preserve existing behavior; add the guards around it.
Process
Step 1: Detect stack and endpoint shape
Read the file. Identify the framework and the validation library already in use (or the idiomatic one for the stack). Determine each route's method, path, params, and body, and whether the method is unsafe (POST/PATCH/PUT/DELETE) and non-idempotent by HTTP semantics (POST is the key case).
| Stack | Idiomatic validator | Error hook |
|---|---|---|
| Express/Koa (JS/TS) | Zod, Joi, express-validator, JSON Schema (Ajv) |
error middleware (err, req, res, next) |
| Fastify | JSON Schema (schema:), Zod via fastify-type-provider-zod |
setErrorHandler |
| NestJS | class-validator DTOs + ValidationPipe |
exception filter |
| FastAPI | Pydantic models | exception_handler / RequestValidationError |
| Django REST Framework | serializers (is_valid(raise_exception=True)) |
custom exception_handler |
| Flask | marshmallow/pydantic, webargs |
errorhandler |
| Spring Boot | Bean Validation (@Valid, @NotNull) |
@ControllerAdvice |
| Go (net/http/Gin) | go-playground/validator, binding: tags |
central error writer |
| Rails | strong params + model validations / dry-validation |
rescue_from |
Step 2: Add request validation
Validate params, query, and body at the boundary, reject unknown fields (strict/.strict()/forbid_extra_keys/additionalProperties: false), coerce/parse types, and enforce required vs optional. On failure, do not leak the raw validator error; map it into the error envelope (Step 3) with a 422/400 and a machine-readable list of field violations. See error-envelope references/validation-patterns.md.
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.
- 10d ago First seen · 49 lines · 25 tokens per session scan A b699b5cdefd4
harden-endpoint is a command published in the GitHub repository sigistry/marketplace (3 stars, last pushed today), licensed MIT. It adds 25 tokens to every session and 1,110 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.
Other commands, from other repositories
dotnet-harden
Scan and harden .NET backend code against high-impact anti-patterns such as sync-over-async, lifetime bugs, fat endpoints, and fragile SignalR state.
dotnet-critique
Deep architecture critique of pure .NET backend code. Evaluates AI slop, OOP/SOLID, layer boundaries, DI lifetimes, endpoints, SignalR, data access, concurrency, and distributed-system choices.
py-critique
Deep architecture critique of Python backend code. Evaluates AI slop, SOLID compliance, layer boundaries, anti-patterns, and design quality.
dotnet-structure
Analyze and recommend .NET backend solution and folder structure improvements. Checks projects, layers, oversized files, and boundary clarity.
f5-design
Generate design documents and specifications (D1-D4).
f5-backend
Backend development commands.