Repository navigation
Description
Summary
When the @infer bot runs in CI (via inference-gateway/infer-action), installed skills are effectively unusable. Two compounding defects:
1. The only path to a skill's instructions is the Read tool, which the sandbox blocks.
buildSkillsInfo() (internal/agent/agent_utils.go) injects each skill into the system prompt as name (scope): description plus Path: <abs>, with the instruction: "When a task matches a skill's description, read the SKILL.md file at the listed path using the Read tool, then follow its instructions." But infer-action installs skills with infer skills install <skill> --user, i.e. to ~/.infer/skills/ (/home/runner/.infer/skills/...), which is outside the default Read sandbox ['.', '/tmp', '.infer/tmp'] (config/config.go, ValidatePathInSandbox). So the one and only path to a skill's body is denied:
Read: path '/home/runner/.infer/skills/maintainer/SKILL.md' is outside configured sandbox directories
Read: path '/home/runner/.infer/skills/maintainer/references/github-issues.md' is outside configured sandbox directories
2. Skill activation is non-deterministic.
There is no explicit invocation path: no /<skill> slash command, no "use the X skill" detection, and infer skills exposes only list/install/uninstall (no use/activate). The SKILL.md body is deliberately discarded at startup (progressive disclosure: parseFrontmatter() keeps only frontmatter; see the comment in internal/domain/skills.go). So whether a skill is ever applied depends entirely on the model opportunistically deciding to Read a file that - per defect 1 - it cannot read.
Net effect: a user can ask the agent to use the maintainer skill and the skill is silently never loaded.
Steps to Reproduce
- Install a skill to the user scope (exactly what infer-action does):
infer skills install maintainer --user --overwrite. - Run the agent in that workspace and ask it to use the skill (e.g. a request that explicitly names the maintainer skill).
- Watch the agent attempt
Read /home/runner/.infer/skills/maintainer/SKILL.md.
Expected Behavior
The agent deterministically loads and follows the instructions of the explicitly requested skill.
Actual Behavior
- The Read is denied (
outside configured sandbox directories) forSKILL.mdand itsreferences/*.md, so the skill body is never obtained. - Even without the sandbox block, nothing guarantees activation - it is left to the model's discretion.
- Observed live in the
@infer(Deepseek) run on theinference-gateway/inference-gatewayrepo, PR 317 (multiple such failures in the "19 failed tool calls" panel).
Proposed fix
Two parts, both needed:
- Sandbox: allow read-only access to the skills install dirs (
~/.infer/skills/and./.infer/skills/) by default. There is precedent:ValidatePathInSandboxalready grants~/.claude/**when ClaudeCode is enabled (config/config.go, ~L950) - mirror that for the skills directory. - Deterministic activation: on explicit invocation (a
/<skill>trigger, or an unambiguous "use the X skill" request), have the CLI load the skill's frontmatter + full SKILL.md body directly into the agent context - e.g. abuildActiveSkillInfo()alongsidebuildSkillsInfo()ininternal/agent/agent_utils.go, with the trigger parsed ininternal/app/chat_application.go/cmd/agent.go. This guarantees the skill is applied and removes the dependency on the (sandbox-blocked, model-driven) lazy Read for the SKILL.md itself.references/*.mdcan remain progressive-disclosure, covered by the sandbox fix above.
Activity
fix(skills): load installed skills via sandbox carve-out and determin…
chore(release): 0.117.0 [skip ci]
inference-gateway-releaser commentedon Jun 1, 2026
🎉 This issue has been resolved in version 0.117.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
fix(sandbox): move skills dirs into default Sandbox.Directories uncon…
chore(release): 0.117.1 [skip ci]