Skip to content

[FEATURE] Dynamic skills: progressive discovery from the centralized skills catalog #972

Description

Summary

Today a skill must already exist on disk before a run: the CLI scans .infer/skills/, .agents/skills/, and ~/.infer/skills/, and anything else has to be installed manually with infer skills install <name>. In practice every project ends up vendoring its own copies of the same skills, causing skill sprawl across the GitHub org.

Proposal - dynamic skills via progressive discovery (see this post): let the agent discover and fetch skills at runtime from the centralized catalog (inference-gateway/skills, served at https://registry.inference-gateway.com/skills/) instead of requiring per-project copies.

  • When the agent needs a skill it does not have locally, it looks it up in the centralized catalog, downloads it, and activates it on demand.
  • Local skills override the catalog: if a skill with the same name already exists in any scanned location, no lookup or download happens. This extends the existing precedence chain (project-local, then open standard, then user-global) with the catalog as the last fallback.
  • The centralized skills repo becomes the single source of truth; projects stop vendoring skills unless they intentionally override one.

Acceptance Criteria

  • With skills enabled, the agent can discover and fetch a skill from the centralized catalog at runtime when no local skill of that name exists.
  • A local skill with the same name short-circuits discovery: no catalog lookup or download is performed.
  • Discovery is progressive: only catalog metadata (name, description) is consulted up front; a skill body is fetched only when the skill is actually activated.
  • The behavior is configurable, the skills discovery is a feature behind a toggle, disabled by default.
  • When skills discovery is enabled, the volatile section about skills explains the agent how to fetch a skill from the registry.
  • When skills discovery is disabled, the volatile section doesn't explains how to fetch skills from the registry (YAGNI - tokens saving).
  • The functionality for installing skills is re-used for the progressive discovery.
  • The dynamic skills are deleted after the session is completed (post cleanup hook) - can be configured but cleanup is done by default.
  • docs/skills.md documents the full discovery order including the catalog fallback.

Activity

  1. moved this to Todo in 2026on Jul 30, 2026
  2. edenreich commented on Jul 30, 2026

    @edenreich
    Contributor

    @infer Can you work on this? use /go /go-concurrency /ponytail:ponytail

  3. inference-gateway-maintainer commented on Jul 30, 2026

    @inference-gateway-maintainer
    ContributorAuthor

    Model: ollama_cloud/deepseek-v4-flash · View Job

    Todos

    • Add SkillsDiscovery config to AgentSkillsConfig (enabled: false, registry_url, cleanup: true)
    • Add SkillScopeCatalog to domain and IsDynamic field to Skill
    • Add Discover/CleanupDynamic methods to SkillsService interface
    • Implement catalog client and progressive discovery in skills service
    • Add volatile section about skills discovery to system prompt (gated on config)
    • Wire cleanup hook in container
    • Update docs/skills.md with discovery order
    • Run precommit and push

    Pull Request

    #973

    ✅ Infer Result: Success

    All tasks are complete. Here's a summary of the changes:

    Summary

    Implemented progressive skill discovery from the centralized skills catalog (inference-gateway/skills), resolving issue #972.

    What changed

    Config (config/config.go):

    • Added SkillsDiscoveryConfig struct with Enabled (default false), RegistryURL, and Cleanup (default true) fields to AgentSkillsConfig

    Domain (internal/domain/skills.go):

    • Added SkillScopeCatalog scope for dynamically discovered skills
    • Added Discover(ctx, name) and CleanupDynamic(ctx) methods to the SkillsService interface

    Catalog client (internal/services/skills/catalog.go - new file):

    • CatalogClient fetches skill metadata from the registry index (index.json) - only name + description up front (progressive)
    • DownloadSkill reuses the existing Installer to download the full skill body on activation
    • CleanupDynamic removes downloaded skills from .infer/tmp/skills/ after the session

    Skills service (internal/services/skills/skills.go):

    • Discover(): checks local skills first (short-circuits), then looks up the catalog, downloads on activation, caches in-memory
    • CleanupDynamic(): gated on config, defaults to cleanup enabled

    System prompt (internal/agent/agent_utils.go):

    • When discovery.enabled is true: adds SKILLS DISCOVERY section explaining how to fetch skills from the registry
    • When disabled: no registry mention (YAGNI - tokens saving)

    Container (internal/container/container.go):

    • Calls CleanupDynamic in Shutdown for post-session cleanup

    Docs (docs/skills.md):

    • Documents the full discovery order: project-local > .agents/skills > user-global > plugin > catalog (last fallback)
    • Includes config example and cleanup behavior

    PR: #973 (draft, ready for review)

    Model: ollama_cloud/deepseek-v4-flash · Exit Code: 0 · Duration: 8m 50s

    Tokens: 11,124,748 in · 15,618 out · 11,140,366 total (51 requests)

    Tool calls: 61 total · 92% success rate

    Traces
    Session: 1785445392-0267762f
    
    session (standard, success)                 8m48s
    ├── chat ollama_cloud/deepseek-v4-flash      2.5s
    ├── execute_tool TodoWrite call_4fd7j3xa     83µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.0s
    ├── execute_tool Read call_6ftohadn         223µs
    ├── execute_tool Read call_s0jp0sob         284µs
    ├── execute_tool Read call_m0dxk0wn         153µs
    ├── execute_tool Read call_8znt3g8a         200µs
    ├── execute_tool Read call_msr27mis         100µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Read call_nf08pwqj         492µs
    ├── execute_tool Read call_vrfdcsa0         209µs
    ├── execute_tool Read call_ljg2pjmo         775µs
    ├── execute_tool Read call_agpqtbap          94µs [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      3.9s
    ├── execute_tool Read call_0j3429a6         612µs
    ├── execute_tool Read call_dfg3miua         510µs
    ├── execute_tool Read call_4qh1sbnv           1ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.6s
    ├── execute_tool Read call_08l9wp9t         230µs
    ├── execute_tool Read call_7ixld1v6         114µs
    ├── execute_tool Read call_w2miwg2o          97µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.6s
    ├── execute_tool Bash call_gcm0q5qx           8ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Bash call_mwb06myw           4ms
    ├── chat ollama_cloud/deepseek-v4-flash      5.5s
    ├── execute_tool Bash call_wn7yq9cv          1.1s
    ├── chat ollama_cloud/deepseek-v4-flash      2.4s
    ├── execute_tool Bash call_s9ol4s1y         254ms
    ├── chat ollama_cloud/deepseek-v4-flash      2.7s
    ├── execute_tool Bash call_jswaoxvp          1.4s
    ├── chat ollama_cloud/deepseek-v4-flash      4.3s
    ├── execute_tool Bash call_pmuus2pl         775ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.3s
    ├── execute_tool TodoWrite call_cx8atly3     65µs
    ├── chat ollama_cloud/deepseek-v4-flash     11.9s
    ├── execute_tool Edit call_6evmw5gp           1ms
    ├── chat ollama_cloud/deepseek-v4-flash      6.5s
    ├── execute_tool TodoWrite call_pkub925m     67µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.8s
    ├── execute_tool Edit call_b5vmq34n         337µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.1s
    ├── execute_tool Edit call_j2t3myjs         326µs
    ├── chat ollama_cloud/deepseek-v4-flash     22.8s
    ├── execute_tool Write call_mpx5fkk7        757µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.6s
    ├── execute_tool Edit call_qqorx3o8         463µs
    ├── chat ollama_cloud/deepseek-v4-flash      8.8s
    ├── execute_tool Edit call_e2rovotm         416µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.7s
    ├── execute_tool TodoWrite call_ej6ydyqo     72µs
    ├── chat ollama_cloud/deepseek-v4-flash      7.2s
    ├── execute_tool Edit call_b6hqtdbs         779µs
    ├── chat ollama_cloud/deepseek-v4-flash      5.2s
    ├── execute_tool Edit call_3qs64h76         700µs
    ├── chat ollama_cloud/deepseek-v4-flash      5.8s
    ├── execute_tool TodoWrite call_4qu3b2er     83µs
    ├── chat ollama_cloud/deepseek-v4-flash      8.7s
    ├── execute_tool Edit call_coe5c4ty         435µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.0s
    ├── execute_tool Write call_emn0wxov        652µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.6s
    ├── execute_tool Bash call_d2t3u91j         883ms [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      5.3s
    ├── execute_tool Bash call_9khjy3rm         1m23s [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      5.2s
    ├── execute_tool Edit call_51mea093         361µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.3s
    ├── execute_tool Bash call_uy0lok5v         11.1s [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Bash call_3tp3h8ni         1m41s
    ├── chat ollama_cloud/deepseek-v4-flash     16.2s
    ├── execute_tool Bash call_0vaneucf         11.2s [error: tool_error]
    ├── chat ollama_cloud/deepseek-v4-flash      4.3s
    ├── execute_tool Grep call_7275d7jp          86ms
    ├── chat ollama_cloud/deepseek-v4-flash      6.4s
    ├── execute_tool Grep call_m0rfx2z5         854µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.7s
    ├── execute_tool Read call_l2vlhgwz         183µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.8s
    ├── execute_tool Edit call_dto7bguh         312µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.6s
    ├── execute_tool Grep call_zjxipdrq         563µs
    ├── chat ollama_cloud/deepseek-v4-flash      3.4s
    ├── execute_tool Read call_bupvzvvm         155µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.0s
    ├── execute_tool Edit call_lh82hhce         690µs
    ├── chat ollama_cloud/deepseek-v4-flash     10.8s
    ├── execute_tool Grep call_3n1vgd1b         476µs
    ├── chat ollama_cloud/deepseek-v4-flash      5.7s
    ├── execute_tool Read call_zcuhdvv5         173µs
    ├── chat ollama_cloud/deepseek-v4-flash      4.6s
    ├── execute_tool Edit call_wbavwni4         416µs
    ├── chat ollama_cloud/deepseek-v4-flash      6.7s
    ├── execute_tool Bash call_6bxldlms         11.6s
    ├── chat ollama_cloud/deepseek-v4-flash      3.1s
    ├── execute_tool Bash call_n03f649w          15ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.6s
    ├── execute_tool Bash call_2svsirsd          3.1s
    ├── chat ollama_cloud/deepseek-v4-flash      3.6s
    ├── execute_tool Bash call_d2qmry54          1.3s
    ├── chat ollama_cloud/deepseek-v4-flash      3.3s
    ├── execute_tool Bash call_3xbg5ja4          2.0s
    ├── chat ollama_cloud/deepseek-v4-flash      3.7s
    ├── execute_tool Bash call_yf5ea0ee         684ms
    ├── chat ollama_cloud/deepseek-v4-flash      5.7s
    ├── execute_tool Bash call_4kr7x1y2           9ms
    ├── chat ollama_cloud/deepseek-v4-flash      3.8s
    ├── execute_tool Bash call_z4tl8c0n         400ms
    ├── chat ollama_cloud/deepseek-v4-flash      4.7s
    ├── execute_tool TodoWrite call_18bnni2b     79µs
    ├── chat ollama_cloud/deepseek-v4-flash      8.4s
    ╰── chat ollama_cloud/deepseek-v4-flash      4.8s
    
    Stats
    Tool Calls
    
    ╭───────────┬───────┬───────┬─────────╮
    │ Tool      │ Calls │ Fail% │ Avg     │
    ├───────────┼───────┼───────┼─────────┤
    │ Bash      │ 19    │ 21%   │ 12079ms │
    │ Read      │ 18    │ 6%    │ 0ms     │
    │ Edit      │ 12    │ 0%    │ 0ms     │
    │ TodoWrite │ 6     │ 0%    │ 0ms     │
    │ Grep      │ 4     │ 0%    │ 22ms    │
    │ Write     │ 2     │ 0%    │ 0ms     │
    ╰───────────┴───────┴───────┴─────────╯
    
    Token Usage
    
    ╭────────────────────────────────┬──────────┬────────┬────────────┬──────────┬──────╮
    │ Model                          │ Prompt   │ Cached │ Completion │ Total    │ Cost │
    ├────────────────────────────────┼──────────┼────────┼────────────┼──────────┼──────┤
    │ ollama_cloud/deepseek-v4-flash │ 11422776 │ 0      │ 15723      │ 11438499 │ -    │
    ╰────────────────────────────────┴──────────┴────────┴────────────┴──────────┴──────╯
    
    Sessions
    
    ╭───────────┬──────────┬──────────╮
    │ Execution │ Mode     │ Sessions │
    ├───────────┼──────────┼──────────┤
    │ headless  │ standard │ 1        │
    ╰───────────┴──────────┴──────────╯
    
    ⚠️ 5 log(s)
    • Read call_agpqtbap:
      NOT_FOUND: /home/runner/work/cli/cli/config/skills.go
      
    • Bash call_d2t3u91j:
      exit status 1: pull request create failed: GraphQL: No commits between main and fix/issue-972 (createPullRequest)
      
    • Bash call_9khjy3rm:
      exit status 201: �[32mtask: [precommit:run] ./.githooks/pre-commit
      �[0mpre-commit: using task from PATH (/opt/hostedtoolcache/task/3.48.0/x64/bin/task)
      … (truncated)
      
    • Bash call_uy0lok5v:
      exit status 201: �[32mtask: [precommit:run] ./.githooks/pre-commit
      �[0mpre-commit: using task from PATH (/opt/hostedtoolcache/task/3.48.0/x64/bin/task)
      … (truncated)
      
    • Bash call_0vaneucf:
      exit status 201: �[32mtask: [precommit:run] ./.githooks/pre-commit
      �[0mpre-commit: using task from PATH (/opt/hostedtoolcache/task/3.48.0/x64/bin/task)
      … (truncated)
      

    Triggered by edenreich · Infer Action · OSS

  4. moved this from Todo to In progress in 2026on Jul 30, 2026
  5. moved this from In progress to QA in 2026on Jul 30, 2026
  6. inference-gateway-releaser commented on Jul 31, 2026

    @inference-gateway-releaser
    Contributor

    🎉 This issue has been resolved in version 0.155.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

  7. moved this from QA to Done in 2026on Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions