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 integrate-arcjet-guard-tanstack-aigit 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/integrate-arcjet-guard-tanstack-ai)<a href="https://agentmods.dev/skills/arcjet/arcjet-js/integrate-arcjet-guard-tanstack-ai"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-js/integrate-arcjet-guard-tanstack-ai/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/integrate-arcjet-guard-tanstack-ai"><img src="https://agentmods.dev/badge/skills/arcjet/arcjet-js/integrate-arcjet-guard-tanstack-ai.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.00103 | $0.03272 |
| Opus 5.5 | $0.00041 | $0.01309 |
| Sonnet 5.5 | $0.00021 | $0.00654 |
| Haiku 4.5 | $0.00010 | $0.00327 |
Grade A, and why
integrate-arcjet-guard-tanstack-ai 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 13d 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 — 293 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Integrate Arcjet Guard into TanStack AI
@arcjet/guard's TanStack AI v0 namespace wraps the agent's existing Arcjet
client. It never talks to the Arcjet API itself. Two surfaces, one
decision rule:
- Tool calls →
guardMiddleware(). Achat({ middleware })middleware whoseonBeforeToolCallis the chat()-wide gate. Default DENY is{ type: "skip", result: ArcjetDenialResult }so the tool never runs and the model sees the payload. OptionalonDeny: "abort"returns{ type: "abort", reason }and stops the run — the model does not getArcjetDenialResult. Do not throw from the hook. Tools already branded by a siblingguardToolare skipped so Guard is not double-called. Inboundguard()beforechat()does not brand tools and does not skip this gate. - Correlation →
tanstackAiContext()reads a caller-owned id from the helper options orchat({ context }). It never mints a new id. It never readsctx.threadId(TanStack auto-generates it). It never readstraceId/requestId/streamId.
There is no guardTool. A throw from execute is swallowed into
{ error } and is not a usable deny envelope. There is no
guardInbound, no guardApproval, and nothing named
contentGuardMiddleware (TanStack already has that name).
This namespace is TanStack AI chat({ middleware }) +
onBeforeToolCall. Not the Vercel AI SDK. Do not also wrap with
@arcjet/guard/vercel-ai/v7 or @arcjet/guard/claude-managed-agents/v0.
Client tools and provider-native tools with no local execute are out
of scope.
Docs live at
docs.arcjet.com/guards/tanstack-ai/.
Do not overwrite any other /guards/... slug.
Put Arcjet first in the middleware array. onBeforeToolCall is
first-win; if toolCacheMiddleware (or anything else) skips first,
Guard never runs.
Screen inbound before chat() — there is no inbound hook.
There is no first-class inbound channel, so there is no
guardInbound. Put prompt-injection (and other inbound rules) in the
application before chat(). Call guard() directly. guard() fails
open — callers must check hasFailedOpen(). TanStack's
contentGuardMiddleware redacts the stream; it is not this policy
gate.
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.
- 13d ago Changed · +1 lines 336f45e6f58c
- 21d ago Changed · +2 lines 4eecc2426e6d
- 22d ago Changed · +5 lines 250c69099bf8
- 26d ago Changed 35915cf4bfc8
- 1mo ago Changed 82e7979240f6
- 1mo ago Changed 4b6d2f65abad
- 1mo ago Changed · +7 lines 1ab993b603c6
- 1mo ago First seen · 278 lines · 103 tokens per session scan A 36681d236e1a
integrate-arcjet-guard-tanstack-ai is a skill published in the GitHub repository arcjet/arcjet-js (694 stars, last pushed 4d ago), licensed Apache-2.0. It adds 103 tokens to every session and 3,272 once invoked, about $0.0004 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.
Other skills, from other repositories
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.
adr-skill
Create and maintain Architecture Decision Records (ADRs) optimized for agentic coding workflows. Use when you need to propose, write, update, accept/reject, deprecate, or supersede an ADR; bootstrap an adr folder and index; consult existing ADRs before implementing changes; or enforce ADR conventions. This skill uses…
terraform-skill
Terraform infrastructure as code best practices.
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.
prior-auth-review-skill
Automate payer review of prior authorization (PA) requests. This skill should be used when users say "Review this PA request", "Process prior authorization for [procedure]", "Assess medical necessity", "Generate PA decision", or when processing clinical documentation for coverage policy validation and authorization…