home / skills / jeremylongshore / claude-code-plugins-plus-skills / sentry-release-management

This skill helps you manage Sentry releases and link commits automatically, optimizing release workflows and artifact handling.

npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill sentry-release-management

Review the files below or copy the command above to add this skill to your agents.

Files (5)
SKILL.md
1.8 KB
---
name: sentry-release-management
description: |
  Manage Sentry releases and associate commits.
  Use when creating releases, tracking commits,
  or managing release artifacts.
  Trigger with phrases like "sentry release", "sentry commits",
  "manage sentry versions", "sentry release workflow".
allowed-tools: Read, Write, Edit, Bash(sentry-cli:*), Bash(git:*), Grep
version: 1.0.0
license: MIT
author: Jeremy Longshore <[email protected]>
---

# Sentry Release Management

## Prerequisites

- Sentry CLI installed (`npm install -g @sentry/cli`)
- `SENTRY_AUTH_TOKEN` environment variable set
- `SENTRY_ORG` and `SENTRY_PROJECT` configured
- Source maps available in build output

## Instructions

1. Create release using git SHA, semantic version, or package.json version
2. Associate commits with sentry-cli releases set-commits --auto
3. Upload source maps from build directory with URL prefix if needed
4. Finalize release to mark it complete
5. Configure SDK release option to match CLI release version
6. Set up Webpack DefinePlugin or environment variable for build-time injection
7. Use release management API to list, view, or delete releases
8. Connect GitHub/GitLab integration for automatic commit linking
9. Create release script to automate the full workflow
10. Implement source map cleanup for old releases to manage storage

## Output
- Release created with version identifier
- Commits associated with release
- Source maps uploaded
- Release finalized and ready

## Error Handling

See `{baseDir}/references/errors.md` for comprehensive error handling.

## Examples

See `{baseDir}/references/examples.md` for detailed examples.

## Resources
- [Sentry Releases](https://docs.sentry.io/product/releases/)
- [Sentry CLI Releases](https://docs.sentry.io/product/cli/releases/)

Overview

This skill automates Sentry release creation, commit association, and source map uploads to streamline error tracking across deployments. It provides a practical workflow to create, finalize, and manage release artifacts so errors map back to the correct source. Use it to enforce consistent release identifiers and reduce manual steps in release pipelines.

How this skill works

The skill uses Sentry CLI and API operations to create a release identifier (git SHA, semantic version, or package.json version), set associated commits, upload source maps, and finalize the release. It can run in CI/CD or local build scripts, inject the release into your SDK configuration, and optionally clean up old source maps to manage storage. Integrations with GitHub/GitLab are used for automatic commit linking when available.

When to use it

  • When deploying a new build and you need a reproducible Sentry release version
  • When you want commits automatically linked to a release for precise error attribution
  • When uploading source maps so stack traces map to original code
  • When creating CI/CD release scripts to standardize release workflows
  • When cleaning up old release artifacts to control Sentry storage and costs

Best practices

  • Install and configure Sentry CLI and set SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT in CI
  • Generate releases from a single authoritative source (git SHA or package.json) to avoid mismatches
  • Inject the release version into the runtime SDK via environment variables or Webpack DefinePlugin
  • Use set-commits --auto or repository integrations to reliably associate commits
  • Upload source maps with correct URL prefixes and validate uploads before finalizing
  • Automate release creation, upload, finalize, and cleanup steps in a script or pipeline

Example use cases

  • CI job: create release from git SHA, upload source maps, associate commits, finalize release
  • Local build: generate a semantic version, inject it into the app, and push source maps for staging
  • Maintenance script: list older releases and delete source maps for releases older than X days
  • Repository setup: enable GitHub/GitLab integration to automatically link commits to releases
  • Developer workflow: use package.json version for quick test releases and validation

FAQ

What are the prerequisites to run this skill?

Sentry CLI installed, SENTRY_AUTH_TOKEN, SENTRY_ORG, and SENTRY_PROJECT configured, and source maps available from the build output.

How do I ensure the SDK reports the same release as the CLI?

Inject the CLI release identifier into runtime via environment variables or build-time injection like Webpack DefinePlugin so the SDK release matches exactly.