api-hardening

api-hardening is a skill for Claude Code, Codex from jamditis/claude-skills-journalism. It costs 39 tokens per session (12,010 once invoked), scanned B, original, MIT.

A set of practices for protecting web APIs, which are interfaces that let software exchange requests and data. It covers Express, FastAPI, and serverless services using current OWASP API security guidance.

In plain words
What is it for?
Use it when adding rate limits, CORS rules, input checks, API-key protection, or defenses against the OWASP API Top 10 risks.
Why use it?
It helps prevent common API problems such as abuse, unsafe input, cross-origin mistakes, stolen keys, injection attacks, and data leaks.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present. Also seen: mentions subagents; positional $N argument.

Part of the security-toolkit plugin — 4 skills, 1 command shipped together

Good fit Use it when adding rate limits, CORS rules, input checks, API-key protection, or defenses against the OWASP API Top 10 risks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jamditis/claude-skills-journalism/api-hardening
Install

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.

Any agent
npx skills add jamditis/claude-skills-journalism --skill api-hardening
Clone the repo
git clone --depth 1 https://github.com/jamditis/claude-skills-journalism

Made for: Claude Code, Codex.

Or install security-toolkit, the plugin that ships this one along with the rest of its 4 skills, 1 command.

Wrote 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.

agentmods badge for api-hardening

README.md
[![agentmods](https://agentmods.dev/badge/skills/jamditis/claude-skills-journalism/api-hardening/github.svg)](https://agentmods.dev/skills/jamditis/claude-skills-journalism/api-hardening)
Your own site
<a href="https://agentmods.dev/skills/jamditis/claude-skills-journalism/api-hardening"><img src="https://agentmods.dev/badge/skills/jamditis/claude-skills-journalism/api-hardening/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.

agentmods 80×15 button for api-hardening

Your own site · 80×15
<a href="https://agentmods.dev/skills/jamditis/claude-skills-journalism/api-hardening"><img src="https://agentmods.dev/badge/skills/jamditis/claude-skills-journalism/api-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 12,010 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Tool Misuse · line 469
    Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
    Fix: Validate all tool parameters against an allowlist. Reject dangerous parameter values (shell=True, --force, -rf /) and use safe defaults.
  • medium Tool Misuse · line 607
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
  • medium Tool Misuse · line 610
    Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.
    Fix: Override unsafe defaults with secure settings (verify=True, auth required, restrictive permissions). Review and harden all tool configurations.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00039 $0.12010
Opus 5 $0.00019 $0.06005
Sonnet 5 $0.00008 $0.02402
Haiku 4.5 $0.00004 $0.01201

Measured 7d ago against content hash 7287ea0f9344, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

api-hardening scanned grade B with 3 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 7d 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.

Encoded or obfuscated payloadmediumSupply chain

base64 or hex that is decoded and executed hides what actually runs from anyone reading the file.

obj = marshal.loads(request.body)

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

// Allow requests with no origin (mobile apps, curl, etc.)

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

const { exec, execFile, spawn } = require('child_process');
security-toolkit/skills/api-hardening/SKILL.md · 1,165 lines

How it starts

The opening of the file, as written. The whole thing — 1,165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

API hardening

Defense-in-depth patterns for protecting APIs from abuse, injection attacks, and data leakage. Recipes are oriented around the OWASP API Security Top 10:2023 and were last verified on 2026-05-08.

Step 0: Research the current security landscape (do this first)

Security knowledge ages on a 6-12 month half-life. The recipes below were last verified on 2026-05-08; they may be stale by the time you read this. Before applying any pattern in this skill, fan out research scoped to the API surface or web defense being added so the recipes are interpreted against current authoritative sources, not against this file's snapshot.

Default-on, with a documented skip

Run the 4-angle research below by default. Skip ONLY when ALL of these hold:

  • (a) You ran this same skill on this same primitive within the last 4 hours of the current session,
  • (b) That prior research surfaced no urgent advisories for the API surface or web defense being added,
  • (c) You log a one-line Research skipped because <reason> note in your response.

"I think I know" / "moving fast" / "user wants this done quickly" / "already familiar" are NOT valid skip reasons. The whole point of this preamble is that future-you should not trust this skill body's defaults until current state is checked.

Fan out 4 subagents in parallel

Each subagent returns ≤300 words of bullets with citations. Dispatch all 4 in a single message so they run concurrently.

Angle 1, Authoritative standards. Have NIST / OWASP / IETF (RFCs and Internet-Drafts) / W3C / CISA published anything new about the API surface or web defense being added in the last 6-12 months? Look for: spec finalizations, deprecations, replacement specs, RFC publications, draft revisions, NIST SP updates, OWASP project version bumps. Cite by document number + publication date.

Angle 2, Active exploitation. What's actively being exploited that targets the API surface or web defense being added? Pull from: CISA Known Exploited Vulnerabilities (KEV) catalog (filter to last 6-12 months), recent CVE / GHSA entries with high CVSS or in-the-wild exploitation, breach postmortems and incident reports (CSRB, vendor RCAs, security-vendor research). Surface CWE patterns dominating recent KEV adds. Cite by CVE number + advisory URL.

Read the full file on GitHub · 1,165 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

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.

  1. 7d ago First seen · 1,165 lines · 39 tokens per session scan B 7287ea0f9344

Subscribe to this mod's changes

api-hardening is a skill published in the GitHub repository jamditis/claude-skills-journalism (391 stars, last pushed today), licensed MIT. It adds 39 tokens to every session and 12,010 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 3 findings (encoded or obfuscated payload, makes network calls, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other skills, from other repositories

drawio-skill

Use when the user requests diagrams, flowcharts, architecture diagrams, ER diagrams, UML / sequence / class diagrams, network topology, ML/DL model figures (Transformer/CNN/LSTM), mind maps, or any visualization. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that…

tuoxie2046/claude-code-research-skills · 120 tokens

cf-connect

Set up a specific MCP connector from the ContentForge registry with step-by-step instructions tailored to its transport — verified endpoint URL for HTTP connectors, env vars plus a ready-to-paste .mcp.json entry for npx connectors, credential acquisition guidance, and post-setup verification. Triggers on…

teachskillofskills-ai/ContentForge-techshu · 170 tokens

cf-add-integration

Connect any external API or service to ContentForge as a custom MCP connector — walks non-technical users from finding a verified MCP package or HTTP endpoint to a ready-to-paste .mcp.json entry, credential setup instructions, and a post-restart verification check. Triggers on "/contentforge:cf-add-integration"…

teachskillofskills-ai/ContentForge-techshu · 160 tokens

laravel-specialist

Build and configure Laravel 10+ applications, including creating Eloquent models and relationships, implementing Sanctum authentication, configuring Horizon queues, designing RESTful APIs with API resources, and building reactive interfaces with Livewire. Use when creating Laravel models, setting up queue workers…

Jeffallan/claude-skills · 86 tokens

django-storages-s3

Use when configuring Django to store static and media files on AWS S3 with django-storages. Invoke when working with the STORAGES setting, S3 buckets, presigned URLs, CloudFront, or boto3-backed file storage in settings.py. Configures the Django 4.2+ STORAGES dict, public/private custom backends, presigned GET/POST…

Jeffallan/claude-skills · 138 tokens

303-frameworks-spring-boot-validation

Use when you need to design, review, or improve validation in Spring Boot applications — including Bean Validation on request DTOs, @Valid/@Validated at API boundaries, constraint groups, custom constraints, @ConfigurationProperties validation, nested DTO validation, and consistent validation error handling. This…

jabrena/plinth · 113 tokens