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 lingxling/awesome-skills-cn --skill api-security-best-practicesgit clone --depth 1 https://github.com/lingxling/awesome-skills-cnWrote 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/lingxling/awesome-skills-cn/api-security-best-practices)<a href="https://agentmods.dev/skills/lingxling/awesome-skills-cn/api-security-best-practices"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/api-security-best-practices/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/lingxling/awesome-skills-cn/api-security-best-practices"><img src="https://agentmods.dev/badge/skills/lingxling/awesome-skills-cn/api-security-best-practices.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.00029 | $0.02364 |
| Opus 5.5 | $0.00012 | $0.00946 |
| Sonnet 5.5 | $0.00006 | $0.00473 |
| Haiku 4.5 | $0.00003 | $0.00236 |
Grade A, and why
api-security-best-practices 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 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.
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 — 216 lines — stays where its author put it; the contents beside it link to each section on GitHub.
API Security Best Practices
Review the request boundary from caller identity through authorization, validated input, storage and observable response. Preserve the application's actual identity provider and data model rather than introducing a second authentication system.
When to Use
Use when adding a protected endpoint, reviewing object access, replacing permissive request parsing, or investigating an API abuse path. For a concrete defect, start with the failing route and its callers; do not deploy unrelated security infrastructure.
Inputs and prerequisites
Record the routes, caller/tenant model, identity provider, token contract, runtime and locked dependency versions, database schema, proxy topology and authorized test scope. Use synthetic identities in a test environment. Existing task authorization carries forward; production scans, account writes and message sends need their own authority. The Node examples below are integration sketches for Express, jsonwebtoken and Zod; application/database adapters are deliberately named rather than presented as a full runnable service. Confirm APIs against the installed versions before integrating.
1. Authenticate the exact token contract
Prefer the established provider/session middleware. When the service owns an HMAC JWT contract, require a strong server-owned key, a fixed algorithm, exact issuer and audience, and required runtime claims. Do not infer permissions from a decoded token before signature verification. Never accept a caller-selected verification algorithm.
const jwt = require('jsonwebtoken');
// Illustrative first-party access-token contract; not a third-party OAuth adapter.
const ACCESS_POLICY = {
algorithms: ['HS256'], issuer: 'example-auth', audience: 'example-api'
};
function verifyAccessToken(token, signingKey) {
const claims = jwt.verify(token, signingKey, ACCESS_POLICY);
if (!claims || typeof claims !== 'object' ||
typeof claims.sub !== 'string' || !claims.sub ||
typeof claims.tenantId !== 'string' || !claims.tenantId ||
!Number.isSafeInteger(claims.exp) || !Number.isSafeInteger(claims.iat) ||
claims.exp <= claims.iat) {
throw new Error('Invalid access claims');
}
return { subject: claims.sub, tenantId: claims.tenantId };
}
function readBearer(header) {
if (typeof header !== 'string' || header.length > 8192) return null;
const match = /^Bearer ([A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+)$/i.exec(header);
return match ? match[1] : null;
}
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 · 216 lines · 29 tokens per session scan A f01d39fb4e2a
api-security-best-practices is a skill published in the GitHub repository lingxling/awesome-skills-cn (310 stars, last pushed 9d ago), licensed MIT. It adds 29 tokens to every session and 2,364 once invoked, about $0.0001 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-10-07.
Other skills, from other repositories
api-design
Design production-grade REST, GraphQL, gRPC, and Python library APIs with correct schemas, error contracts, auth, and versioning. Use when the user asks to design an API, define endpoints, create an OpenAPI/Swagger spec, design a GraphQL schema, build a gRPC service, model request/response with Pydantic, add…
content-modelling
Design CMS content models — content types, fields, editorial workflows, governance rules, and COPE (Create Once, Publish Everywhere) patterns — for structured, multi-channel publishing. Use when the user asks to design a content model, define content types in a CMS, structure fields for editorial content, plan a…
nodejs-development
Node.js development guidelines covering Payload CMS, Vue.js with TypeScript, and general TypeScript best practices.
dotnet
Guidelines for .NET backend development with C#, ASP.NET Core, and Entity Framework Core.
microservices
Guidelines for building production-grade microservices with FastAPI/Python and Go, covering serverless patterns, clean architecture, observability, and resilience.
voice-ai-realtime-agent
Expert guide for Ultra-Low Latency Conversational Voice AI (<300ms), WebRTC bidirectional streaming, OpenAI Realtime API, Gemini Multimodal Live Audio, LiveKit Agents, and Semantic VAD / Panduan ahli AI suara percakapan real-time berlatensi ultra-rendah.