Instrument with AI
Claude Code skills
Drive Otis instrumentation from Claude Code using a set of slash commands backed by the Otis MCP server.
Install the Otis skills into Claude Code and get a set of slash commands that walk Claude Code through instrumenting your app: analyze, instrument, verify, status. The skills run locally in your own Claude Code session; live project state and reference material come from Otis's MCP server.
If you want Otis to run instrumentation for you automatically, use the GitHub App. For Cursor and other MCP-capable agents, see MCP server. All three paths share the same project state.
What you get
Four slash commands plus live access to your Otis project:
| Command | Purpose |
|---|---|
/otis-analyze | Profiles your codebase and picks relevant measurements |
/otis-instrument | Installs the SDK, adds instrumentation, runs tests, creates a single PR |
/otis-verify | Runs local checks and inspects arriving spans for issues |
/otis-status | Shows current instrumentation progress at a glance |
Each skill is a multi-step workflow. The skill tells Claude Code which steps to take; Claude Code reads the code, writes code, runs tests, and calls Otis's MCP server for live project state and reference material.
Install
npx @runotis/setup --team <team-slug> --project <project-slug>What the setup command does:
- Writes
.mcp.jsonpointing at your Otis project's MCP endpoint. - Writes the four skill files into
.claude/skills/otis-{analyze,instrument,verify,status}/SKILL.md. - Prefetches SDK and measurement reference docs into
.otis-cache/docs/for zero-latency reads. - Adds
.otis-cache/to your.gitignore.
Re-run the same command any time to sync the latest skill files and docs. Pass --refresh to force a full rewrite.
First-time auth
Claude Code's built-in MCP OAuth handles auth automatically. The first time a skill calls the MCP server, Claude Code opens a browser window for you to sign in via Clerk (the same login you use for the Otis dashboard). There are no API keys to manage and no secrets stored in your repo.
Typical flow
Start in a repo where you've run npx @runotis/setup:
/otis-analyze → profile the codebase, pick measurements
/otis-instrument → add SDK + instrumentation, run tests, open a PR
# merge the PR and deploy
/otis-verify → check arriving spans against expectations/otis-status is always available as a read-only summary of where things stand.
/otis-analyze
Claude Code scans your entry points, framework usage, and any existing telemetry; writes a codebase profile back to your Otis project; then assesses which Otis measurements are a good fit based on the patterns it sees. Recommendations are surfaced in-session for you to accept or skip, and saved back to your project.
/otis-instrument
For each measurement you've accepted:
- Installs
@runotis/sdkif not already present. - Adds initialization following the right integration guide for your runtime.
- Adds per-measurement instrumentation in code —
wrap()around AI framework calls,traced()around relevant helpers, context pulled from your auth. - Records declared span mappings back into your project so the dashboard knows what to expect.
- Runs your lint, type-check, and test scripts. Fixes obvious failures in-place.
- Opens a single PR with all the changes.
/otis-verify
Runs local checks again, then uses the MCP server to inspect recent ingestion:
- Has instrumentation code hit production yet (spans arriving in the last 24 hours)?
- Are the expected attributes showing up on those spans?
- Are any measurements silent that should be producing spans?
Surfaces issues directly in-session, and can propose fixes if the instrumentation code needs adjustment.
/otis-status
Shows the current phase of each measurement: recommended / in progress / instrumented / verified / skipped, plus any open issues.
What gets written to your repo
.mcp.json— points at your Otis project. Commit this to share with your team..claude/skills/otis-*/SKILL.md— the four skill workflows. Commit these..otis-cache/docs/— prefetched SDK and measurement reference. Gitignored; regenerate any time withnpx @runotis/setup..otis-cache/itself is added to.gitignoreif not already present.
Working alongside the GitHub App
Skills and the GitHub App write to the same project state. If the GitHub App has already run on this repo, /otis-analyze picks up the existing profile and measurement recommendations instead of starting from scratch. Conversely, changes you make through the skills are visible to the automated path — so post-deploy verification works whether instrumentation landed via a GitHub App PR or a local one.
Updating
Re-run npx @runotis/setup --team <team-slug> --project <project-slug> at any time. The setup command content-hashes what's already on disk; if nothing's changed it prints "Already up to date." Add --refresh to force-rewrite skill files and refetch docs.