UNPKG

@arcjet/skills

Version:

Versioned Agent Skills for the Arcjet JavaScript SDK, shipped with TanStack Intent

63 lines (62 loc) • 2.46 kB
import { VERSION } from "./version.js"; //#region src/index.ts /** * npm package name that TanStack Intent discovers as a skill source. */ const PACKAGE_NAME = "@arcjet/skills"; /** * Skills shipped in this package version. Load only the entry that matches * the current task (`@arcjet/skills#<name>`). */ const skills = [ { name: "protect", description: "Add Arcjet request protection to JavaScript and TypeScript HTTP handlers. Use when protecting Next.js, Express, Fastify, SvelteKit, Remix, Astro, Nuxt, Bun, Deno, NestJS, or Node.js routes with rate limiting, bot detection, Shield, email validation, or sensitive info detection.", file: "skills/protect/SKILL.md", sources: ["docs/protect.md"] }, { name: "choose-protections", description: "Choose which Arcjet rules address a security problem. Use when deciding between detectBot, shield, rate limits, detectPromptInjection, sensitiveInfo, validateEmail, filter, or Guard-only content moderation.", file: "skills/choose-protections/SKILL.md", sources: ["docs/choose-protections.md"] }, { name: "cli", description: "Connect a project to Arcjet with the CLI: sign in, pick a team and site, and write ARCJET_KEY. Use when bootstrapping Arcjet, listing requests or guards, or managing remote rules from a terminal.", file: "skills/cli/SKILL.md", sources: ["docs/cli.md"] }, { name: "mcp", description: "Connect an AI coding client to the Arcjet MCP server at https://api.arcjet.com/mcp. Use when the client has built-in MCP support or the CLI is not available.", file: "skills/mcp/SKILL.md", sources: ["docs/mcp.md"] }, { name: "guard", description: "Add Arcjet Guard to non-HTTP JavaScript: agent tool calls, MCP handlers, queue workers, and background jobs. Use when there is no HTTP request object, or when the user asks to guard tools, rate-limit agent actions, or block prompt injection on tool arguments.", file: "skills/guard/SKILL.md", sources: ["docs/guard.md"] } ]; /** * Format a TanStack Intent load identity (`@arcjet/skills#protect`). */ function skillIdentity(name) { return `${PACKAGE_NAME}#${name}`; } /** * Look up one shipped skill by leaf name. */ function getSkill(name) { return skills.find((skill) => skill.name === name); } /** * Package version these skills were published with. */ function skillLibraryVersion() { return VERSION; } //#endregion export { PACKAGE_NAME, VERSION, getSkill, skillIdentity, skillLibraryVersion, skills };