Skip to content

Commit 89e8d6e

Browse files
committed
moar refinements 💅
1 parent 37b823b commit 89e8d6e

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

‎.claude/skills/sdk-docs/SKILL.md‎

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: sdk-docs
3-
description: Generate user-facing SDK documentation for docs.sentry.io using MDX format. Use when writing integration docs, configuration options, SDK features, or instrumentation guides after implementation. Analyzes SDK PRs from sentry-python, sentry-javascript, sentry-ruby, etc., finds similar documentation patterns, and follows Sentry's customer documentation standards with proper MDX components like Alert, Note, SdkOption, and PlatformContent.
3+
description: Generate user-facing SDK documentation for docs.sentry.io using MDX format. Use when writing integration docs, configuration options, SDK features, or instrumentation guides after implementation. Analyzes SDK PRs from sentry-python, sentry-javascript, sentry-ruby, etc., finds similar documentation patterns, and follows Sentry's customer documentation standards with proper MDX components like Alert, SdkOption, and PlatformContent.
44
model: sonnet
55
allowed-tools: Read Grep Glob Bash Write Edit Skill
66
compatibility: Requires gh CLI (GitHub CLI) with authentication configured for fetching PR details from SDK repositories. Uses the sentry-skills:create-pr skill for creating pull requests following Sentry conventions.
@@ -24,6 +24,8 @@ Generate user-facing documentation for docs.sentry.io showing users HOW TO USE i
2424
- `php` → `getsentry/sentry-php`
2525
- `go` → `getsentry/sentry-go`
2626
- `java` → `getsentry/sentry-java`
27+
- `laravel` → `getsentry/sentry-laravel`
28+
- `symfony` → `getsentry/sentry-symfony`
2729
- `dotnet` / `csharp` → `getsentry/sentry-dotnet`
2830
- `rust` → `getsentry/sentry-rust`
2931
- `android` → `getsentry/sentry-java`
@@ -34,8 +36,6 @@ Generate user-facing documentation for docs.sentry.io showing users HOW TO USE i
3436
- `unreal` → `getsentry/sentry-unreal`
3537
- `native` / `c` / `cpp` → `getsentry/sentry-native`
3638
- `elixir` → `getsentry/sentry-elixir`
37-
- `perl` → `getsentry/sentry-perl`
38-
- `clojure` → `getsentry/sentry-clj`
3939
- `kotlin` → `getsentry/sentry-kotlin-multiplatform`
4040

4141
**Docs paths:** Use lowercase SDK names (e.g., `docs/platforms/python/`, `docs/platforms/javascript/node/`)
@@ -47,8 +47,8 @@ Generate user-facing documentation for docs.sentry.io showing users HOW TO USE i
4747
**Automatically prepare clean branch:**
4848
1. Check status: `git branch --show-current && git status --short`
4949
2. Auto-stash uncommitted changes: `git stash push -m "Auto-stash before sdk-docs"` (inform user, can restore with `git stash pop`)
50-
3. Auto-switch to main: Detect with `git remote show origin | grep "HEAD branch" | cut -d' ' -f5`, then checkout
51-
4. Update main: `git pull origin <main-branch-name>` to ensure local main is up-to-date
50+
3. Auto-switch to main: Detect branch with `git remote show origin | sed -n '/HEAD branch/s/.*: //p'`, then `git checkout <detected-branch>`
51+
4. Update main: `git pull origin <detected-branch>` to ensure local main is up-to-date
5252
5. Auto-generate branch name: `docs/<sdk>/<feature-name>` (e.g., `docs/python/fastapi-integration`)
5353
6. Create branch: `git checkout -b <branch-name>`
5454

@@ -62,8 +62,8 @@ Handle three scenarios:
6262
1. Extract repo, PR number, SDK from URL
6363
2. Fetch PR: `gh pr view <PR_NUM> --repo <REPO> --json title,body,files,state`
6464
3. **Auto-detect doc type** from PR changes:
65-
- Files matching `*integration*.py|rb|js|go` → **integration**
66-
- Changes to `*client*|*init*|*config*` with new params → **configuration_option**
65+
- Files with paths containing "integration" and extensions .py, .rb, .js, or .go → **integration**
66+
- Changes to files containing "client", "init", or "config" with new parameters → **configuration_option**
6767
- New span/trace/instrumentation code → **feature**
6868
- If unclear, default to **feature** and inform user
6969

@@ -95,11 +95,12 @@ Handle three scenarios:
9595

9696
**Check for existing docs first:**
9797
1. Search for existing docs PR: `gh search prs --repo getsentry/sentry-docs --match body "{PR_NUM}" --limit 3`
98-
2. Check if docs exist: Use Glob to search `docs/platforms/{sdk}/**/*{feature-name}*.mdx`
98+
2. Check if docs exist: Use Grep to search for feature name in `docs/platforms/{sdk}/` with pattern `{feature-name}` and output mode `files_with_matches`
9999
3. If found, ask user to update existing docs or create new ones
100100

101101
**Find templates based on doc type:**
102-
- **Integration:** `docs/platforms/{SDK}/integrations/**/*.mdx` (Ruby uses `guides/` instead)
102+
- **Integration (most SDKs):** Read similar docs in `docs/platforms/{SDK}/integrations/**/*.mdx`
103+
- **Integration (Ruby only):** Read table structure from `docs/platforms/ruby/common/integrations/index.mdx` - Ruby uses centralized table, not individual integration files
103104
- **Configuration:** `docs/platforms/{SDK}/**/options.mdx`
104105
- **Feature/Guide:** Use Grep for related keywords in `docs/platforms/{SDK}/`
105106

@@ -172,11 +173,11 @@ Brief description. Why use this?
172173
sentry_sdk.init(dsn="___PUBLIC_DSN___", option_name=value)
173174
\```
174175

175-
<Note>Available in SDK version X.Y.Z+.</Note>
176+
Available in SDK version X.Y.Z+.
176177
</SdkOption>
177178
```
178179

179-
**Common MDX components:** `<Alert>`, `<Note>`, `<SdkOption>`, `<PlatformContent>`, `<OnboardingOptionButtons>`
180+
**Common MDX components:** `<Alert>`, `<SdkOption>`, `<PlatformContent>`, `<OnboardingOptionButtons>`
180181

181182
### Step 5: Save, Commit, and Create PR
182183

@@ -199,7 +200,8 @@ sentry_sdk.init(dsn="___PUBLIC_DSN___", option_name=value)
199200
3. **Commit changes:**
200201
```bash
201202
git add docs/
202-
git commit -m "docs(<sdk>): Add <feature> documentation
203+
git commit -m "$(cat <<'EOF'
204+
docs(<sdk>): Add <feature> documentation
203205
204206
Add documentation for <feature> integration/option/guide.
205207
@@ -208,7 +210,9 @@ sentry_sdk.init(dsn="___PUBLIC_DSN___", option_name=value)
208210
209211
Based on PR: <link-to-sdk-pr>
210212
211-
Co-Authored-By: Claude <noreply@anthropic.com>"
213+
Co-Authored-By: Claude <noreply@anthropic.com>
214+
EOF
215+
)"
212216
```
213217
214218
4. **Create PR:**

0 commit comments

Comments
 (0)