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 guardgit 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/guard)<a href="https://agentmods.dev/skills/arcjet/arcjet-js/guard"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-js/guard/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.
<a href="https://agentmods.dev/skills/arcjet/arcjet-js/guard"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-js/guard.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00058 | $0.01737 |
| Opus 5.5 | $0.00023 | $0.00695 |
| Sonnet 5.5 | $0.00012 | $0.00347 |
| Haiku 4.5 | $0.00006 | $0.00174 |
Grade A, and why
guard scanned grade A with 0 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 6d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 142 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Guard non-HTTP JavaScript
Use @arcjet/guard when there is no HTTP request. MCP tools, queue workers,
and agent tool calls are Guard. HTTP routes are @arcjet/skills#protect.
For a specific vendor SDK, load the matching skill from @arcjet/guard
(@arcjet/guard#integrate-arcjet-guard-agents, -eve, -mastra,
-langgraph, -langchain, -openai-agents, -genkit, -google-adk,
-strands-agents, -tanstack-ai, -cloudflare-think,
-claude-agent-sdk, -claude-managed-agents).
Coding-agent hooks (Claude Code, Copilot, Codex, Cursor, Muse Code) are not
this package. Publish a coding-agent policy from a Console starter
(Execute on: Tool call, Prompt, or Model switch) and install the hooks
from the vendor's page under https://docs.arcjet.com/coding-agents. Don't add
a matcher, label, or ?surface=. Claude Code and Copilot HTTP hooks fail
open on any non-2xx, including 401.
Client
import { launchArcjet } from "@arcjet/guard";
export const arcjet = launchArcjet({ key: process.env.ARCJET_KEY! });
One client at module scope. Get the key with @arcjet/skills#cli first.
Declare rules at module scope so .deniedResult(decision) works.
One guard() per operation
Hardcode the label. Do not interpolate in a generic dispatcher.
Hardcode labels as slugs: ASCII letters of either case, digits, -, ., and
_ (tools.get-weather). Start and end with a letter or digit; max 256 bytes.
Labels match case-sensitively.
Prefer dash/dot in new labels. Check a label you build yourself with
validateGuardLabel.
async function getWeather(userId: string) {
const decision = await arcjet.guard({
label: "tools.get-weather",
rules: [/* ... */],
metadata: { user: { id: userId } },
});
if (decision.conclusion === "DENY") {
const rateLimited = toolCallLimit.deniedResult(decision);
if (rateLimited) {
return { error: `rate limited, retry after ${rateLimited.resetAtUnixSeconds}` };
}
return { error: decision.reason };
}
if (decision.hasFailedOpen()) {
// ALLOW only because a rule could not run — deny for content scans
return { error: "unavailable" };
}
// ... run the tool
}
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.
- 6d ago Changed · +3 lines fd53cb882969
- 10d ago Changed · +2 lines 9b2828f91ecc
- 13d ago Changed · +2 lines 17545bc93700
- 18d ago Changed · +28 lines d6a97e972d30
- 1mo ago Changed · +3 lines 778b16b56ed2
- 1mo ago Changed · +3 lines 611c5601b266
- 1mo ago Changed · +1 lines 35d79d4c778f
- 1mo ago Changed · +8 lines eff03944a358
- 2mo ago Changed 4342ae509482
- 2mo ago First seen · 92 lines · 58 tokens per session scan A 3c5c749bf3d8
guard is a skill published in the GitHub repository arcjet/arcjet-js (704 stars, last pushed 2d ago), licensed Apache-2.0. It adds 58 tokens to every session and 1,737 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.
guard compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| guardarcjet/arcjet-js | Skill | 704 | 2d ago | Apache-2.0 | A | 58 | Claude Code, Codex |
| clinical-trial-protocol-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 70 | Claude Code, Codex |
| claude-d3js-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 25 | Claude Code, Codex |
| adr-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 89 | Claude Code, Codex |
| linear-claude-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 15 | Claude Code, Codex |
| playwright-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 60 | Claude Code, Codex |
| terraform-skillAgent-Threat-Rule/agent-threat-rules | Skill | 445 | yesterday | MIT | A | 10 | Claude Code, Codex |