api-security-best-practices
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
Skill by Narendarcodes
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/narendarcodes-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
- 909 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- body: 909 lines (spec recommends under 500)
Files (3)
- .provenance.json
- .skill_id
- SKILL.md
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 Narendarcodes/Hyperion-workbench, MIT.
More from Narendarcodes/Hyperion-workbench
- 0.574score
dsh-doc
Narendarcodes
Create, restructure, review, audit, or migrate DeepSeek Harness Markdown documentation, package READMEs, and the documentation website using audience-first…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
dsh-archive-agent-notes
Narendarcodes
Use when adding, auditing, pruning, archiving, restoring, or reviewing Agent Notes in deepseek-harness; checks every new note for superseded active records…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
dsh-speed-up-perf
Narendarcodes
Use when investigating or optimizing DeepSeek Harness performance, designing realistic synthetic benchmarks or CI performance gates, profiling long Sessions…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
agents-towards-production
Narendarcodes
Production-readiness audit checklist distilled from NirDiamant/agents-towards-production (the "open-source playbook for turning prototypes into real-world…
SkillBFreshness: B★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Sep 9, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- 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.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.281score
api-security-best-practices
LeoYeAI
Implement secure API design patterns including authentication, authorization, input validation, rate limiting, and protection against common API vulnerabilities
SkillCFreshness: C★ 2.2KClaude 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 Narendarcodes
- 0.574score
dsh-doc
Narendarcodes
Create, restructure, review, audit, or migrate DeepSeek Harness Markdown documentation, package READMEs, and the documentation website using audience-first…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
dsh-archive-agent-notes
Narendarcodes
Use when adding, auditing, pruning, archiving, restoring, or reviewing Agent Notes in deepseek-harness; checks every new note for superseded active records…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
dsh-speed-up-perf
Narendarcodes
Use when investigating or optimizing DeepSeek Harness performance, designing realistic synthetic benchmarks or CI performance gates, profiling long Sessions…
SkillBFreshness: B★ 4Claude Code +9 - 0.569score
agents-towards-production
Narendarcodes
Production-readiness audit checklist distilled from NirDiamant/agents-towards-production (the "open-source playbook for turning prototypes into real-world…
SkillBFreshness: B★ 4Claude 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/narendarcodes-api-security-best-practices (last updated 2026-10-24)