Repository navigation
feat(skills): scan .agents/skills as a third skill location - #640
Merged
Merged
Conversation
edenreich
commented
Jun 20, 2026
edenreich
commented
Jun 20, 2026
edenreich
commented
Jun 20, 2026
edenreich
commented
Jun 20, 2026
Discover Agent Skills from the open-standard .agents/skills/<name>/SKILL.md in addition to project .infer/skills/ and user-global ~/.infer/skills/. Precedence is project > agents > user (first match wins on name collision), so a repo that ships skills under the cross-tool .agents/skills/ convention works without moving them into .infer/skills/. - domain: add SkillScopeAgents scope value - config: add AgentsDirName; carve .agents/skills out of the sandbox so SKILL.md and references/*.md read even under a restrictive sandbox (parity with .infer/skills) - skills: insert .agents/skills into searchScopes, between project and user - cmd/skills + docs/skills + docs/directory-structure: document the location Closes #639
Centralized-config changes in one PR: 1. Adds/updates `.github/workflows/infer.yml` as a thin caller of the org reusable workflow `inference-gateway/.github/.github/workflows/[email protected]`, wiring the `@infer` bot (inference-gateway/infer-action) into this repo. 2. Bumps this repo's Flox `infer` pin (`.flox/env/manifest.toml`) to `v0.121.1` (the latest `inference-gateway/cli` release) and refreshes `.flox/env/manifest.lock`. 3. Regenerates the committed `.infer/` config with `infer init --overwrite --skip-migrations` using that CLI. Setup lives centrally, so future moves (action bump, model, tool scope, CLI version) are a **re-run of `migrate-infer.yml`** instead of a hand-edit per repo. Ran in CI (mirrors `bump-adl.yml`): - sed the `inference-gateway/cli` pin in `.flox/env/manifest.toml` to the latest release - `flox upgrade infer` + `flox activate` to refresh `.flox/env/manifest.lock` - `flox activate -- infer init --overwrite --skip-migrations` to regenerate `.infer/` > **Heads-up:** `infer init --overwrite` resets `.infer/` to CLI defaults. `.infer/agents.yaml` > and `.infer/mcp.yaml` (this repo's A2A agents registry + MCP servers) are **preserved** > byte-for-byte; every other config file (`config.yaml`, `prompts.yaml`, `keybindings.yaml`, > `channels.yaml`, `computer_use.yaml`, `heartbeat.yaml`, `shortcuts/*`) is regenerated. > `.infer/bin`, `logs`, history and the conversations DB stay out via the nested > `.infer/.gitignore`. Review the diff before merging. - Triggers on `@infer` mentions in issues / issue comments. Default model `deepseek/deepseek-v4-flash`. The `infer-action` pin lives in the reusable `infer.yml`. - Also adds a manual `workflow_dispatch` form: from this repo's Actions tab pick **Infer**, type a free-text `prompt`, and the bot works it in that run and opens a PR (no issue needed) - mirroring the `@claude` workflow. - Tools = infer-action's default bash whitelist + the language preset (+ markdownlint where set), configured in `repos.yaml` (the entry's `orchestrators.infer` block). - Requires the maintainer GitHub App (`INFERENCE_GATEWAY_MAINTAINER_APP_ID` / `INFERENCE_GATEWAY_MAINTAINER_APP_PRIVATE_KEY`) installed on this repo plus the provider API-key secrets; both reach the reusable workflow via `secrets: inherit`. Filed by [migrate-infer.yml](https://github.com/inference-gateway/.github/blob/main/.github/workflows/migrate-infer.yml). Co-authored-by: inference-gateway-maintainer[bot] <246577062+inference-gateway-maintainer[bot]@users.noreply.github.com>
…actoring (#637) Extends `/explorer` so you can browse a file, select a line range, optionally annotate it, and pull those lines into chat as **attached context** — part of making the CLI usable without reaching for a separate IDE. Selected snippets appear as a tree of file + line ranges below the chat input and are sent (selected lines only) with your next message. Closes #599. In `/explorer`, with a file previewed: - `s` — enter line-select mode - `↑/↓` (`j/k`) move the line cursor; `space`/`v` mark a range - **`enter` attaches the selected range immediately** (annotation optional) - `a` — add an optional natural-language note to the range, then `enter` attaches it - `esc` backs out of select mode; `esc`/`q` closes the explorer **carrying** the attachments to chat; `ctrl+c` discards Back in chat, attachments render as a tree (file + line ranges only) below the input. Multiple explorer trips accumulate. Manage them with: - `ctrl+g` — focus the tree - `↑/↓` move · `d` remove one · `c` clear all · `esc` leave On send, the **selected lines** (fenced, headed `path (lines X-Y):`, with the optional `note:`) are appended to your message and the tree clears. Slash/bash commands are not augmented, so attachments persist for the next real message. Empty input + attachments is a valid send. - **`internal/ui/components/file_explorer.go`** — `SnippetSelection` type + select-mode state. `enter` attaches the current range immediately (no required annotation); `a` adds an optional note. `esc`/`q` closes carrying selections, `ctrl+c` discards. `FormatAnnotations()` now emits **only the selected lines** (fenced, with a `path (lines X-Y):` header + optional `note:`) — not the whole file or a context window. - **`internal/ui/components/snippet_attachments_view.go`** *(new)* — `SnippetAttachmentsView`: renders pending attachments as a focusable tree (file parents, line-range children) with cursor/remove/clear and width-aware path truncation. - **`internal/ui/components/application_view.go`** — renders the attachments tree directly below the input, with height accounting so the input isn't pushed off-screen. - **`internal/app/chat.go`** — pending-attachments state; explorer close **carries** selections into chat (instead of dumping a blob into the input box); `ctrl+g` focus shim with nav/remove/clear; `SendMessage` appends the selected-lines block at send time and clears it (skipped for slash/bash commands). - **`config/keybindings.go`** — explorer `select`/`toggle_select`/`annotate`/`submit` actions + `chat.focus_attachments` (`ctrl+g`). - **Tests** — formatter (selected-lines-only), the attachments tree (grouping, cursor→index mapping, clamp), explorer keys (enter-attaches, close-carries), and the send-path gating/concatenation. - **Attached context, not input injection** — snippets land as a reviewable tree of file + line ranges below the input and are sent with the next message, instead of overwriting whatever you'd typed. - **Selected lines only** — exactly the chosen range is sent (no whole-file or context-window dump), keeping token use tight and the model's focus precise. - **Line-based selection** — deterministic and language-agnostic (no tree-sitter dependency). Syntax-tree-node selection remains a future enhancement. - **Optional annotations** — `enter` attaches immediately; `a` adds a per-snippet note when wanted. The tree shows only file + lines. - [x] `/explorer` supports a snippet-selection mode on an open file. - [x] Select a line range, rendered with a distinct gutter style. - [x] Attach an optional natural-language annotation. - [x] Selections stored as `(file, start_line, end_line, annotation)`. - [x] The selected lines (+ annotation) reach the LLM — sent with the next message. - [x] Multiple disjoint selections within one file and across files. - [x] Tests cover selection, attachment, the tree, and the send path. - `golangci-lint run` → 0 issues - `go test ./...` → all pass - `gofmt` / pre-commit hooks → pass None. CLI-internal TUI feature; docs added in-repo under `docs/features/`. ```bash task test go test ./internal/ui/components/... ./internal/app/... ```
Co-authored-by: Eden Reich <[email protected]>
edenreich
force-pushed
the
feat/skills-agents-standard-location
branch
from
June 20, 2026 18:00
b03fb78 to
dea087d
Compare
inference-gateway-releaser Bot
pushed a commit
that referenced
this pull request
Jun 20, 2026
## [0.122.0](v0.121.1...v0.122.0) (2026-06-20) ### 🚀 Features * **shortcuts:** add /release-notes shortcut to display changelog entries ([#634](#634)) ([4d0d0bf](4d0d0bf)), closes [#518](#518) * **explorer:** add snippet selection and annotation for targeted refactoring ([#637](#637)) ([7e619f9](7e619f9)), closes [#599](#599) * add wrap-up reminders for agent mode ([#628](#628)) ([#635](#635)) ([f5d95a5](f5d95a5)) * **skills:** scan .agents/skills as a third skill location ([#640](#640)) ([6e422b9](6e422b9)), closes [#639](#639) [#639](#639) ### ♻️ Code Refactoring * **pricing:** add MiniMax models and update subscription terminology ([8df84e7](8df84e7)) ### 🔧 Build System * **deps:** bump alpine from 3.24.0 to 3.24.1 in the docker group ([#630](#630)) ([4d2160e](4d2160e)) * **deps:** bump inference-gateway/.github/.github/workflows/infer.yml from 0.8.0 to 0.10.3 in the github-actions group across 1 directory ([#633](#633)) ([913304d](913304d)) * **deps:** bump the gomod group with 4 updates ([#629](#629)) ([b73f4d3](b73f4d3)) ### 👷 CI/CD * **infer:** centralize infer.yml + sync .infer config ([#638](#638)) ([86d0c18](86d0c18)) * **deps:** upgrade actions/checkout from v6.0.3 to v7.0.0 across workflows ([7befc6c](7befc6c)) ### 🧹 Maintenance * **deps:** bump claude-code 2.1.161 -> 2.1.170, claude-code-action v1.0.135 -> v1.0.142 ([#626](#626)) ([9edfb85](9edfb85)) * **deps:** bump claude-code 2.1.170 -> 2.1.177, claude-code-action v1.0.142 -> v1.0.150 ([#632](#632)) ([c81923f](c81923f)) * **deps:** bump claude-code-action v1.0.150 -> v1.0.152 ([#636](#636)) ([1d58889](1d58889)) * **deps:** bump infer CLI v0.121.0 -> v0.121.1, infer-action v0.12.1 -> v0.13.1 ([#627](#627)) ([c231a03](c231a03)) * bump schema version to 1.13.0 and update docker version to 29.5.2 ([287b1bb](287b1bb))
Contributor
|
🎉 This PR is included in version 0.122.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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
Adds
.agents/skills/<name>/SKILL.mdas a third Agent Skills scan location, so skill folders authored to the emerging cross-tool open standard (Claude Code, Gemini CLI, Codex CLI) work without being moved into.infer/skills/.Precedence (first match wins on a
namecollision):.infer/skills/— project (highest).agents/skills/— open standard (new, middle)~/.infer/skills/— user-global (lowest)Changes
internal/domain/skills.go): newSkillScopeAgents = "agents"scope value.config/config.go): newAgentsDirName = ".agents"constant;isWithinSkillsDirnow carves.agents/skillsout of the sandbox so aReadofSKILL.md/references/*.mdsucceeds even under a restrictivetools.sandbox.directories(parity with.infer/skills).internal/services/skills/skills.go):searchScopes()inserts.agents/skillsbetween project and user-global. The existingseen-map dedup provides precedence — no loop changes.cmd/skills.go):skills/skills listhelp now lists all three locations andscope (project / agents / user).docs/skills.md(Locations + portability),docs/directory-structure.md(.agents/tree block +.infer/skills/entry).Out of scope (per #639)
.infer/skills/,--user→~/.infer/skills/).infer initdoes not create.agents/(it's brought by external repos).~/.agents/skills/is not scanned.Testing
task test(full suite) ✅,task lint(0 issues) ✅,task build✅.TestPrecedence_AgentsMiddleScope,TestSearchScopes_Order(skills pkg);TestValidatePathInSandbox_AgentsSkillsCarveOut(config pkg — uses a restrictive sandbox on purpose, since.agents/isn't a protected path, so the test actually fails without the carve-out).infer skills listacross a scratch project + fakeHOME:.agents/skillsshows scopeagents, overrides user-global, and is overridden by project.Closes #639