feat: auto-generate Agent Skills from schema registry#44
Open
steve-calvert-glean wants to merge 2 commits intomainfrom
Open
feat: auto-generate Agent Skills from schema registry#44steve-calvert-glean wants to merge 2 commits intomainfrom
steve-calvert-glean wants to merge 2 commits intomainfrom
Conversation
Add `glean generate-skills` command that deterministically generates SKILL.md files (following the agentskills.io spec) from the CLI's own schema registry. This ensures skills stay in sync with commands — when a flag or subcommand changes, re-running the generator updates the corresponding skill. What's included: - `internal/skills/generator.go` — template-based renderer that reads from the schema registry and produces per-command SKILL.md files - `cmd/generate_skills.go` — hidden `generate-skills` command - 17 generated skills + 1 shared skill covering all namespace commands - `.github/workflows/generate-skills.yml` — CI workflow that regenerates skills on push to main when cmd/ or schema code changes - Updated README with `npx skills add` installation instructions Replaces the previous hand-written flat skill files with structured, folder-based skills installable via: npx skills add https://github.com/gleanwork/glean-cli Inspired by Google Workspace CLI's generate-skills approach. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
git diff --quiet only sees modifications to tracked files. New skills (from new commands) would be untracked and silently ignored. Add git status --porcelain check to catch both cases. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
rwjblue
approved these changes
Mar 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
glean generate-skillscommand that deterministically generates Agent Skills from the CLI's schema registry.github/workflows/generate-skills.yml) that auto-regenerates skills on push to main when command or schema code changesnpx skills addinstallation instructionsHow it works
The generator reads from the same schema registry that powers
glean schema, ensuring skills are always in sync with the CLI's actual flags, subcommands, and examples. When someone adds a new command or changes a flag, re-runningglean generate-skillsupdates the corresponding SKILL.md.Inspired by Google Workspace CLI's approach.
Install skills
Test plan
go test ./...passesgolangci-lint runcleanglean generate-skillsproduces idempotent output🤖 Generated with Claude Code