From 411275373a6758dc462b4ec91d7dbf162f18bb13 Mon Sep 17 00:00:00 2001 From: Daniel Griesser Date: Thu, 26 Feb 2026 18:36:39 +0100 Subject: [PATCH] chore: remove legacy setup skills and size-restricting guidelines (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove sentry-python-setup and sentry-ruby-setup skills — these are superseded by the comprehensive sentry-python-sdk and sentry-ruby-sdk bundles which cover all Sentry features with deep-dive references. Update cross-references in sentry-svelte-sdk to point to the full SDK bundle skills instead of the deleted setup skills. Remove size-restricting language (100-200 line targets, <500 line caps, token optimization warnings) from AGENTS.md, README.md, and sdk-skill-philosophy.md. The new direction favors comprehensive, all-encompassing skills that use references/ directories for deep-dive content loaded on demand. --- AGENTS.md | 27 ++---- README.md | 9 +- docs/sdk-skill-philosophy.md | 2 +- skills/sentry-python-setup/SKILL.md | 143 ---------------------------- skills/sentry-ruby-setup/SKILL.md | 141 --------------------------- skills/sentry-svelte-sdk/SKILL.md | 4 +- 6 files changed, 11 insertions(+), 315 deletions(-) delete mode 100644 skills/sentry-python-setup/SKILL.md delete mode 100644 skills/sentry-ruby-setup/SKILL.md diff --git a/AGENTS.md b/AGENTS.md index dac8835..a115c30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -103,31 +103,16 @@ Requirements before the skill can be used. ## Style Guidelines -### Token Optimization +### Comprehensive Over Concise -Skills are loaded into agent context, consuming tokens. **Keep skills concise** - target 100-200 lines. +Skills should be thorough and all-encompassing. Use `references/` directories to split deep-dive content into separate files loaded on demand — this keeps the main wizard lean while allowing references to go deep. | Do | Don't | |----|-------| -| Tables for reference data | Long prose explanations | -| Code snippets with minimal comments | Verbose code with extensive comments | -| Bullet points | Paragraphs | -| One example per pattern | Multiple redundant examples | - -**Example - Before (verbose):** -```markdown -To enable logging in JavaScript, you need to make sure you have the correct -version of the Sentry SDK installed. The minimum version required is 9.41.0. -Once you have confirmed the version, you can enable logging by adding the -enableLogs flag to your Sentry.init() configuration... -``` - -**Example - After (concise):** -```markdown -| Platform | Min SDK | Enable Flag | -|----------|---------|-------------| -| JavaScript | 9.41.0+ | `enableLogs: true` | -``` +| Tables for reference data | Long prose where a table works better | +| Complete, working code examples | Incomplete snippets that need guesswork | +| Deep-dive references for each feature | Superficial coverage that omits details | +| Comprehensive troubleshooting | Leaving users to figure out edge cases | ### Phases for Workflows diff --git a/README.md b/README.md index 3668f57..32eff40 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,6 @@ Official agent skills for integrating Sentry into your projects. These skills pr |-------|-------------|-----------|------| | `sentry-react-setup` | Setup Sentry in React apps | React | [React Guide](https://docs.sentry.io/platforms/javascript/guides/react/) | | `sentry-react-native-setup` | Setup Sentry in React Native using the wizard CLI | React Native, Expo | [React Native Guide](https://docs.sentry.io/platforms/react-native/) | -| `sentry-python-setup` | Setup Sentry in Python apps | Python (Django, Flask, FastAPI) | [Python Guide](https://docs.sentry.io/platforms/python/) | -| `sentry-ruby-setup` | Setup Sentry in Ruby apps | Ruby (Rails) | [Ruby Guide](https://docs.sentry.io/platforms/ruby/) | | `sentry-ios-swift-setup` | Setup Sentry in iOS/Swift apps | iOS (Swift, UIKit, SwiftUI) | [Apple Guide](https://docs.sentry.io/platforms/apple/guides/ios/) | | `sentry-setup-tracing` | Setup Sentry Tracing (Performance Monitoring) | JS, Python, Ruby | [Tracing](https://docs.sentry.io/platforms/javascript/tracing/) | | `sentry-setup-logging` | Setup Sentry Logging | JS, Python, Ruby | [Logs](https://docs.sentry.io/platforms/javascript/logs/) | @@ -315,8 +313,6 @@ Once installed, your AI assistant will automatically discover the skills. Simply | "Add Sentry to my React app" | `sentry-react-setup` | | "Add Sentry to my iOS/Swift app" | `sentry-ios-swift-setup` | | "Set up Sentry in React Native" | `sentry-react-native-setup` | -| "Add Sentry to my Python/Django/Flask app" | `sentry-python-setup` | -| "Set up Sentry in my Ruby/Rails app (quick)" | `sentry-ruby-setup` | | "Add performance monitoring to my app" | `sentry-setup-tracing` | | "Enable Sentry logging" | `sentry-setup-logging` | | "Track custom metrics with Sentry" | `sentry-setup-metrics` | @@ -380,8 +376,7 @@ Contributions are welcome! Please ensure any new skills: 1. Follow the [Agent Skills specification](https://agentskills.io/specification) 2. Have a valid `name` (lowercase letters, numbers, hyphens, 1-64 chars, no consecutive hyphens, must not start or end with hyphen) 3. Include a clear `description` (1-1024 chars) -4. **Keep skills concise** - use tables over prose, avoid obvious information -5. Include an "Invoke This Skill When" section with trigger phrases +4. Include an "Invoke This Skill When" section with trigger phrases 6. Verify technical details against [Sentry docs](https://docs.sentry.io/) For full-platform SDK skills (covering all Sentry features for one language/framework), see [docs/sdk-skill-philosophy.md](docs/sdk-skill-philosophy.md) for the bundle architecture pattern. @@ -392,7 +387,7 @@ For full-platform SDK skills (covering all Sentry features for one language/fram - Use phases/steps for multi-stage workflows - Include version requirements where applicable - Add troubleshooting tables for common issues -- Target ~100-200 lines per skill to minimize token usage +- SDK skill bundles should be comprehensive — use `references/` directories for deep-dive content loaded on demand --- diff --git a/docs/sdk-skill-philosophy.md b/docs/sdk-skill-philosophy.md index 56d3f2a..59d2bda 100644 --- a/docs/sdk-skill-philosophy.md +++ b/docs/sdk-skill-philosophy.md @@ -11,7 +11,7 @@ SDK skills are **living documentation bundles**. Instead of a flat SKILL.md that ``` skills/ sentry--sdk/ - SKILL.md # Main wizard (<500 lines) + SKILL.md # Main wizard references/ error-monitoring.md # Deep dive: errors, panics, wrapping tracing.md # Deep dive: spans, distributed tracing diff --git a/skills/sentry-python-setup/SKILL.md b/skills/sentry-python-setup/SKILL.md deleted file mode 100644 index 5a489c5..0000000 --- a/skills/sentry-python-setup/SKILL.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -name: sentry-python-setup -description: Setup Sentry in Python apps. Use when asked to add Sentry to Python, install sentry-sdk, or configure error monitoring, profiling, or logging for Python applications, Django, Flask, FastAPI. -license: Apache-2.0 ---- - -# Sentry Python Setup - -Install and configure Sentry in Python projects. - -## Invoke This Skill When - -- User asks to "add Sentry to Python" or "install Sentry" in a Python app -- User wants error monitoring, logging, or tracing in Python -- User mentions "sentry-sdk" or Python frameworks (Django, Flask, FastAPI) - -**Important:** The configuration options and code samples below are examples. Always verify against [docs.sentry.io](https://docs.sentry.io) before implementing, as APIs and defaults may have changed. - -## Install - -```bash -pip install sentry-sdk -``` - -## Configure - -Initialize as early as possible in your application: - -```python -import sentry_sdk - -sentry_sdk.init( - dsn="YOUR_SENTRY_DSN", - send_default_pii=True, - - # Tracing - traces_sample_rate=1.0, - - # Profiling - profile_session_sample_rate=1.0, - profile_lifecycle="trace", - - # Logs - enable_logs=True, -) -``` - -### Async Applications - -For async apps, initialize inside an async function: - -```python -import asyncio -import sentry_sdk - -async def main(): - sentry_sdk.init( - dsn="YOUR_SENTRY_DSN", - send_default_pii=True, - traces_sample_rate=1.0, - enable_logs=True, - ) - # ... rest of app - -asyncio.run(main()) -``` - -## Framework Integrations - -Use the same `sentry_sdk.init()` call shown above. Place it where it runs before your app starts: - -| Framework | Where to Init | Notes | -|-----------|--------------|-------| -| **Django** | Top of `settings.py` | Auto-detects Django, no extra install | -| **Flask** | Before `app = Flask(__name__)` | Auto-detects Flask | -| **FastAPI** | Before `app = FastAPI()` | Auto-detects FastAPI | -| **Celery** | In Celery worker config | Auto-detects Celery | -| **AIOHTTP** | Before app creation | Auto-detects AIOHTTP | - -## Configuration Options - -| Option | Description | Default | Min SDK | -|--------|-------------|---------|---------| -| `dsn` | Sentry DSN | `None` (SDK no-ops without it) | — | -| `send_default_pii` | Include user data | `None` | — | -| `traces_sample_rate` | % of transactions traced | `None` (tracing disabled) | — | -| `profile_session_sample_rate` | % of sessions profiled | `None` (profiling disabled) | 2.24.1+ | -| `profile_lifecycle` | Profiling mode (`"trace"` or `"manual"`) | `"manual"` | 2.24.1+ | -| `enable_logs` | Send logs to Sentry | `False` | 2.35.0+ | -| `environment` | Environment name | `"production"` (or `SENTRY_ENVIRONMENT` env var) | — | -| `release` | Release version | Auto-detected | — | - -## Environment Variables - -The SDK auto-reads these: - -```bash -SENTRY_DSN=https://xxx@o123.ingest.sentry.io/456 -SENTRY_ENVIRONMENT=production -SENTRY_RELEASE=1.0.0 -``` - -For `sentry-cli` (source maps, releases), also set: - -```bash -SENTRY_AUTH_TOKEN=sntrys_xxx -SENTRY_ORG=my-org -SENTRY_PROJECT=my-project -``` - -Or pass DSN in code: - -```python -import os -import sentry_sdk - -sentry_sdk.init( - dsn=os.environ.get("SENTRY_DSN"), - # ... -) -``` - -## Verification - -```python -# Intentional error to test -division_by_zero = 1 / 0 -``` - -Or capture manually: - -```python -sentry_sdk.capture_message("Test message from Python") -``` - -## Troubleshooting - -| Issue | Solution | -|-------|----------| -| Errors not appearing | Ensure `init()` is called early, check DSN | -| No traces | Set `traces_sample_rate` > 0 | -| IPython errors not captured | Run from file, not interactive shell | -| Async errors missing | Initialize inside async function | diff --git a/skills/sentry-ruby-setup/SKILL.md b/skills/sentry-ruby-setup/SKILL.md deleted file mode 100644 index e46802b..0000000 --- a/skills/sentry-ruby-setup/SKILL.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -name: sentry-ruby-setup -description: Setup Sentry in Ruby apps. Use when asked to add Sentry to Ruby, install sentry-ruby gem, or configure error monitoring for Ruby applications, Rails, or Sidekiq. -license: Apache-2.0 ---- - -# Sentry Ruby Setup - -Install and configure Sentry in Ruby projects. - -## Invoke This Skill When - -- User asks to "add Sentry to Ruby" or "install Sentry" in a Ruby app -- User wants error monitoring, logging, or tracing in Ruby -- User mentions "sentry-ruby" gem or Ruby on Rails - -**Important:** The configuration options and code samples below are examples. Always verify against [docs.sentry.io](https://docs.sentry.io) before implementing, as APIs and defaults may have changed. - -## Requirements - -- Ruby 2.4+ or recent JRuby versions - -## Install - -Add to `Gemfile`: - -```ruby -gem "sentry-ruby" - -# For profiling, add ONE of: -gem "stackprof" # SDK 5.9.0+ — works on all Ruby versions -# gem "vernier" # SDK 5.21.0+ — requires Ruby 3.2.1+, better for multi-threaded servers - # Also requires: config.profiler_class = Sentry::Vernier::Profiler -``` - -Then run: - -```bash -bundle install -``` - -## Configure - -Initialize as early as possible: - -```ruby -require "sentry-ruby" - -Sentry.init do |config| - config.dsn = "YOUR_SENTRY_DSN" - config.send_default_pii = true - - # Breadcrumbs from logs - config.breadcrumbs_logger = [:sentry_logger, :http_logger] - - # Tracing - config.traces_sample_rate = 1.0 - - # Profiling (requires stackprof or vernier gem) - config.profiles_sample_rate = 1.0 - # config.profiler_class = Sentry::Vernier::Profiler # Uncomment if using vernier - - # Logs - config.enable_logs = true -end -``` - -## Rails Integration - -For Rails, add to `config/initializers/sentry.rb`: - -```ruby -Sentry.init do |config| - config.dsn = ENV["SENTRY_DSN"] - config.send_default_pii = true - config.breadcrumbs_logger = [:active_support_logger, :http_logger] - config.traces_sample_rate = 1.0 - config.profiles_sample_rate = 1.0 - config.enable_logs = true -end -``` - -### Rails-specific Gems - -```ruby -# Gemfile -gem "sentry-ruby" -gem "sentry-rails" # Rails integration -gem "sentry-sidekiq" # If using Sidekiq -gem "sentry-delayed_job" # If using Delayed Job -gem "sentry-resque" # If using Resque -``` - -## Configuration Options - -| Option | Description | Default | -|--------|-------------|---------| -| `dsn` | Sentry DSN | `nil` (SDK no-ops without it) | -| `send_default_pii` | Include user data | `false` | -| `traces_sample_rate` | % of transactions traced | `nil` (tracing disabled) | -| `profiles_sample_rate` | % of traces profiled | `nil` (profiling disabled) | -| `enable_logs` | Send logs to Sentry | `false` | -| `environment` | Environment name | `"development"` (checks `SENTRY_CURRENT_ENV`, `SENTRY_ENVIRONMENT`, `RAILS_ENV`, `RACK_ENV` in order) | -| `release` | Release version | Auto-detected | - -## Breadcrumb Loggers - -| Logger | Description | -|--------|-------------| -| `:sentry_logger` | Sentry's own logger | -| `:http_logger` | HTTP request breadcrumbs | -| `:redis_logger` | Redis command breadcrumbs | -| `:active_support_logger` | Rails ActiveSupport (Rails only) | - -## Environment Variables - -```bash -SENTRY_DSN=https://xxx@o123.ingest.sentry.io/456 -SENTRY_AUTH_TOKEN=sntrys_xxx -SENTRY_ORG=my-org -SENTRY_PROJECT=my-project -``` - -## Verification - -```ruby -# Capture test message -Sentry.capture_message("Test message from Ruby") - -# Or trigger intentional error -1 / 0 -``` - -## Troubleshooting - -| Issue | Solution | -|-------|----------| -| Errors not appearing | Ensure `Sentry.init` called early, check DSN | -| No traces | Set `traces_sample_rate` > 0 | -| No profiles | Add `stackprof` gem, set `profiles_sample_rate` | -| Rails errors missing | Use `sentry-rails` gem instead of `sentry-ruby` | diff --git a/skills/sentry-svelte-sdk/SKILL.md b/skills/sentry-svelte-sdk/SKILL.md index 997c22b..5ecdee7 100644 --- a/skills/sentry-svelte-sdk/SKILL.md +++ b/skills/sentry-svelte-sdk/SKILL.md @@ -414,8 +414,8 @@ If a backend exists without Sentry configured, suggest the matching skill: | Backend detected | Suggest skill | |-----------------|--------------| | Go (`go.mod`) | `sentry-go-sdk` | -| Python (`requirements.txt`, `pyproject.toml`) | `sentry-python-setup` | -| Ruby (`Gemfile`) | `sentry-ruby-setup` | +| Python (`requirements.txt`, `pyproject.toml`) | `sentry-python-sdk` | +| Ruby (`Gemfile`) | `sentry-ruby-sdk` | | Node.js (Express, Fastify, etc.) | Use `@sentry/node` — see [docs.sentry.io/platforms/javascript/guides/express/](https://docs.sentry.io/platforms/javascript/guides/express/) | ---