Skip to content

[skills] Add vercel-tracing skill - #336

Merged
molebox merged 14 commits into
mainfrom
add-vercel-tracing-skill
Oct 19, 2026
Merged

molebox merged 14 commits into
mainfrom
add-vercel-tracing-skill

Conversation

@kakadiadarpan

@kakadiadarpan kakadiadarpan commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Intent

Agents have no guidance for setting up OpenTelemetry on Vercel. They guess where registerOTel goes, miss incoming trace context, and misread vercel traces output. Spans then land in the wrong trace, or nobody checks them.

Approach

A new vercel-tracing skill focused on instrumentation setup. SKILL.md has a setup workflow with the Next.js registration snippet, an investigation workflow, and notes on how the CLI behaves in agent (non-interactive) mode. Short references cover framework setup (Next.js, SvelteKit, any other framework), custom spans, context propagation, sampling, capture, search, inspection, performance, and troubleshooting. Search guidance matches the JSON Lines output of Vercel CLI 64.

The performance-optimizer agent includes the investigation workflow. vercel-cli and vercel-functions chain to the skill on vercel traces and @vercel/otel.

Agents followed the skill on fresh Next.js 16.4 and SvelteKit 3 apps deployed to Vercel previews. Setup worked on the first deploy, and custom spans nested under the request in the same trace.


Update (@molebox)

Merged main and fixed the review findings. Every claim was re-checked against source: the shipped vercel@64.5.0 package (the public vercel/vercel main has no traces search yet), @vercel/otel 2.1.3, Next.js and SvelteKit source.

  • Skill counts set to 36 (CLAUDE.md, README heading and file tree).
  • Overlap with [skills] Load vercel-cli for production debugging and request traces #335: vercel traces prompts now route to vercel-tracing. vercel-cli drops the vercel traces phrase and [vercel, traces] group, and its description points trace and OpenTelemetry work here. It keeps [skills] Load vercel-cli for production debugging and request traces #335's general debugging wording (errors, 5xx, timeouts) and the chainTo to vercel-tracing.
  • False positives: [app, slow] and [take, seconds] matched unrelated prompts ("approach this slowly", "takes a few seconds"). They're tightened, and the new negative tests failed before this fix.
  • Request IDs: vercel.request_id in JSON output can carry a region prefix (iad1::…). The CLI strips it only in the table column. The jq examples in inspection.md and search.md now handle it.
  • CLI version: the agent vercel switch refusal arrived in 64.0.2, not 64.0 (diffed npm tarballs 64.0.1 vs 64.0.2).
  • Non-interactive mode: the description now matches the CLI's actual condition (--non-interactive, or an agent with no TTY on stdin).
  • @vercel/otel: by default trace context also goes to the incoming request's host, so "a custom domain" became "any other domain".
  • Built-in outbound spans: "times fetch and node:http" became "outbound HTTP requests", which is what the docs say.

Checks: build:skills:check, build:from-skills:check, validate, and bun run test (1228 pass).

Docs drift found along the way, for the docs team: /docs/tracing/instrumentation says Next.js 13.4+ extracts incoming trace context (source: 14.0.1), and the always-on/session tracing pages still show vercel traces get.

@lucleray lucleray left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks! a few non-blocking notes inline 👍

Comment thread skills/vercel-tracing/references/search.md Outdated
Comment thread skills/vercel-tracing/SKILL.md Outdated
Comment thread skills/vercel-tracing/SKILL.md Outdated
Comment thread agents/performance-optimizer.md.tmpl
Comment thread skills/vercel-tracing/references/custom-spans.md Outdated
Comment thread skills/vercel-tracing/references/nextjs.md Outdated
Comment thread skills/vercel-tracing/SKILL.md Outdated
Resolve skill-count conflicts in CLAUDE.md and README.md: main has 35 skills (daemons, vercel-flags), this branch adds vercel-tracing for 36.
…s slowness triggers

vercel-cli (#335) and vercel-tracing both claimed "vercel traces" prompts, and vercel-cli scored higher. vercel-tracing now owns the vercel traces phrase; vercel-cli drops its traces prompt signals and its description points trace work to vercel-tracing, keeping general CLI debugging. The vercel-cli → vercel-tracing chainTo for traces commands is unchanged.

Prompt terms match as substrings, so the [app, slow] and [take, seconds] groups fired on "approach ... slowly", "apply ... slowly", and "takes a few seconds to install". Replace them with phrase-anchored app groups and take/seconds groups that also require a server noun, and add negative and cross-skill routing tests.
…ource

- Strip routing-region prefixes (iad1::) from vercel.request_id before inspect; JSON Lines keeps them, while the CLI's REQUEST ID column and traces create strip through the last "::".
- Agent saved-team handling and agent_cannot_switch shipped in CLI 64.0.2, not 64.0.1.
- Agent non-interactive mode and the production --yes requirement depend on stdin not being a TTY.
- @vercel/otel propagates by default to the incoming request's host too, so only other domains need allow rules.
- Describe automatic outbound spans as outbound HTTP requests, as the docs do.
molebox added a commit that referenced this pull request Oct 19, 2026
Counts assume vercel-tracing (#336) merges first.
@molebox
molebox merged commit 613d8e9 into main Oct 19, 2026
5 checks passed
@molebox
molebox deleted the add-vercel-tracing-skill branch October 19, 2026 11:55
molebox added a commit that referenced this pull request Oct 19, 2026
* [skills] Add offload-to-sandbox skill

Adds "Offloading work to a Vercel Sandbox": how to use the vercel sandbox CLI as remote workers for heavy builds, test suites, benchmarks and parallel agent experiments. Covers base snapshots, per-task sandboxes, source pushes that keep dependencies, detached long jobs, fair A/B benchmarking inside one VM, sharding, baseline failure triage, auth, a small wrapper script, and cost hygiene. Complements vercel-sandbox, which covers running untrusted code through the SDK.

* [skills] Trim benchmarking details from offload-to-sandbox

Keep the skill to what an agent needs to get offloaded work done: drop the benchmarking section and related signals, keeping one note about comparing timings in the same sandbox, and remove pitfalls that repeat earlier sections.

* [skills] Correct offload-to-sandbox lifetime, limits, and CLI details

Create task sandboxes with --non-persistent and clean up with remove,
state plan limits, read the snapshot ID from stderr, work around
vercel sandbox exec dropping the remote exit code, and make the sbx
wrapper a standalone script. Keep vercel-sandbox out of offload and
shard prompts.

* [skills] Add offload-to-sandbox tests and README listing

Counts assume vercel-tracing (#336) merges first.

---------

Co-authored-by: molebox <rich@vercel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants