Commit e97249f
docs: fix documentation gaps and embed skill files at build time (#606)
## Summary
Fix genuine documentation gaps not covered by the auto-generation
infrastructure in #569, and eliminate the CLI → GitHub → CLI roundtrip
for skill file installation.
## Documentation fixes
- **Add `SENTRY_AUTH_TOKEN` and `SENTRY_TOKEN` to `configuration.md`** —
primary CI/CD auth variables were missing from the env vars reference
- **Add `SENTRY_INSTALL_DIR` and `SENTRY_NO_CACHE` to
`configuration.md`** — undocumented env vars
- **Add `project:admin` to OAuth scopes** in `DEVELOPMENT.md` and
`self-hosted.md` — code requests 8 scopes but docs listed only 7;
self-hosted users creating API tokens with the documented scopes would
get permission errors
- **Expand README commands table** from 6 to 14 entries
- **Add missing examples** for `auth logout`, `auth refresh`, `auth
token`, `project create`, `project delete`, `cli setup`
- **Fix `config.db` → `cli.db`** in auth credential storage docs
- **Fix `SENTRY_AUTH_TOKEN` priority label** — was incorrectly marked
"legacy"; it is the primary env var
- **Align curl install flags** (`-fsS`) between README and docs site
## Embed skill files at build time
Previously, `sentry cli setup` fetched skill files from GitHub at
runtime — fetching content that was generated from the CLI's own source
code. This was a roundtrip: the CLI generates skill files from Stricli
introspection, they live in the repo, and then the CLI fetches them back
from GitHub by URL, using a hardcoded `REFERENCE_FILES` array that
required codegen to keep in sync.
Now:
- `generate-skill.ts` produces `src/generated/skill-content.ts` that
inlines all skill file contents (~47KB) as a `Map<string, string>`
- `agent-skills.ts` imports the embedded content and writes it directly
to `~/.claude/skills/` — no network fetch, no URL construction, no
version-pinning logic
- `REFERENCE_FILES` array, `getSkillUrl()`, `fetchSingleFile()`,
`fetchAllSkillFiles()`, `fetchSkillContent()` — all removed
- `generate:skill` is chained before `build`/`dev`/`typecheck`/`test` in
`package.json` (like `generate:sdk`)
- `check-skill.ts` verifies `skill-content.ts` stays in sync with
generated markdown files
Co-authored-by: Burak Yigit Kaya <byk@sentry.io>1 parent dc8684b commit e97249f
File tree
19 files changed
+282
-474
lines changed- .github/workflows
- docs/src/content/docs
- commands
- plugins/sentry-cli/skills/sentry-cli/references
- script
- src
- commands/cli
- lib
- test
- commands/cli
- lib
19 files changed
+282
-474
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
| 129 | + | |
131 | 130 | | |
132 | 131 | | |
133 | 132 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
78 | 85 | | |
| 86 | + | |
79 | 87 | | |
80 | 88 | | |
81 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
99 | 117 | | |
100 | 118 | | |
101 | 119 | | |
| |||
118 | 136 | | |
119 | 137 | | |
120 | 138 | | |
121 | | - | |
| 139 | + | |
122 | 140 | | |
123 | 141 | | |
124 | 142 | | |
125 | 143 | | |
126 | 144 | | |
127 | | - | |
128 | | - | |
129 | | - | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
130 | 148 | | |
131 | 149 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
10 | 24 | | |
11 | 25 | | |
12 | 26 | | |
| |||
125 | 139 | | |
126 | 140 | | |
127 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
128 | 158 | | |
129 | 159 | | |
130 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments