api-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
Skill by LeoYeAI
Chalk Labs
Need help deploying api-security-best-practices?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/leoyeai-api-security-best-practices
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
api-security-best-practices- Description
- Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
- License
- MIT
- Instructions
- 907 lines in SKILL.md Β· view on GitHub
Agent Skills spec issues
- body: 907 lines (spec recommends under 500)
Files (2)
- SKILL.md
- _meta.json
SKILL.md (first lines)
# API Security Best Practices π§
## Overview
Guide developers in building secure APIs by implementing authentication, authorization, input validation, rate limiting, and protection against common vulnerabilities. This skill covers security patterns for REST, GraphQL, and WebSocket APIs.
## When to Use This Skill
- Use when designing new API endpoints
- Use when securing existing APIs
- Use when implementing authentication and authorization
- Use when protecting against API attacks (injection, DDoS, etc.)
- Use when conducting API security reviews
- Use when preparing for security audits
- Use when implementing rate limiting and throttling
- Use when handling sensitive data in APIs
## How It Works
### Step 1: Authentication & Authorization
I'll help you implement secure authentication:
- Choose authentication method (JWT, OAuth 2.0, API keys)
- Implement token-based authentication
- Set up role-based access control (RBAC)
- Secure session management
- Implement multi-factor authentication (MFA)
### Step 2: Input Validation & Sanitization
Protect against injection attacks:
- Validate all input data
- Sanitize user inputs
- Use parameterized queries
- Implement request schema validation
- Prevent SQL injection, XSS, and command injection
### Step 3: Rate Limiting & Throttling
Prevent abuse and DDoS attacks:
- Implement rate limiting per user/IP
- Set up API throttling
- Configure request quotas
- Handle rate limit errors gracefully
- Monitor for suspicious activity
### Step 4: Data Protection
Secure sensitive data:
- Encrypt data in transit (HTTPS/TLS)
- Encrypt sensitive data at rest
- Implement proper error handling (no data leaks)
- Sanitize error messages
- Use secure headers
### Step 5: API Security Testing
Verify security implementation:
- Test authentication and authorization
- Perform penetration testing
- Check for common vulnerabilities (OWASP API Top 10)
- Validate input handling
- Test rate limiting
## Examples
### Example 1: Implementing JWT Authentication
```markdown
## Secure JWT Authentication Implementation
### Authentication Flow
1. User logs in with credentials
2. Server validates credentials
3. Server generates JWT token
4. Client stores token securely
5. Client sends token with each request
6. Server validates token
### Implementation
#### 1. Generate Secure JWT Tokens
\`\`\`javascript
// auth.js
const jwt = require('jsonwebtoken');
const bcrypt = require('bcrypt');
// Login endpoint
app.post('/api/auth/login', async (req, res) => {
try {
const { email, password } = req.body;
// Validate input
if (!email || !password) {
return res.status(400).json({
error: 'Email and password are required'
});
}
// Find user
const user = await db.user.findUnique({
where: { email }
});
if (!user) {
// Don't reveal if user exists
return res.status(401).json({
error: 'Invalid credentials'
});
}
// Verify password
const validPassword = await bcrypt.compare(
password,
user.passwordHash
);From LeoYeAI/openclaw-master-skills, MIT.
More from LeoYeAI/openclaw-master-skills
- 0.734score
audit-website
squirrelscan
Audit websites for SEO, performance, security, technical, content, and 15 other issue cateories with 230+ rules using the squirrelscan CLI.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.734score
arista-device-health
network-security-skills-suite
Arista EOS device health check and triage procedure.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.733score
analyticscli-ts-sdk
wotaso
Use when integrating or upgrading the AnalyticsCLI TypeScript SDK in web, TypeScript, React Native, or Expo apps.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.731score
ai-headshot-generation
eachlabs
Generate professional AI headshots from casual photos using each::sense AI.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.731score
acl-rule-analysis
network-security-skills-suite
Vendor-agnostic ACL and firewall rule analysis with shadowed rule detection, overly permissive rule identification, unused rule discovery, redundant ruleβ¦
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.729score
agentic-street
agentic-street
Earn yield on USDC by investing in AI-managed DeFi funds, or launch your own fund and build a public track record on Base.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.728score
aureus-arena
aureus-arena
Build and operate autonomous AI agents that compete in Aureus Arena, a fully on-chain Colonel Blotto game on Solana.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.728score
agent-bom
msaad00
Open security platform for agentic infrastructure β broad scanning plus MCP discovery, CVEs, blast radius, SBOMs, CIS benchmarks (AWS, Azure, GCP, Snowflake)β¦
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.727score
aster-futures
Aster
Aster Futures request using the Aster API.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.725score
anvevoice
AnveVoice
Add AI voice assistants to your website.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.724score
anima
animaapp
Turns ideas into live, full-stack web applications with editable code, built-in database, user authentication, and hosting.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.719score
xaut-trade
aurehub
Buy or sell XAUT (Tether Gold) on Ethereum.
SkillCFreshness: Cβ 2.2KClaude Code +9
Signals
- Stars
- 2,168
- Forks
- 325
- Open issues
- 13
- Last commit (this folder)
- May 5, 2026 (5 months ago)
- Last release
- Jul 20, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Website
- myclaw.ai
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.658score
api-security-best-practices
sickn33
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillAFreshness: Aβ 48.4KClaude Code +9 - 0.334score
api-security-best-practices
Narendarcodes
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillBFreshness: Bβ 4Claude Code +9 - 0.329score
api-security-best-practices
dushyantkhosla
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillAFreshness: AClaude Code +9 - 0.307score
api-security-best-practices
denycode-dev
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillBFreshness: BClaude Code +9 - 0.286score
api-security-best-practices
alexander-kastil
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 19Claude Code +9 - 0.283score
api-security-best-practices
roadsidedev
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 20Claude Code +9 - 0.278score
api-security-best-practices
jiho00seo-dev
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 10Claude Code +9 - 0.278score
api-security-best-practices
mupengi-bot
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 10Claude Code +9 - 0.268score
api-security-best-practices
AxelMrak
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 5Claude Code +9 - 0.249score
api-security-best-practices
danstrem2
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 1Claude Code +9 - 0.235score
api-security-best-practices
renatosouzar8
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: DClaude Code +9 - 0.229score
api-security-best-practices
agent-skills-hub
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillDFreshness: Dβ 123Claude Code +9
More from LeoYeAI
- 0.552score
aawp
LeoYeAI
AAWP (AI Agent Wallet Protocol) β the only crypto wallet protocol built exclusively for AI Agents on EVM-compatible blockchains.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.552score
ai-task-hub
LeoYeAI
AI task hub for image analysis, background removal, speech-to-text, text-to-speech, markdown conversion, and async execute/poll/presentation orchestration.
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.552score
animation-shader
LeoYeAI
READ this skill when implementing or configuring animation-style shaders (Toon/Cel Shaders) β including outlines, rim lighting, toon shading, MatCapβ¦
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.552score
aqara-open-api
LeoYeAI
Query and control Aqara/Lumi Studio smart home devices and manage spaces via the Aqara Open Platform API (HTTP JSON).
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.552score
aavegotchi-gbm-skill
LeoYeAI
View, create, cancel, bid, and claim Aavegotchi GBM auctions on Base mainnet (8453).
SkillCFreshness: Cβ 2.2KClaude Code +9 - 0.552score
adaptive-learning-playbook
LeoYeAI
World-Class Adaptability & Learning Playbook.
SkillCFreshness: Cβ 2.2KClaude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents βRead the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes Β· CoinDesk Β· Decrypt Β· Cointelegraph Β· The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get api-security-best-practices running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
api-security-best-practices skill. Agent Mart. https://agentmart.dev/skills/leoyeai-api-security-best-practices (last updated 2026-10-24)