Tracks errors with Bugsnag: uploading source maps, notifying via API, and managing releases with the bugsnag CLI.
Agentic Workflow: Read -> Reason -> Act (bugsnag-error-tracking)
You are Bugsnag Error Tracking (api/general) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — api context for bugsnag-error-tracking
- Domain: Tracks errors with Bugsnag: uploading source maps, notifying via API, and managing releases with the bugsnag CLI.
- sourcemaps: Upload source maps so stack traces are readable. —
bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --so
- notify-api: Send errors to Bugsnag's notify API. —
curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d
- releases: Track releases so Bugsnag links errors to versions. —
bugsnag-cli release --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --stage produ
- Check
knowledge and prerequisites: bugsnag-cli, npx
2. Reason — think for bugsnag-error-tracking
- For
sourcemaps: Upload source maps so stack traces are readable. — decide which checks to run
- For
notify-api: Send errors to Bugsnag's notify API. — decide which checks to run
- For
releases: Track releases so Bugsnag links errors to versions. — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with bugsnag-error-tracking tools
- Tools:
Glob, Grep, Read, Bugsnag-cli, Npx (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
bugsnag-error-tracking:4c578ae5
Bugsnag Error Tracking
What this skill does
Tracks errors with Bugsnag: uploading source maps per release so stack traces are readable, sending test notifications to the notify API, and recording releases via the bugsnag CLI.
When to use
- Minified JS stack traces are unreadable (missing source maps)
- Verifying API keys/notifications from CI
- Associating errors with app versions
Real commands
# Upload a source map
bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map
# Alternative: npx sourcemap uploader
npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.3
# Send a test event
curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Test","message":"hello"}]}]}'
# Record a release
bugsnag-cli release --api-key $KEY --app-version 1.2.3 --stage production
Testing
- Send a notify probe and confirm 200
- Upload a map then trigger an error; verify the stack trace is de-minified
Best practices
- Upload source maps in the same CI job as the deploy
- Pin the app-version to your release tag
- Send releases with stage + metadata for filtering
Capabilities
sourcemaps
Upload source maps so stack traces are readable.
Parameters:
api_key (string): Bugsnag project API key
app_version (string): Version the map belongs to
source_map (string): Path to .map file
Commands:
bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map
npx bugsnag-sourcemaps upload --api-key $BUGSNAG_API_KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.3
bugsnag-cli sourcemap upload --api-key $KEY --app-version 1.2.3 --source-map ./dist/*.map
npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --public-path /assets
Examples:
- bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map
- npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.3
- npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/app.js --source-map dist/app.js.map --upload-sources
notify-api
Send errors to Bugsnag's notify API.
Parameters:
error_class (string): Error class name
message (string): Error message
severity (string): error, warning, or info
Commands:
curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"TestError","message":"manual notify"}],"severity":"warning"}]}'
curl -s -o /dev/null -w "%{http_code}\n" -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"healthcheck"}]}]}'
curl -s -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"ok"}],"severity":"info"}]}'
Examples:
- curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Test","message":"hello"}]}]}'
- curl -s -o /dev/null -w "%{http_code}\n" -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"test"}]}]}'
- curl -s -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"InfoProbe","message":"ok"}],"severity":"info","context":"ci"}]}'
releases
Track releases so Bugsnag links errors to versions.
Parameters:
app_version (string): Version being released
stage (string): Deployment stage
Commands:
bugsnag-cli release --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --stage production
bugsnag-cli releases list --api-key $KEY --project-root .
bugsnag-cli --version
bugsnag-cli help
Examples:
- bugsnag-cli release --api-key $KEY --app-version 1.2.3 --stage production
- bugsnag-cli release --api-key $KEY --app-version 1.2.4 --stage staging --metadata "commit=$(git rev-parse HEAD)"
- bugsnag-cli releases list --api-key $KEY
References
1---2name: "bugsnag-error-tracking"3description: "Tracks errors with Bugsnag: uploading source maps, notifying via API, and managing releases with the bugsnag CLI. Use when working with sourcemaps, notify api, releases or when the user mentions sourcemaps, notify api, releases."4license: "MIT"5compatibility: "Requires bugsnag-cli, npx. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/bugsnag-error-tracking8 author: Kdesk9 version: 2.0.010 category: api11allowed-tools: "Glob Grep Read Bash(bugsnag-cli:*) Bash(curl:*) Bash(npx:*)"12---1314Tracks errors with Bugsnag: uploading source maps, notifying via API, and managing releases with the bugsnag CLI.1516## Agentic Workflow: Read -> Reason -> Act (bugsnag-error-tracking)1718You are **Bugsnag Error Tracking** (api/general) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — api context for `bugsnag-error-tracking`21- Domain: Tracks errors with Bugsnag: uploading source maps, notifying via API, and managing releases with the bugsnag CLI.22- **sourcemaps**: Upload source maps so stack traces are readable. — `bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --so`23- **notify-api**: Send errors to Bugsnag's notify API. — `curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d `24- **releases**: Track releases so Bugsnag links errors to versions. — `bugsnag-cli release --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --stage produ`25- Check `knowledge` and `prerequisites: bugsnag-cli, npx`2627### 2. Reason — think for `bugsnag-error-tracking`28- For `sourcemaps`: Upload source maps so stack traces are readable. — decide which checks to run29- For `notify-api`: Send errors to Bugsnag's notify API. — decide which checks to run30- For `releases`: Track releases so Bugsnag links errors to versions. — decide which checks to run31- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3233### 3. Act — execute with `bugsnag-error-tracking` tools34- Tools: `Glob`, `Grep`, `Read`, `Bugsnag-cli`, `Npx` (see frontmatter `tools`/`allowed-tools`)35- Use `safe_path` for any write; record evidence (paths, checksums)36- Fingerprint: `bugsnag-error-tracking:4c578ae5`3738# Bugsnag Error Tracking3940## What this skill does4142Tracks errors with Bugsnag: uploading source maps per release so stack traces are readable, sending test notifications to the notify API, and recording releases via the bugsnag CLI.4344## When to use4546- Minified JS stack traces are unreadable (missing source maps)47- Verifying API keys/notifications from CI48- Associating errors with app versions4950## Real commands5152```bash53# Upload a source map54bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map5556# Alternative: npx sourcemap uploader57npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.35859# Send a test event60curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Test","message":"hello"}]}]}'6162# Record a release63bugsnag-cli release --api-key $KEY --app-version 1.2.3 --stage production64```6566## Testing6768- Send a notify probe and confirm 20069- Upload a map then trigger an error; verify the stack trace is de-minified7071## Best practices7273- Upload source maps in the same CI job as the deploy74- Pin the app-version to your release tag75- Send releases with stage + metadata for filtering7677## Capabilities7879### sourcemaps80Upload source maps so stack traces are readable.8182**Parameters:**83- `api_key` (string): Bugsnag project API key84- `app_version` (string): Version the map belongs to85- `source_map` (string): Path to .map file8687**Commands:**88- `bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map`89- `npx bugsnag-sourcemaps upload --api-key $BUGSNAG_API_KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.3`90- `bugsnag-cli sourcemap upload --api-key $KEY --app-version 1.2.3 --source-map ./dist/*.map`91- `npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --public-path /assets`9293**Examples:**94- bugsnag-cli sourcemap upload --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --source-map ./dist/app.js.map95- npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/bundle.js --source-map dist/bundle.js.map --app-version 1.2.396- npx bugsnag-sourcemaps upload --api-key $KEY --minified-file dist/app.js --source-map dist/app.js.map --upload-sources9798### notify-api99Send errors to Bugsnag's notify API.100101**Parameters:**102- `error_class` (string): Error class name103- `message` (string): Error message104- `severity` (string): error, warning, or info105106**Commands:**107- `curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"TestError","message":"manual notify"}],"severity":"warning"}]}'`108- `curl -s -o /dev/null -w "%{http_code}\n" -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"healthcheck"}]}]}'`109- `curl -s -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$BUGSNAG_API_KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"ok"}],"severity":"info"}]}'`110111**Examples:**112- curl -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Test","message":"hello"}]}]}'113- curl -s -o /dev/null -w "%{http_code}\n" -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"Probe","message":"test"}]}]}'114- curl -s -X POST https://notify.bugsnag.com/ -H "Content-Type: application/json" -d '{"apiKey":"$KEY","events":[{"payloadVersion":4,"exceptions":[{"errorClass":"InfoProbe","message":"ok"}],"severity":"info","context":"ci"}]}'115116### releases117Track releases so Bugsnag links errors to versions.118119**Parameters:**120- `app_version` (string): Version being released121- `stage` (string): Deployment stage122123**Commands:**124- `bugsnag-cli release --api-key $BUGSNAG_API_KEY --app-version 1.2.3 --stage production`125- `bugsnag-cli releases list --api-key $KEY --project-root .`126- `bugsnag-cli --version`127- `bugsnag-cli help`128129**Examples:**130- bugsnag-cli release --api-key $KEY --app-version 1.2.3 --stage production131- bugsnag-cli release --api-key $KEY --app-version 1.2.4 --stage staging --metadata "commit=$(git rev-parse HEAD)"132- bugsnag-cli releases list --api-key $KEY133134## References135- [Bugsnag Docs](https://docs.bugsnag.com/)136- [Bugsnag Source Maps](https://docs.bugsnag.com/platforms/javascript/source-maps/)137- [Error Tracking API](https://docs.bugsnag.com/api/error-tracking/)