feat(agent-skills): Update docs to match getsentry/sentry-for-ai#16629
feat(agent-skills): Update docs to match getsentry/sentry-for-ai#16629
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
| 'Failed to fetch skills from GitHub. Is `gh` CLI installed and authenticated?' | ||
| ); | ||
| console.error(err.message); | ||
| process.exit(2); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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]); | ||
| } |
There was a problem hiding this comment.
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.
| * 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). |
There was a problem hiding this comment.
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)
| const tableRowRegex = /\|\s*`([^`]+)`\s*\|/g; | ||
| let match; | ||
| while ((match = tableRowRegex.exec(content)) !== null) { | ||
| skills.add(match[1]); | ||
| } |
There was a problem hiding this comment.
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.


DESCRIBE YOUR PR
Update all agent skills documentation to reflect the repo rename from
getsentry/sentry-agent-skillstogetsentry/sentry-for-ai, along with skill renames, removals, and additions.getsentry/sentry-agent-skills→getsentry/sentry-for-aiacross 26 files (docs, platform-includes, install commands, skills.sh URLs)-sdkconvention (e.g.sentry-react-setup→sentry-react-sdk)sentry-setup-tracing,sentry-setup-logging,sentry-setup-metrics) — now handled by per-platform SDK skillssentry-code-reviewto workflow skills tablescripts/check-agent-skills-sync.mjs) to detect future driftIS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST
Make sure you've checked the following before merging your changes:
Co-Authored-By: Claude noreply@anthropic.com