Detect Agent — Development skill for Claude Code
Agent detection definitions and lightweight utility.
How to install Detect Agent
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open vercel/detect-agent and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Detect Agent does
Agent detection definitions and lightweight utility.
Alternatives in Development
- Crypto Research Haiku Command — Execute lightweight cryptocurrency research by calling only haiku versions of crypto analysis agents in parall 3.4k ★
- Zerostack — Lightweight coding agent written in Rust, optimized for memory footprint and performance 1.7k ★
- Claude Auto Resume — A shell script utility that automatically resumes Claude CLI tasks when usage limits are lifted 732 ★
README
detect-agent
A lightweight utility for detecting if code is being executed by an AI agent or automated development environment.
Installation
**JavaScript / TypeScript**
npm install detect-agent
**Go**
go get github.com/vercel/detect-agent
Usage
**JavaScript / TypeScript**
import { determineAgent } from 'detect-agent';
const { isAgent, agent } = await determineAgent();
if (isAgent) {
console.log(`Running in ${agent.name} environment`);
// Adapt behavior for AI agent context
}
**Go**
import (
"errors"
detectagent "github.com/vercel/detect-agent"
)
agent, err := detectagent.Detect()
if errors.Is(err, detectagent.ErrAgentNotFound) {
// not running inside an agent
} else if err != nil {
log.Fatal(err)
} else {
fmt.Printf("Running in %s environment\n", agent.Name)
}
Agent Definitions
The agent detection rules live in [`agents.json`](https://raw.githubusercontent.com/vercel/detect-agent/main/agents.json), validated against [`agents.schema.json`](https://raw.githubusercontent.com/vercel/detect-agent/main/agents.schema.json).
[!NOTE] You can use these definitions two ways: install the [npm package](https://www.npmjs.com/package/detect-agent) for a ready-to-use API, **or** consume the JSON file directly from GitHub if you're not in a JavaScript environment or want to build your own detection logic:
https://raw.githubusercontent.com/vercel/detect-agent/main/agents.json
Supported Agents
This package can detect the following AI agents and development environments:
- Cursor (Anysphere)
- Claude Code (Anthropic)
- Claude Cowork (Anthropic)
- Kimi Code (Moonshot AI)
- Grok Build (xAI)
- Devin (Cognition Labs)
- Gemini CLI (Google)
- Codex (OpenAI)
- Antigravity (Google DeepMind)
- Augment
- Cline
- OpenCode
- OpenClaw
- Goose (Block)
- Junie (JetBrains)
- Kiro (AWS)
- Pi
- **GitHub Copil
Related Skills
Codex Stuck
Detect whether Codex CLI is running or stuck. Lightweight terminal status monitor for codex/claude-code automa
Detect
Correlation rules and detection management
Claude Code Root Runner
🔥 Utility script to run Claude Code CLI with --dangerously-skip-permissions as root by creating temporary non
Vibeslopicons
200 utility icons and 100 brand favicons, vibe-generated by Claude — pure, unrepentant slop
Skills For Decision Making
Agent skills built from Algorithms for Decision Making (Kochenderfer, Wheeler & Wray). Expected utility, value
Linux Kernel Crash Debug
Linux kernel crash debugging skill for Claude Code using crash utility
Related Agents
Detection Engineer
Delegates to this agent when the user asks about detection rules, SIEM queries, threat hunting, indicator anal
Claude Code System Prompts
by Piebald AI - All parts of Claude Code's system prompt, including builtin tool descriptions, sub agent promp
Tailwind Agent
Styles Rails ERB views and ViewComponents using Tailwind CSS 4 utility classes and responsive design patterns.