Skip to content

feat(agent-skills): Update docs to match getsentry/sentry-for-ai#16629

Open
codyde wants to merge 4 commits intomasterfrom
update-agent-skills-sentry-for-ai
Open

feat(agent-skills): Update docs to match getsentry/sentry-for-ai#16629
codyde wants to merge 4 commits intomasterfrom
update-agent-skills-sentry-for-ai

Conversation

@codyde
Copy link
Contributor

@codyde codyde commented Mar 2, 2026

DESCRIBE YOUR PR

Update all agent skills documentation to reflect the repo rename from getsentry/sentry-agent-skills to getsentry/sentry-for-ai, along with skill renames, removals, and additions.

  • Replace getsentry/sentry-agent-skillsgetsentry/sentry-for-ai across 26 files (docs, platform-includes, install commands, skills.sh URLs)
  • Rename setup skills to new -sdk convention (e.g. sentry-react-setupsentry-react-sdk)
  • Remove consolidated feature skills (sentry-setup-tracing, sentry-setup-logging, sentry-setup-metrics) — now handled by per-platform SDK skills
  • Add new platform SDKs: Next.js, .NET, Go, Svelte, OpenTelemetry exporter
  • Add sentry-code-review to workflow skills table
  • Add warn-only CI sync check script (scripts/check-agent-skills-sync.mjs) to detect future drift

IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs to go live.

  • Urgent deadline (GA date, etc.):
  • Other deadline:
  • None: Not urgent, can wait up to 1 week+

SLA

  • Teamwork makes the dream work, so please add a reviewer to your PRs.
  • Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it.
    Thanks in advance for your help!

PRE-MERGE CHECKLIST

Make sure you've checked the following before merging your changes:

  • Checked Vercel preview for correctness, including links
  • PR was reviewed and approved by any necessary SMEs (subject matter experts)
  • PR was reviewed and approved by a member of the Sentry docs team

Co-Authored-By: Claude noreply@anthropic.com

The canonical agent skills repo moved from getsentry/sentry-agent-skills
to getsentry/sentry-for-ai. Skills were renamed (e.g. sentry-react-setup
→ sentry-react-sdk), three feature skills were consolidated into
per-platform SDK skills, and several new skills were added.

- Update repo name and skills.sh URLs across 26 files
- Rename setup skills to new -sdk naming convention
- Remove consolidated sentry-setup-{tracing,logging,metrics} skills
- Add new platform SDKs: Next.js, .NET, Go, Svelte, OTel exporter
- Add sentry-code-review to workflow skills table
- Add CI sync check script (warn-only, does not fail build)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Mar 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sentry-docs Ready Ready Preview, Comment Mar 2, 2026 3:34pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
develop-docs Ignored Ignored Preview Mar 2, 2026 3:34pm

Request Review

@codeowner-assignment codeowner-assignment bot requested a review from a team March 2, 2026 07:43
@codyde codyde removed the request for review from a team March 2, 2026 07:43
@codeowner-assignment codeowner-assignment bot requested a review from a team March 2, 2026 07:44
@codyde codyde removed the request for review from a team March 2, 2026 07:44
'Failed to fetch skills from GitHub. Is `gh` CLI installed and authenticated?'
);
console.error(err.message);
process.exit(2);
Copy link

Choose a reason for hiding this comment

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

Bug: The script can exit with a non-zero code via process.exit(2) or an unhandled promise rejection, contradicting its documented "warn-only, always exit 0" behavior.
Severity: MEDIUM

Suggested Fix

Ensure the script always exits with code 0 to adhere to its documented contract. Wrap the main() call in a try...catch block and handle errors by logging them. In all failure cases, including API errors or unhandled rejections, explicitly call process.exit(0) after logging the warning message. This aligns with the pattern used in similar scripts like lint-external-links.mjs.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: scripts/check-agent-skills-sync.mjs#L35

Potential issue: The script is documented as "warn-only" with an "always 0" exit code.
However, it violates this contract in two ways. First, it explicitly calls
`process.exit(2)` on line 35 if the GitHub API fetch fails. Second, the top-level call
to `main()` on line 92 is not awaited. If `main()` throws an error (e.g., a file read
fails), this will cause an unhandled promise rejection, leading to a non-zero exit code.
When this script is used in CI, these conditions will cause the build to fail, contrary
to its intended "warn-only" purpose.

Did we get this right? 👍 / 👎 to inform future reviews.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

let match;
while ((match = tableRowRegex.exec(content)) !== null) {
skills.add(match[1]);
}
Copy link

Choose a reason for hiding this comment

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

Regex matches file paths as skill names, causing false drift

Medium Severity

The tableRowRegex in getDocSkills() matches any backtick-wrapped text between pipe characters, not just skill names. The Quick Reference table in agent-skills.mdx contains backtick-wrapped file paths like ~/.claude/skills/, .claude/skills/, ~/.codex/skills/, etc. These will all be extracted as "documented skills," causing the script to always report false drift ("Skills in docs but NOT in repo") for ~12 path entries, making the drift detection tool permanently noisy and unreliable.

Fix in Cursor Fix in Web

* Usage: node scripts/check-agent-skills-sync.mjs
*
* Requires: `gh` CLI authenticated, or GITHUB_TOKEN env var.
* Exit code: always 0 (warn-only, does not fail the build).
Copy link

Choose a reason for hiding this comment

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

Script exits non-zero despite documenting "always 0"

Low Severity

The JSDoc header on line 8 states "Exit code: always 0 (warn-only, does not fail the build)" but process.exit(2) on line 35 exits non-zero when gh CLI fails. Anyone integrating via the check:skills-sync npm script and trusting the "always 0" contract could face unexpected CI failures if gh isn't configured in the environment.

Additional Locations (1)

Fix in Cursor Fix in Web

@codeowner-assignment codeowner-assignment bot requested a review from a team March 2, 2026 14:36
Comment on lines +44 to +48
const tableRowRegex = /\|\s*`([^`]+)`\s*\|/g;
let match;
while ((match = tableRowRegex.exec(content)) !== null) {
skills.add(match[1]);
}
Copy link

Choose a reason for hiding this comment

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

Bug: The regex in getDocSkills() is too broad and incorrectly matches file paths in the documentation, causing false positive warnings.
Severity: MEDIUM

Suggested Fix

Refine the regular expression in getDocSkills() to be more specific. For example, modify it to exclude strings containing slashes (/) or to only match patterns that resemble skill names (e.g., alphanumeric characters with hyphens). This will prevent it from incorrectly capturing file system paths from the documentation's "Quick Reference" table.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: scripts/check-agent-skills-sync.mjs#L44-L48

Potential issue: The regex pattern `/\|\s*`([^`]+)`\s*\|/g` in the `getDocSkills`
function is overly broad. It is intended to find agent skill names in markdown
documentation, but it matches any backticked text within a table cell. This causes it to
incorrectly extract file system paths like `` `~/.claude/skills/` `` from the "Quick
Reference" table in `docs/ai/agent-skills.mdx`. These paths are not actual skills, so
when the script compares them to the skills in the repository, it generates false
positive warnings about "Skills in docs but NOT in repo", creating noise and confusion
for developers.

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.

4 participants