Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 29, 2026

Summary

Addresses two issues from #69:

  1. The .craft.yml version bump scripts were unwieldy inline Node.js code
  2. The SKILL.md file was manually maintained and could become stale

Changes

Version Bump Script (script/bump-version.ts)

  • Extracts the inline version bump logic from .craft.yml into a standalone Bun script
  • Handles both pre-release (--pre) and post-release (--post) scenarios
  • Keeps package.json and plugin.json versions in sync

Skill Generation (script/generate-skill.ts)

  • Generates SKILL.md by introspecting the Stricli route tree
  • Extracts command paths, flags, aliases, and descriptions automatically
  • Produces structured documentation with prerequisites, commands, workflows, and error resolution

CI Integration

Check Job (check-skill in ci.yml):

  • Runs on every PR to detect if SKILL.md is stale
  • On failure, outputs instructions to the job summary with two fix options

Generate Workflow (.github/workflows/generate-skill.yml):

  • Manual workflow_dispatch trigger with branch input
  • For internal PRs, the check job links directly to this workflow with the branch pre-filled
  • Regenerates and commits SKILL.md automatically
  • External contributors (fork PRs) only see local command instructions since they can't trigger workflows

Cursor Support

  • Added symlink at .cursor/skills/sentry-cli/SKILL.md pointing to the plugins location

New Scripts

bun run generate:skill  # Generate SKILL.md from CLI metadata
bun run check:skill     # Check if SKILL.md is up to date

- Add script/generate-skill.ts to generate SKILL.md from Stricli metadata
- Add script/check-skill.ts to verify SKILL.md is up-to-date in CI
- Add script/bump-version.ts to simplify .craft.yml release commands
- Add check-skill CI job that posts PR comments when SKILL.md is stale
- Add symlink at .cursor/skills/ for Cursor users

The SKILL.md file is intentionally not regenerated to test the CI check.
@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Auto-generate SKILL.md and extract version bump script by BYK in #105
  • Add global help command using Stricli's defaultCommand by BYK in #104

Bug Fixes 🐛

  • (docs) Mobile styling improvements for landing page by betegon in #106

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Codecov Results 📊

✅ Patch coverage is 100.00%. Project has 1756 uncovered lines.
✅ Project coverage is 66.66%. Comparing base (base) to head (head).

Files with missing lines (24)
File Patch % Lines
human.ts 30.83% ⚠️ 673 Missing
resolve-target.ts 18.93% ⚠️ 257 Missing
oauth.ts 21.71% ⚠️ 202 Missing
resolver.ts 3.23% ⚠️ 120 Missing
errors.ts 5.94% ⚠️ 95 Missing
api-client.ts 68.77% ⚠️ 94 Missing
migration.ts 47.44% ⚠️ 82 Missing
api.ts 89.80% ⚠️ 47 Missing
seer.ts 75.54% ⚠️ 45 Missing
errors.ts 73.17% ⚠️ 33 Missing
seer.ts 76.15% ⚠️ 31 Missing
preload.ts 39.02% ⚠️ 25 Missing
detector.ts 87.79% ⚠️ 16 Missing
telemetry.ts 89.87% ⚠️ 8 Missing
auth.ts 93.69% ⚠️ 7 Missing
index.ts 95.06% ⚠️ 4 Missing
colors.ts 91.84% ⚠️ 4 Missing
env-file.ts 97.17% ⚠️ 3 Missing
utils.ts 98.64% ⚠️ 2 Missing
alias.ts 98.56% ⚠️ 2 Missing
project-aliases.ts 97.40% ⚠️ 2 Missing
schema.ts 90.00% ⚠️ 2 Missing
java.ts 97.22% ⚠️ 1 Missing
parser.ts 98.63% ⚠️ 1 Missing
Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    66.66%    66.66%        —%
==========================================
  Files           45        45         —
  Lines         5267      5267         —
  Branches         0         0         —
==========================================
+ Hits          3511      3511         —
- Misses        1756      1756         —
- Partials         0         0         —

Generated by Codecov Action

Changed from issue comment to PR review comment with suggestion block,
which enables the 1-click 'Apply suggestion' button in GitHub UI.
@getsentry getsentry deleted a comment from github-actions bot Jan 29, 2026
- Fix lint errors in bump-version.ts, check-skill.ts, generate-skill.ts
- Add generate-skill.yml workflow with manual trigger
- Simplify check-skill job to output instructions in job summary
- Link to workflow dispatch with pre-filled branch name
- Remove complex PR comment generation (not needed anymore)
BYK added 3 commits January 29, 2026 15:32
External contributors won't have permissions to trigger workflows,
so we only show the local command instructions for fork PRs.
- Add explicit 'contents: write' permission to satisfy security scanning
- Revert SKILL.md to main branch version to test the staleness check flow

### Issues
**Flags:**
- `--token <value> - Authenticate using an API token instead of OAuth`
Copy link
Member Author

@BYK BYK Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should find a way to generate these examples back. I'm okay if those examples live in the original help text as that's also very useful.

- Remove git config from generate-skill.yml (use git defaults)
- Source prerequisites from docs/getting-started.mdx
- Source command examples from docs/commands/*.md files
- Remove hardcoded sections (context, monorepo, workflows, etc.)
- Add comment explaining why we use simplified types for Stricli introspection
- Fix lint errors (top-level regex, variable shadowing)
@BYK BYK marked this pull request as ready for review January 29, 2026 17:13
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- Re-add git config user.name/email (required for commits)
- Fix loadPrerequisites to use extracted code blocks from docs
- Parse PackageManagerCode Astro component to get npm install command
- Extract generateInstallSection/generateAuthSection helpers
@BYK BYK merged commit 7ee057d into main Jan 29, 2026
22 checks passed
@BYK BYK deleted the feat/skill-generation branch January 29, 2026 18:00
@BYK BYK mentioned this pull request Jan 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants