Skip to content

feat(ai): generate the SDK agent skills from bugsee-for-ai - #78

Merged
krassx merged 4 commits into
mainfrom
feat/mirror-agent-skills
Oct 8, 2026
Merged

krassx merged 4 commits into
mainfrom
feat/mirror-agent-skills

Conversation

@krassx

@krassx krassx commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Why

Finding #5 of the 2026-10-07 public-repo review: two diverged copies of the agent skills. The docs copies pinned Android 7.0.0-beta3 (current 7.3.0), Flutter ^8.0.0 (9.0.4), KMP 0.1.1 (0.1.2), while bugsee-for-ai is maintained and says the docs copies "must not be used". Every SDK install page tells agents to curl the docs copies.

What

bugsee/bugsee-for-ai becomes the single source; the docs copies are generated.

  • scripts/mirror-skills.mjs (+ skills-map.json, skills-source.json, unit tests): generates docs/ai/agent-skills/sdk/**/SKILL.md from a pinned bugsee-for-ai commit. Docusaurus frontmatter added, plugin-only keys (parent, disable-model-invocation, allowed-tools) dropped, breadcrumb removed, links to sibling skills made absolute (docs URL if mirrored, GitHub otherwise); an unhandled relative link fails instead of shipping a dead link. --check fails on hand edits, --update moves the pin.
  • sync-agent-skills.yml: when bugsee-for-ai changes (dispatch from that repo, plus a 6-hourly poll as fallback), opens/updates one rolling PR with the regenerated copies. It runs cspell + the site build itself and opens the PR as a draft if either fails (PRs created with the default GITHUB_TOKEN don't trigger the normal checks).
  • deploy.yml: PRs now also run the mirror unit tests and --check.
  • curl URLs are unchanged. sdk/ios/v7 has no plugin counterpart yet, so it stays docs-owned (docsOwned in the map).
  • Index table: Android 6.x / 7.x (7.3.0 is released). cspell: unbreak, Podspec.

Behaviour changes to be aware of

  • /sdk/android/SKILL.md (the 6.x skill) now has name: bugsee-android-sdk-6x (plugin naming); /sdk/android/v7/SKILL.md now has name: bugsee-android-sdk, and is no longer "beta". URLs unchanged.
  • License frontmatter is MIT (as in the plugin), was proprietary.
  • Content is the plugin's, which is longer and newer; one section existed only here (KMP Verification) and has been ported upstream: docs(skills): add a Verification section to the KMP skill bugsee-for-ai#17.

Verified locally

  • npm run test:mirror 8/8; npm run check-skills OK, and exits 1 on a hand edit (tested).
  • cspell: 294 files, 0 issues. npm run build: success, no warnings. Static curl copies keep only name/description/license/category.
  • Fetch path tested against GitHub: pin 18c2542.

Setup (once, org owner)

Authenticates as a GitHub App owned by the bugsee org (not a person's token):

  1. Create the app: Contents + Pull requests write, Metadata read; install it on bugsee/docs only.
  2. In this repo add the variable SYNC_APP_CLIENT_ID and the private key as the SYNC_APP_PRIVATE_KEY secret of the skills-sync environment (limited to the main branch, so a feature-branch workflow can't read it). Done on 2026-10-08.
  3. "Allow GitHub Actions to create and approve pull requests" is already enabled.

Without the app the workflow still works: it falls back to GITHUB_TOKEN (the PR then does not get the normal checks, so the job runs cspell + build itself and opens a draft on failure).

Companion: bugsee/bugsee-for-ai#18 (sends the instant notification; same app, same two values there).

Open PR #77 edits sdk/ios/v7/SKILL.md, which stays docs-owned here, so no conflict.

🤖 Generated with Claude Code

krassx added 3 commits October 8, 2026 17:58
The skills served at docs.bugsee.com/ai/agent-skills/sdk/** were hand-kept
forks of bugsee/bugsee-for-ai and had drifted (Android 7.0.0-beta3 vs 7.3.0,
Flutter ^8.0.0 vs 9.0.4, KMP 0.1.1 vs 0.1.2, old CLI guidance). Make
bugsee-for-ai the only place a skill is edited:

- scripts/mirror-skills.mjs generates the docs copies from a pinned
  bugsee-for-ai commit (frontmatter rewritten for Docusaurus, plugin
  breadcrumbs removed, sibling links made absolute, unknown links fail).
  --check fails on hand edits; --update moves the pin to main.
- .github/workflows/sync-agent-skills.yml opens one rolling PR with the
  regenerated copies when bugsee-for-ai changes (repository_dispatch, plus a
  6-hourly poll as a fallback). It runs spell check and the build itself and
  opens a draft PR if either fails.
- deploy.yml runs the unit tests and --check on every PR.
- Existing curl URLs are unchanged. sdk/ios/v7 has no plugin source yet and
  stays docs-owned (listed in skills-map.json).
- Index table: Android is now 6.x / 7.x (7.3.0 is released, not a beta).
- cspell: add unbreak, Podspec.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Change-Id: Ibfb9ed25686dcce24fc1396ea070ccf77049a756
Generated by scripts/sync-skills.mjs from docs/ai/agent-skills/index.md
(Android 6.x / 7.x labels).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Change-Id: I169dc9b3f89f689f8d866c4f878b9e952b08a65c
Picks up the Gradle plugin 4.0.8 pins (bugsee-for-ai#16) and the KMP
Verification section (bugsee-for-ai#17).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Change-Id: I16c0db16a0ddb9062c02db058988305dea0d68f2
@krassx
krassx marked this pull request as ready for review October 8, 2026 13:10
Mint a short-lived installation token per run (actions/create-github-app-token,
pinned to a commit) for opening the sync PR, so the credential is not tied to a
person and the PR triggers the normal checks. Falls back to GITHUB_TOKEN while
the app is not configured.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Change-Id: Idf302f0d6d8648f1e17c4e20e9377d46c7397344
@krassx
krassx merged commit cdd9653 into main Oct 8, 2026
1 check passed
@krassx
krassx deleted the feat/mirror-agent-skills branch October 8, 2026 13:26
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.

1 participant