Skip to content

feat(claude): auto-resolve catalog skills referenced in the prompt text - #166

Merged
edenreich merged 7 commits into
mainfrom
feat/claude-resolve-skills-from-prompt
Sep 6, 2026
Merged

edenreich merged 7 commits into
mainfrom
feat/claude-resolve-skills-from-prompt

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Why

@infer resolves /name skill references from the prompt dynamically; @claude could not, because claude-code-action has no skills input and the reusable claude.yml only installed the static repos.yaml list (which no thin caller sets). The cockpit mission dispatched to inference-gateway/inference-gateway (run 34038412901) therefore ran with the "Install skills" step skipped.

What

  • claude.yml: the "Install skills" step (id skills) now always runs, right after "Resolve effort and model". It scans the dispatch prompt plus issue title/body and comment/review body with the infer CLI rule (matchSkillTriggers: whitespace-delimited /<name> fields keep the leading [a-z0-9-]+ run, plus use [the] <name> skill; lowercased, backticks stripped, deduped), keeps only inference-gateway/skills catalog names, and installs them into ~/.claude/skills.
    • Prompt text can only ever select catalog names; owner/ref/path come from skills@main.
    • MAX_SKILLS (10) caps the prompt-derived set with the org's ::warning::hit MAX_SKILLS=N cap; ... + step-summary line. Static names stay uncapped and keep failing the job when unknown.
    • Every clone is --depth 1 --filter=blob:none --sparse + sparse-checkout add <path>, wrapped in timeout 120 with GIT_TERMINAL_PROMPT=0; a failed clone is cached so a dead upstream costs one attempt, not one per name. Prompt-derived installs are best-effort (warn and skip).
    • A name the checkout already ships in .claude/skills/<name> is left alone (a personal copy would shadow it) but still counts as active.
    • "Compose prompt" appends **SKILLS:** ... available this run: /go ... - invoke the ones relevant to the task with the Skill tool. No Skill allow rule is needed: skill invocation needs no approval in -p mode.
  • Docs: skills input description, repos.yaml comment (also drops the stale extraKnownMarketplaces/settings wording), a CLAUDE.md paragraph, and the stale README claim that skills on claude was stripped.

migrate-claude.yml needs no change: skills already passes through its render.

Verification

  • actionlint -ignore 'property ".*" is not defined' -ignore 'SC22(21|22|09)' .github/workflows/claude.yml is clean (ignores cover pre-existing findings on untouched lines).
  • The step body was run end to end under bash 5.3 + GNU timeout in an isolated HOME against the live catalog: static go installed; a repo-provided clean-code kept active without reinstall; rust-review and adl (nested .agents/skills/adl path) installed; the cap dropped tokenless with the warning + summary line; /usr/bin, /maintainer and a URL ignored; the no-op path clones nothing; an unknown static name fails the job.
  • After merge (callers are at @main): gh workflow run claude.yml --repo inference-gateway/cli -f prompt="Use /go to review internal/skills for idiomatic Go; report only, no changes" should log Installed skill: go (...) and the **SKILLS:** prompt line.

Follow-up

cockpit/missions/refactor-quick-wins.md must reference skills as /clean-code, /clean-architecture, /domain-driven-design, /go, /go-concurrency, /rust, /rust-concurrency: bare backticked names trigger nothing in either bot.

Mirror the infer CLI's dynamic skill discovery in the reusable claude.yml:
the "Install skills" step now always runs, scans the dispatch prompt and the
issue/comment/review bodies for /<name> tokens (and "use the <name> skill"
phrases), keeps only inference-gateway/skills catalog names, and installs
them into ~/.claude/skills before Claude runs. Prompt-derived skills are
best-effort and capped by MAX_SKILLS (warning + step summary, never silent);
static repos.yaml names keep failing the job when unknown. Clones are sparse,
blob-less and depth-1, wrapped in timeout with GIT_TERMINAL_PROMPT=0, and a
failed clone is cached so a dead upstream costs one attempt. "Compose prompt"
appends a SKILLS note listing the active ones so headless Claude invokes them.

Fixes cockpit-dispatched missions running without their skills
(inference-gateway/inference-gateway run 34038412901); the missions must
reference skills as /<name> for either bot to pick them up.
Comment thread .github/workflows/claude.yml Resolved
Comment thread .github/workflows/claude.yml Resolved
Comment thread .github/workflows/claude.yml Resolved
Comment thread .github/workflows/claude.yml Resolved
Comment thread .github/workflows/claude.yml Resolved
Comment thread .github/workflows/claude.yml Resolved
@edenreich
edenreich merged commit 97c0159 into main Sep 6, 2026
2 checks passed
@edenreich
edenreich deleted the feat/claude-resolve-skills-from-prompt branch September 6, 2026 15:16
inference-gateway-releaser Bot added a commit that referenced this pull request Sep 20, 2026
## [0.26.0](v0.25.0...v0.26.0) (2026-09-20)

### ✨ Features

* add skills support to claude workflow ([8dcd2ef](8dcd2ef))
* **claude:** auto-resolve catalog skills referenced in the prompt text ([#166](#166)) ([97c0159](97c0159))
* **deps:** update infer-action version and add model parameters ([e4c00e6](e4c00e6))
* **infer:** add review_inline input, marker, and dispatch checkbox ([#147](#147)) ([2f2b8f8](2f2b8f8))
* iterm2-style terminal graphics for org profile README ([#150](#150)) ([53846ee](53846ee))
* **migrate-infer:** expose model on the generated caller's dispatch form ([#161](#161)) ([b1bfbd2](b1bfbd2))
* **refresh-agent-manifest:** set CI GitHub App secrets to the maintainer App ([#170](#170)) ([bf401d4](bf401d4))

### ♻️ Improvements

* remove ollama-api-key from infer.yml ([1e9a223](1e9a223))

### 🐛 Bug Fixes

* **bots:** allow flox update/upgrade/activate in the CI bash sandbox ([04bdd63](04bdd63))
* **bots:** install markdownlint by default in claude/infer/codex ([#168](#168)) ([bd1500e](bd1500e))
* **bots:** make setup-go actually honor go.mod in the reusable claude/infer workflows ([#155](#155)) ([f4b137c](f4b137c)), closes [inference-gateway/adk#284](inference-gateway/adk#284) [#154](#154)
* **claude:** allow the maintainer App as workflow actor ([#162](#162)) ([c0c78bf](c0c78bf))
* **claude:** forbid background Bash commands in headless runs ([#165](#165)) ([ef4d5b1](ef4d5b1))
* **claude:** instruct the agent not to create sub agents ([#163](#163)) ([e82c71e](e82c71e))
* **claude:** resolve non-vendored skills via skills catalog ([#148](#148)) ([effedad](effedad))
* disallow subagents in claude runs ([#164](#164)) ([73bb398](73bb398))
* **migrate:** reconcile flox schema-version in migrate workflows ([#157](#157)) ([e49bcc3](e49bcc3))
* **workflows:** rename stt-binaries to binaries in app token scopes ([#158](#158)) ([51422cf](51422cf))

### 🔧 Miscellaneous

* add 'stt-binaries' and 'desktop' to infer.yml ([cbd70c4](cbd70c4))
* add 'stt-binaries' and 'desktop' to workflow ([f64d94b](f64d94b))
* add 'tokenless' to the list of agents in workflow ([573d7a0](573d7a0))
* add desktop app link to README ([12a1af2](12a1af2))
* add org-wide FUNDING.yml ([f11521e](f11521e))
* add org-wide FUNDING.yml ([#159](#159)) ([96edc73](96edc73))
* add prettier support to claude and infer configurations ([4592e42](4592e42))
* add tokenless library to README ([3fff3c8](3fff3c8))
* delete FUNDING.yml ([4f3f023](4f3f023))
* **deps:** bump anthropics/claude-code-action ([#152](#152)) ([c3be75b](c3be75b))
* **deps:** bump anthropics/claude-code-action ([#160](#160)) ([3ebf8f4](3ebf8f4))
* **deps:** bump flox deps ([998e134](998e134))
* **deps:** bump flox to 1.15.0 across workflows ([#156](#156)) ([a06518f](a06518f))
* **deps:** bump flox/install-flox-action in the github-actions group ([#146](#146)) ([6fe6c47](6fe6c47))
* **deps:** bump infer cli to 0.183.0 ([651686b](651686b))
* **deps:** bump the github-actions group with 2 updates ([#149](#149)) ([210be0a](210be0a))
* **deps:** bump the github-actions group with 2 updates ([#153](#153)) ([8dafe2b](8dafe2b))
* **deps:** bump the github-actions group with 2 updates ([#169](#169)) ([f00b95d](f00b95d))
* **deps:** bump the github-actions group with 2 updates ([#171](#171)) ([c5e5087](c5e5087))
* **deps:** update Claude Code Action to version 1.0.210 ([8d0a5c8](8d0a5c8))
* **deps:** update Claude Code Action to version 1.0.213 ([9229c44](9229c44))
* **deps:** update Claude Code Action to version 1.0.223 ([c94025e](c94025e))
* **deps:** update Claude Code Action version to 1.0.217 ([50c7572](50c7572))
* **deps:** update Claude Code Action version to v1.0.185 ([b0e9afc](b0e9afc))
* **deps:** update Claude Code Action version to v1.0.191 ([932f394](932f394))
* **deps:** update Claude Code Action version to v1.0.193 ([f76021c](f76021c))
* **deps:** update Claude Code Action version to v1.0.214 ([b4ea7d1](b4ea7d1))
* **deps:** update Claude Code Action version to v1.0.220 ([b0bdd05](b0bdd05))
* **deps:** update claude-code-action version to v1.0.226 ([058620c](058620c))
* **deps:** update default infer CLI version to v0.158.0 ([d66188c](d66188c))
* **deps:** update infer CLI version and action reference ([f2dd666](f2dd666))
* **deps:** update Infer CLI version and action reference ([e514d26](e514d26))
* **deps:** update infer CLI version and action version ([fd19287](fd19287))
* **deps:** update infer CLI version and action version ([27aaa74](27aaa74))
* **deps:** update infer CLI version and action version ([9f0989f](9f0989f))
* **deps:** update infer CLI version and action version ([9052dd0](9052dd0))
* **deps:** update infer CLI version and action version ([9c06e66](9c06e66))
* **deps:** update infer CLI version and action version ([7614795](7614795))
* **deps:** update infer CLI version and action version ([3555b4e](3555b4e))
* **deps:** update infer CLI version and action version ([942b001](942b001))
* **deps:** update infer CLI version and action version ([4359525](4359525))
* **deps:** update infer CLI version and action version ([de50dc2](de50dc2))
* **deps:** update infer CLI version and action version ([7d7e590](7d7e590))
* **deps:** update infer CLI version and action version ([d64f683](d64f683))
* **deps:** update infer CLI version and action version ([ff86670](ff86670))
* **deps:** update infer CLI version and action version ([ec76246](ec76246))
* **deps:** update Infer CLI version and action version ([5638e42](5638e42))
* **deps:** update Infer CLI version and action version ([f2c30a4](f2c30a4))
* **deps:** update Infer CLI version and action version ([1cfcd5b](1cfcd5b))
* **deps:** update Infer CLI version and action version ([c9583b9](c9583b9))
* **deps:** update Infer CLI version and action version ([a1ee183](a1ee183))
* **deps:** update Infer CLI version and action version ([0842c2e](0842c2e))
* **deps:** update Infer CLI version and action version ([9465c50](9465c50))
* **deps:** update Infer CLI version and action version ([23137a9](23137a9))
* **deps:** update Infer CLI version and action version ([24ad1d7](24ad1d7))
* **deps:** update Infer CLI version and action version ([f408e4d](f408e4d))
* **deps:** update Infer CLI version and action version ([47f27f9](47f27f9))
* **deps:** update Infer CLI version and action version ([0253c23](0253c23))
* **deps:** update infer-action version to v0.42.1 ([bb47f63](bb47f63))
* **deps:** update infer-action version to v0.42.2 ([9a3361c](9a3361c))
* **deps:** update infer-action version to v0.44.3 ([43af624](43af624))
* **deps:** update infer-action version to v0.46.2 ([61549bd](61549bd))
* **deps:** update infer-action version to v0.48.0 ([a5a148a](a5a148a))
* **deps:** update infer-action version to v0.51.0 ([3831baf](3831baf))
* **deps:** update infer.yml ([8b0d800](8b0d800))
* **deps:** update model and CLI version in infer.yml ([6d22b9b](6d22b9b))
* enable review_inline option in repos.yaml ([b33db55](b33db55))
* **infer:** update default model in infer.yml workflow ([4fb5475](4fb5475))
* refine descriptions for desktop and opentask ([5b47cc5](5b47cc5))
* remove FUNDING.yml pending PR review ([d4620d1](d4620d1))
* **repos:** enable claude debug logs for inference-gateway ([#167](#167)) ([b8a6253](b8a6253))
* revise 'cli' repository description in README ([6e6e433](6e6e433))
* revise project entries in README.md ([d161e7f](d161e7f))
* update claude-code and infer versions ([1a97d5b](1a97d5b))
* update default claude model to fable-5-1 ([1b0dff9](1b0dff9))
* update default debug logging setting in infer.yml ([45da47d](45da47d))
* update infer CLI to v0.163.1 ([b1ef6c4](b1ef6c4))
* update model default to include preview tag ([0f64e8d](0f64e8d))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.26.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant