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 skills add MuhammadUsmanGM/claude-code-best-practices --skill add-handlergit clone --depth 1 https://github.com/MuhammadUsmanGM/claude-code-best-practicesWrote 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/skills/muhammadusmangm/claude-code-best-practices/add-handler)<a href="https://agentmods.dev/skills/muhammadusmangm/claude-code-best-practices/add-handler"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/add-handler/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/skills/muhammadusmangm/claude-code-best-practices/add-handler"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/add-handler.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.00052 | $0.00754 |
| Opus 5.5 | $0.00021 | $0.00302 |
| Sonnet 5.5 | $0.00010 | $0.00151 |
| Haiku 4.5 | $0.00005 | $0.00075 |
Grade A, and why
add-handler 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 1mo 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Handler
Add a new HTTP handler across the layers the project already uses. Don't invent a layer that isn't there.
Steps
- Clarify once (if not given): method + path, what it does, and the response shape.
- Read one existing handler in
internal/api/and its matching test and service function. Mirror the style: error handling, context usage, response helpers. - Edit files in this order:
internal/model/<resource>.go— domain type, if new.internal/store/<resource>.go— store method signature on the interface and the concrete implementation. Stop here if the operation doesn't need storage.internal/service/<resource>.go— the service function. Takes a context, returns the domain type and an error. Nohttpimports.internal/api/<resource>.go— the handler. Decodes input, calls the service, maps errors to status codes, encodes output.internal/api/<resource>_test.go— a table-driven test exercising happy path and one input-validation failure.
- Wire the route in the router setup (usually
cmd/<service>/main.goorinternal/api/router.go) only if adding a new path. - Run
go build ./...thengo test ./internal/api/...and report the outcome.
Default shape
// internal/api/widgets.go
func (s *Server) createWidget(w http.ResponseWriter, r *http.Request) {
var in WidgetCreate
if err := json.NewDecoder(r.Body).Decode(&in); err != nil {
http.Error(w, "invalid body", http.StatusBadRequest)
return
}
widget, err := s.svc.CreateWidget(r.Context(), in)
if err != nil {
s.writeErr(w, err) // maps domain errors to status codes
return
}
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusCreated)
_ = json.NewEncoder(w).Encode(widget)
}
// internal/api/widgets_test.go
func TestCreateWidget(t *testing.T) {
cases := []struct {
name string
body string
wantStatus int
}{
{"happy", `{"name":"gizmo"}`, http.StatusCreated},
{"empty name", `{"name":""}`, http.StatusBadRequest},
}
for _, tc := range cases {
t.Run(tc.name, func(t *testing.T) {
// ...
})
}
}
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.
- 1mo ago First seen · 84 lines · 52 tokens per session scan A 21c779f2364f
add-handler is a skill published in the GitHub repository MuhammadUsmanGM/claude-code-best-practices (97 stars, last pushed 1mo ago), licensed MIT. It adds 52 tokens to every session and 754 once invoked, about $0.0002 per session on Opus 5.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 skills, from other repositories
qa-api-testing-contracts
Tests API contracts for REST, GraphQL, gRPC, AsyncAPI, and webhooks. Use when adding schema validation or breaking-change gates (Pact, can-i-deploy, oasdiff, buf); not API design.
proof-api
Build API test suites — endpoint testing, contract testing, load testing for REST/GraphQL/gRPC APIs. Use when asked to "test this API", "API tests", "endpoint testing", "contract tests", or "load test".
architecture-patterns
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or…
web3-testing
Test smart contracts comprehensively using Hardhat and Foundry with unit tests, integration tests, and mainnet forking. Use when testing Solidity contracts, setting up blockchain test suites, or validating DeFi protocols.
screen-reader-testing
Test web applications with screen readers including VoiceOver, NVDA, and JAWS. Use when validating screen reader compatibility, debugging accessibility issues, or ensuring assistive technology support.
event-store-design
Design and implement event stores for event-sourced systems. Use when building event sourcing infrastructure, choosing event store technologies, or implementing event persistence patterns.