add-ai-integration
Skill by getsentry
Guides contributors who add or change AI provider instrumentation in the Sentry JavaScript SDK. Covers the three integration patterns, code placement, and the recording rules to follow.
Install add-ai-integration
Built from the published package, never by AI.
git clone --depth 1 https://github.com/getsentry/sentry-javascript /tmp/sentry-javascript && mkdir -p ~/.claude/skills && cp -r /tmp/sentry-javascript/.agents/skills/add-ai-integration ~/.claude/skills/add-ai-integrationRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/getsentry/sentry-javascript /tmp/sentry-javascript && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/sentry-javascript/.agents/skills/add-ai-integration ~/.gemini/antigravity-cli/skills/add-ai-integrationAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill guides contributors who add a new AI provider integration, or change an existing one, in the Sentry JavaScript SDK. It describes three instrumentation patterns: native tracing channels for the Vercel AI SDK (ai 7 and later), orchestrion-injected channels for providers such as OpenAI and Anthropic, and callback or exporter hooks for LangChain and Mastra. It also explains where instrumentation, integration and tests should live, and which gen-AI conventions to import instead of hardcoding.
The skill sets rules for recording data. Streaming is detected from the result shape, message payloads are never truncated, token usage is never rolled up onto parent spans, and input and output recording is gated on resolveAIRecordingOptions(). It ends with a checklist covering exports, E2E tests and JSDoc. It is aimed at developers working on the Sentry JavaScript SDK repository.
Written from the project's SKILL.md and checked against it.
What it can do
- Pattern selectionChooses between native tracing channel, orchestrion channels, or callback/exporter patterns for a provider.
- Code placementShows where instrumentation, integrations and runtime re-exports belong in the SDK packages.
- Convention importsDirects span ops and attributes to @sentry/conventions and getGenAiSpanOp() instead of hardcoded values.
- Streaming handlingExplains how to accumulate streamed responses into StreamResponseState and end the stream span.
- Recording gatesRequires input and output recording to be gated on resolveAIRecordingOptions().
- Contribution checklistLists exports, E2E test suites, origin naming and JSDoc items to complete before submitting.
Try asking
- Walk me through adding a new AI provider to the Sentry JavaScript SDK
- Which instrumentation pattern fits a provider that has no telemetry of its own?
- Give me the checklist for submitting a new AI integration to Sentry
Good to know
- Pattern 2 integrations require the Sentry runtime hook or bundler plugin.
- Pattern 1 applies to the Vercel AI SDK at version 7 or later; versions 4 to 6 use orchestrion injection.
- Message truncation was removed in v11, and size limiting is handled server-side.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: .agents/skills/add-ai-integration/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md5 KB
Alternatives to add-ai-integration
All alternatives →Runs a 7-stage workflow for auditing, cleaning up and reviewing GitHub repositories, plus competitor analysis. Written for developers who want a repo checked for secrets, junk files and documentation gaps.
Teaches an AI assistant to build, debug and explain Gradio web UIs and ML demos in Python. It covers the core API, components, event listeners, layouts and the MCP server option. Aimed at Python developers who work with Gradio.
Recommends menus, buttons, toolbars and disclosure controls for Apple platforms using Human Interface Guidelines conventions. Built for developers and designers making iOS, iPadOS, macOS or visionOS interfaces. Checks existing project design context before asking questions.
Creates production-ready FastAPI project structures with async patterns, dependency injection, and error handling. It is for developers starting new FastAPI applications or backend API projects.
Analyzes Android apps to find user workflows to expose as AppFunctions, so AI agents and system shortcuts can run them without opening the app UI. Generates Kotlin code and refines KDoc for Android developers.
Creates, edits, validates and runs Agent QA tests, suites and hooks through MCP or CLI. It keeps canonical IDs and schema contracts intact, for developers and QA teams using Agent QA.
Compare with openclaw-github-repo-commander, gradio or hig-components-menus
add-ai-integration: common questions
What patterns does this skill cover for AI integrations?
It covers native tracing channels, orchestrion-injected channels, and callback or exporter hooks. The source maps each pattern to example files such as vercel-ai, openai and langchain.
Should I hardcode span ops or attributes when adding a provider?
No. The source says ops and attributes are specified outside the repo and should be imported from @sentry/conventions, with the op derived via getGenAiSpanOp().
Does this skill cover testing a new AI integration?
Yes. It requires E2E tests in dev-packages/node-integration-tests/suites/tracing/ and, where supported, in cloudflare-integration-tests.
How do I install add-ai-integration?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is add-ai-integration free?
The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.
Is add-ai-integration safe to use?
It scores 77 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to add-ai-integration?
Similar skills: openclaw-github-repo-commander, gradio, hig-components-menus, fastapi-templates.
