.agents/skills/qa/SKILL.md
QA test changes against the local dev server. Use when explicitly invoked via /qa to verify changes work end-to-end.
npx skillsauth add getsentry/sentry-mcp qaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Verify changes work end-to-end before committing or creating a PR.
pnpm run tsc && pnpm run lint && pnpm run test
Fix any failures before proceeding.
This is the primary QA method. It uses an AI agent to exercise MCP tools against the local dev server.
Run pnpm dev in the background. It starts at http://localhost:5173. Verify it's up:
curl -s -o /dev/null -w "%{http_code}" http://localhost:5173/
If it returns a non-200 or fails to connect, the server isn't running yet — wait and retry.
The CLI connects to the local dev server via HTTP by default (no flags needed):
# Verify auth and connectivity
pnpm -w run cli "who am I?"
# Verify tools are available (count varies by granted skills)
pnpm -w run cli "list all available tools"
# Test a specific tool relevant to your changes
pnpm -w run cli "find my organizations"
Look for Connected to MCP server (remote) in output to confirm HTTP transport to the dev server.
Tests the use_sentry meta-tool instead of individual tools. ~2x slower:
pnpm -w run cli --agent "show me my recent errors"
If your changes involve experimental tools:
pnpm -w run cli --experimental "your query"
Run this step when your changes touch stdio transport, auth, device-code flow, token caching, npm package behavior, or mcp-test-client.
These do not require a browser:
# Explicit-token stdio path
pnpm -w run cli --transport stdio --access-token=TOKEN --list-tools
# No-token, non-interactive path should fail with the auth guidance
pnpm -w run cli --transport stdio --list-tools
Look for Connected to MCP server (stdio) in the explicit-token case.
In the no-token non-interactive case, expect the error that instructs you to run sentry-mcp auth login interactively first.
Use an isolated cache file so QA does not depend on or overwrite ~/.sentry/mcp.json:
AUTH_DIR=$(mktemp -d /tmp/sentry-mcp-auth.XXXXXX)
export SENTRY_MCP_AUTH_CACHE="$AUTH_DIR/mcp.json"
pnpm -w run cli --transport stdio --list-tools
This must run in a real TTY. The server should print a Sentry device-code URL and wait for authorization. Complete the browser flow, then confirm the client connects and lists tools.
After the device-code login succeeds, run the same command again with the same SENTRY_MCP_AUTH_CACHE:
pnpm -w run cli --transport stdio --list-tools
Confirm that it reuses the cached token and lists tools without starting another browser-based login.
Run this step when validating Claude Code, Codex, or another issue that only reproduces in a real agent client.
The repo includes a harness package that uses the installed local CLI session instead of the mcp-test-client:
# Claude Code against the local dev server MCP entry
pnpm -w run agent-cli-test --provider claude --setup repo
# Codex against the local dev server MCP entry
pnpm -w run agent-cli-test --provider codex --setup repo
# Claude Code against the checked-in stdio MCP entry
pnpm -w run agent-cli-test --provider claude --setup stdio
# Codex against the checked-in stdio MCP entry
pnpm -w run agent-cli-test --provider codex --setup stdio
What this verifies:
whoamiUse --setup repo --server sentry if you want to test the hosted server instead of the local sentry-dev entry.
The checked-in stdio setup uses packages/agent-cli-test/projects/stdio/.sentry/mcp.json as an isolated auth cache.
Real clients do not give stdio subprocesses a TTY, so the first-run device-code flow must be warmed separately:
pnpm -w run agent-cli-test auth login
If the harness fails, rerun the provider directly with debug enabled so you can see the MCP startup failure:
# Claude Code: capture a debug log for the real prompt run
claude --mcp-config /tmp/claude-sentry-dev-config.json --strict-mcp-config --permission-mode bypassPermissions --no-session-persistence --debug-file /tmp/claude-sentry-dev.log -p 'Use the "whoami" tool from the MCP server named "sentry-dev". Call it exactly once. Reply with only the authenticated email address.'
# Codex: capture MCP handshake and transport logs
RUST_LOG=codex_core=debug,rmcp=debug RUST_BACKTRACE=1 codex exec --skip-git-repo-check --sandbox read-only --output-last-message /tmp/codex-sentry-dev-last.txt 'Use only the MCP server named "sentry-dev". Call the "whoami" tool exactly once. Reply with only the authenticated email address.'
Look for these signatures:
ToolSearchTool, mcp__sentry-dev__whoami, missing server/tool selection, tool permission deniedUnexpectedContentType, AuthRequired, resources/list failedThese methods require human interaction and cannot be run by the agent. Suggest them to the user when relevant.
Interactive web UI for testing individual tools with specific parameters:
pnpm inspector # HTTP transport, opens http://localhost:6274
pnpm inspector:stdio # Stdio transport, direct connection
Full browser-based testing with OAuth authentication:
pnpm devhttp://localhost:5173Constraint testing via URL paths:
http://localhost:5173/mcp/org-slug — org-scopedhttp://localhost:5173/mcp/org-slug/project-slug — project-scopedUse this when specifically testing the published/package build rather than the local dev server:
# Build first
pnpm -w run build
# Test via stdio transport with an explicit token
pnpm -w run cli --transport stdio --access-token=TOKEN "who am I?"
Look for Connected to MCP server (stdio) to confirm stdio transport.
testing
Guide for writing tests. Use when adding new functionality, fixing bugs, or when tests are needed. Emphasizes integration tests, real-world fixtures, and regression coverage.
testing
Alias for sentry-skills:skill-writer. Use when users explicitly ask for "skill-creator" or reference the legacy skill name. Redirects to the canonical skill authoring workflow.
development
Review code for correct logging and error handling patterns. Use when reviewing code that handles errors, uses logging functions, or captures exceptions. Enforces the error hierarchy where 4xx errors are never logged to Sentry and 5xx errors always are. Trigger phrases include "review logging", "check error handling", "audit observability", or verify correct use of logIssue vs logError.
testing
Alias for sentry-skills:pr-writer. Use when users explicitly ask for "create-pr" or reference the legacy skill name. Redirects to the canonical PR writing workflow.