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-endpointgit 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-endpoint)<a href="https://agentmods.dev/skills/muhammadusmangm/claude-code-best-practices/add-endpoint"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/add-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/skills/muhammadusmangm/claude-code-best-practices/add-endpoint"><img src="https://agentmods.dev/badge/skills/muhammadusmangm/claude-code-best-practices/add-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.00048 | $0.00670 |
| Opus 5.5 | $0.00019 | $0.00268 |
| Sonnet 5.5 | $0.00010 | $0.00134 |
| Haiku 4.5 | $0.00005 | $0.00067 |
Grade A, and why
add-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 28d 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 — 68 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add Endpoint
Add a new HTTP endpoint across the layers the project already uses. Don't invent a layer that isn't there.
Steps
- Clarify once (if not given): method + path, request shape, response shape, and status codes for success and failure.
- Read one existing endpoint end to end — handler, service function, repository method, and their tests. Mirror the style exactly: error mapping, extractor order, naming.
- Edit files in this order:
src/models/<resource>.rs— request/response types, if new. DeriveDebug, Serialize, Deserializeandserde(rename_all = "camelCase")on API-facing structs.src/repositories/<resource>.rs— store method with a compile-time checkedsqlx::query_as!(or stop here if no storage is needed).src/services/<resource>.rs— the business function. Takes domain types, returnsResult<_, AppError>. No HTTP or SQLx types.src/routes/<resource>.rs— the handler. Extractors in, service call, mapAppErrorvia the sharedIntoResponseimpl, wrap the response.src/routes/<resource>.rstests — happy path plus one validation failure, using the existing test helpers.
- Wire the route in the router setup only if adding a new path.
- Run
cargo fmt, thencargo clippy -- -D warnings, thencargo test <resource>. Report the outcome. Do not commit.
Default shape
// src/routes/widgets.rs
pub async fn create_widget(
State(state): State<AppState>,
Json(payload): Json<CreateWidgetRequest>,
) -> Result<impl IntoResponse, AppError> {
let widget = state.widget_service.create(payload).await?;
Ok((StatusCode::CREATED, Json(widget)))
}
// src/routes/widgets.rs (test)
#[tokio::test]
async fn create_widget_returns_201() {
// build app state from the existing test helpers
// assert status and decoded body shape
}
Rules
- No new dependencies.
Cargo.tomlis reviewed. - No
unwrap()orexpect()in the new code — tests included if a fixture can fail realistically. - Handlers stay thin: decode, delegate, encode. Business logic belongs in the service.
- If the endpoint needs a new repository method, define the signature where the service consumes it, implement it in the repository module.
- Follow the project's existing response-envelope convention, if it has one. Don't introduce a second response shape.
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.
- 28d ago First seen · 68 lines · 48 tokens per session scan A 10b1a0306628
add-endpoint is a skill published in the GitHub repository MuhammadUsmanGM/claude-code-best-practices (94 stars, last pushed 28d ago), licensed MIT. It adds 48 tokens to every session and 670 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-09-16.
Other skills, from other repositories
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.
temporal-python-testing
Test Temporal workflows with pytest, time-skipping, and mocking strategies. Covers unit testing, integration testing, replay testing, and local development setup. Use when implementing Temporal workflow tests or debugging test failures.
data-quality-frameworks
Implement data quality validation with Great Expectations, dbt tests, and data contracts. Use when building data quality pipelines, implementing validation rules, or establishing data contracts.
dbt-transformation-patterns
Master dbt (data build tool) for analytics engineering with model organization, testing, documentation, and incremental strategies. Use when building data transformations, creating data models, or implementing analytics engineering best practices.
principle-test-behavior-not-implementation
Apply when you write, change, or keep a test. Call the code as its users do and assert the exact result they see. Rewrite or delete a test that would pass if every imported function returned undefined.
flutter-bloc-state-management
Implement BLoC/Cubit state, events, transitions, and async concurrency in Flutter. Use for BLoC/Cubit feature logic, debounced/cancellable events, state rendering, or bloc tests—not generic widget-only work.