APIsec Skills: API Security for AI Coding Agents
Put OWASP API Security Top 10 intelligence inside your coding agent. Every endpoint the agent generates is secure by default, with nothing to configure, no API keys, and nothing leaving your machine.

What It Does
Ask your coding agent to "add an endpoint to fetch orders by id". Without security context it returns the most direct answer, which usually means no authentication check, no ownership filter, and no input validation.
APIsec Skills embed security rules and skills into the agent's context. The same prompt produces hardened output, silently and automatically, every time.
Without APIsec Skills:
app.get('/api/orders/:id', async (req, res) => {
const order = await Order.findById(req.params.id); // any user, any order
res.json(order);
});
With APIsec Skills:
app.get('/api/orders/:id', authenticate, async (req, res) => {
const order = await Order.findOne({
_id: req.params.id,
userId: req.user.id, // ownership enforced
});
if (!order) return res.status(404).json({ error: 'Not found' });
res.json(serializeOrder(order)); // filtered response
});
Same eight words typed. Completely different output.
What's Included
5 Security Rules (always active)
Rules sit in the agent's system context from the start of the session and shape every code generation. No commands are needed. The rule sources live in rules/, and ready-to-copy versions in each agent's native format live under agents/ (see Installation).
| Rule | What It Enforces |
|---|
auth-required | Every data-touching route must have authentication middleware |
ownership-check | All queries scoped to the authenticated user's ID |
input-validation | User input validated before reaching database or commands |
error-sanitization | No stack traces, file paths, or query details in error responses |
admin-rbac | Admin and elevated operations require explicit role middleware |
6 Security Skills (on-demand)
Skills load automatically when the agent detects a relevant task. Each produces a structured security report with OWASP references and actionable fixes.
| Skill | Triggers On | OWASP Coverage |
|---|
bola-detector | Route handlers with :id params, findById, findUnique, findOne | API1:2023 |
auth-rbac-scaffold | JWT, middleware, login flows, role checks, permissions | API2:2023, API5:2023 |
injection-checker | SQL queries, MongoDB queries, shell commands, file paths, templates | API8:2023 |
security-test-generator | Writing tests, Jest/pytest/JUnit, "add test coverage" | API1 to API5:2023 |
api-security-review | "Review this for security", "is this secure", full controller files | All 10 categories |
openapi-hardener | OpenAPI specs, Zod/Joi/Pydantic schemas, JSON Schema | API3:2023 |
Installation
The skills use the open Agent Skills format, so the same SKILL.md files work in every major coding agent. The always-on rules are agent-specific files, and this repository ships a ready-made set for each agent.
Clone once:
git clone https://github.com/apisec-inc/apisec-skills
cd apisec-skills
Claude Code
Install as a plugin (skills only, one command, updates from this repository):
/plugin marketplace add apisec-inc/apisec-skills
/plugin install apisec@apisec-skills
Or copy the skills by hand:
cp -r skills/* ~/.claude/skills/ # personal, every project
# or: cp -r skills/* .claude/skills/ # this project only
Add the always-on rules to your project:
mkdir -p .claude/rules && cp agents/claude-code/rules/*.md .claude/rules/
Cursor
cp -r skills .cursor/skills/
cp -r rules .cursor/rules/
A .cursor-plugin/plugin.json manifest is included for the Cursor plugin format.
GitHub Copilot
cp -r skills .github/skills/ # also read from .agents/skills/
cp agents/copilot/copilot-instructions.md .github/copilot-instructions.md
OpenAI Codex CLI
cp -r skills .agents/skills/
cp agents/codex/AGENTS.md AGENTS.md # or append to an existing AGENTS.md
Gemini CLI
cp -r skills .agents/skills/ # or ~/.gemini/skills/
cp agents/gemini/GEMINI.md GEMINI.md # or append to an existing GEMINI.md
Windsurf