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 arcjet/arcjet-js --skill protectgit clone --depth 1 https://github.com/arcjet/arcjet-jsWrote 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/arcjet/arcjet-js/protect)<a href="https://agentmods.dev/skills/arcjet/arcjet-js/protect"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-js/protect.svg" alt="Measured on agentmods" 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.00067 | $0.01170 |
| Opus 5 | $0.00034 | $0.00585 |
| Sonnet 5 | $0.00013 | $0.00234 |
| Haiku 4.5 | $0.00007 | $0.00117 |
Grade A, and why
protect scanned grade A with 1 finding 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 2d 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.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
Type-check, then `curl` the route. Confirm with How it starts
The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Protect HTTP routes with Arcjet
Use this skill for HTTP route handlers. If there is no request object (tool
calls, MCP handlers, queue workers), load @arcjet/skills#guard instead.
Load @arcjet/skills#choose-protections when you need to pick rules.
Load @arcjet/skills#cli to get an ARCJET_KEY before writing code.
Checklist
- Language is JS/TS (stop if not)
- Runtime is Node
>=22.21.0 <23 || >=24.5.0, Bun ≥ 1.3.0, or Deno stable -
ARCJET_KEYis in the env file (CLI first; do not leave a TODO) - Shared
arcjet()client at module scope,withRule()for extras -
protect()inside each route handler, not middleware - Rules that should block use
mode: "LIVE" - Client IP comes from trusted ingress, not a copied forwarding header
- Decisions verified with a real request plus CLI or Console
Client
import arcjet, { shield, detectBot } from "@arcjet/next";
export const aj = arcjet({
key: process.env.ARCJET_KEY!,
rules: [
shield({ mode: "LIVE" }),
detectBot({ mode: "LIVE", allow: ["CATEGORY:SEARCH_ENGINE"] }),
],
});
Pick the adapter the app already uses (@arcjet/next, @arcjet/node,
@arcjet/fastify, …). Install it with the project's package manager. Do not
hand-edit package.json and guess a version.
Omitted mode is DRY_RUN. detectBot requires exactly one of allow or
deny. detectPromptInjection takes mode only — no threshold.
One client. withRule() clones share the decision cache. A second
arcjet() constructor does not.
Astro is an integration (arcjet:client), not a shared file. Nuxt is a
module (#arcjet). NestJS is ArcjetModule + @InjectArcjet(). Bun and
Deno wrap fetch with aj.handler() for IP detection, then still call
protect(). Hono on Node passes c.env.incoming.
Handler
export async function GET(request: Request) {
const decision = await aj.protect(request);
if (decision.isDenied()) {
return Response.json({ error: "Forbidden" }, { status: 403 });
}
return Response.json({ ok: true });
}
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.
- 2d ago First seen · 122 lines · 67 tokens per session scan A 4161836f65be
protect is a skill published in the GitHub repository arcjet/arcjet-js (682 stars, last pushed yesterday), licensed Apache-2.0. It adds 67 tokens to every session and 1,170 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
Other skills, from other repositories
create-auth-skill
Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.
fhir-developer-skill
FHIR API development guide for building healthcare endpoints. Use when: (1) Creating FHIR REST endpoints (Patient, Observation, Encounter, Condition, MedicationRequest), (2) Validating FHIR resources and returning proper HTTP status codes and error responses, (3) Implementing SMART on FHIR authorization and OAuth…
create-auth-skill
Scaffold and implement authentication in TypeScript/JavaScript apps using Better Auth. Detect frameworks, configure database adapters, set up route handlers, add OAuth providers, and create auth UI pages. Use when users want to add login, sign-up, or authentication to a new or existing project with Better Auth.
hunt-api-misconfig
Hunt API security misconfiguration — mass assignment, prototype pollution, HTTP verb tampering. Mass assignment: send {isadmin:true, role:admin, verified:true} on profile/account/reset endpoints — server blindly applies. JWT signature/crypto forging (alg:none, key confusion, kid/jku) is owned by hunt-jwt-crypto; this…
clinical-trial-protocol-skill
Generate clinical trial protocols for medical devices or drugs. This skill should be used when users say "Create a clinical trial protocol", "Generate protocol for [device/drug]", "Help me design a clinical study", "Research similar trials for [intervention]", or when developing FDA submission documentation for…
claude-d3js-skill
This skill provides guidance for creating sophisticated, interactive data visualisations using d3.js.