Skip to content

fix(skills): give working commands and accurate status in skill tool messages - #6467

Merged
kovtcharov-amd merged 3 commits into
mainfrom
fix/skill-tool-instructions
Nov 2, 2026
Merged

kovtcharov-amd merged 3 commits into
mainfrom
fix/skill-tool-instructions

Conversation

@kovtcharov-amd

Copy link
Copy Markdown
Collaborator

Several skill messages sent the model and the user to commands that fail or claimed things that don't happen. Installing a skill the agent already bundles told the model to load the install, but the bundled copy is what loads. gaia skill import without --allow-experimental exits 4 for a skill with code, gaia skill deltas --drop-section without --scope exits 2, and gaia skill info --remote doesn't exist. The skills catalog said gh is refused until a skill loads, but it actually asks the user to approve each command. Now every named command runs as written and every status claim matches the code.

Needs a flagship eval: the catalog line is in every system prompt, and tool results and one tool docstring changed. Please re-run gaia_skills_lifecycle, gaia_skills_capture and gaia_skills_tasks in eval_flagship.yml.

Test plan

  • New tests: shadowed-install message and shadowed_by; the import, drop-section, install and search commands parse with the real gaia skill argparse; the tainted-turn refusal and the not-loaded refusal wording; the undo notice; the compact-tier hint names capture_skill
  • python -m gaia.cli in a temp home: skill import <dir> exits 4 and with --allow-experimental exits 0; skill deltas --drop-section exits 2 and with --scope exits 0; skill info --remote exits 2; skill search exits 0
  • Skills, agent and flagship suites: 8162 passed. The 9 failures are 3 that also fail on main, a test that passes on rerun, and 5 that pass when run alone
  • util/lint.py --all: black, isort, flake8 and the tool-description budget pass. Pylint's 2 errors are Windows-only, in files this PR doesn't touch
  • Flagship eval: gaia_skills_lifecycle, gaia_skills_capture, gaia_skills_tasks
🔍 Technical details

Model-visible strings changed:

  • CATALOG_HEADER (system prompt): "some pre-approve a CLI (such as gh) — until the skill is loaded, each of its commands waits for the user's approval." The golden fixture non_claude_system_prompt.txt is updated.
  • install_skill result: new next_step and shadowed_by when a bundled copy outranks the install; new next_step when the host has the skill turned off.
  • load_skill refusal for an imported skill with code: the command now includes --allow-experimental and is shell-quoted.
  • load_skill docstring, Returns: a missing CLI with no substitute refuses the load.
  • list_skills compact-tier hint: hub installs need a larger model, and capture_skill still works.
  • remember_skill_lesson "not loaded" error: says the lesson can be saved on the user's next message.
  • remember_skill_lesson empty-text error: gaia skill deltas <skill> --scope <scope> --drop-section <section>.
  • remember_skill_lesson success notice: "Undo, which takes effect when GAIA next starts: …"
  • validate_delta provenance refusal: "A tool already ran this turn, and anything a tool returns — a web page, an email, a skill's text, a command's output — …" The first clause appears only for tool_content.
  • Hub errors (pin, SKILL.md fetch): gaia skill install <name>[@<version>] and gaia skill search <name> replace gaia skill info --remote.
  • Skill-format errors: anchors are now #the-metadata-gaia-namespace and #tools-vs-tools_required-%E2%80%94-never-conflate-them, checked against the live page's ids.
  • Permission refusals: the sandbox pointer is now open feat(skills): Phase 2 — local-capability permission sandbox (filesystem/shell/database/desktop/env) #2863 instead of closed feat(skills): SKILL.md support — build, load, share agent skills via agentskills.io standard #1019.

Decisions:

  • C5: load_skill still taints the turn. A loaded skill's text is third-party, and test_even_a_skill_listing_taints_the_turn pins that. So the guidance changed, not the taint.
  • C10: capture_skill stays on the compact tier. test_gemma_keeps_installed_skills_and_documents asserts that on purpose, and feat(npu): offer GAIA's Gemma on the Ryzen AI NPU, GPU stays default #5892 withheld only the hub. The comment and hint now say so.
  • cli_setup bundle: it's defined once in DOC_BUNDLES and once in FULL_BUNDLES, one per profile, like shell_session. That isn't a duplicate, so it's unchanged.
  • Overlap: fix(skills): send hub skills through install, not capture #6463 adds imports on the line next to the one this PR adds in install_skill. Whichever merges second needs a trivial rebase.

…messages

Several skill messages GAIA hands the model and the user named commands
that fail or described behaviour that doesn't happen, so the agent relayed
dead ends and wrong claims.

- install_skill on a skill the agent bundles now says the bundled copy is
  what load_skill loads, instead of telling the model to load the install.
- Named commands now run as written: `gaia skill import ...
  --allow-experimental` for an imported skill with code, `gaia skill deltas
  <skill> --scope <scope> --drop-section`, and `gaia skill install` /
  `gaia skill search` in place of the nonexistent `gaia skill info --remote`.
- The skills catalog says an ungranted CLI such as gh waits for the user's
  approval rather than being refused; load_skill's docstring says a missing
  CLI with no substitute refuses the load.
- remember_skill_lesson says a lesson for a just-loaded skill can be saved on
  the user's next message (load_skill stays tainting: a skill's text is
  third-party), the provenance refusal says a tool already ran this turn,
  and the undo notice says a revert takes effect on the next start.
- The compact-tier hint and comment say capture_skill stays available.
- Docs anchors match the live slugs; the sandbox pointer moves from closed
  #1019 to open #2863; the flagship docs drop the nonexistent --skill-set
  flag and re-measure gaia-voice at 789 tokens.
@kovtcharov-amd kovtcharov-amd added this to the v0.25.4 milestone Nov 2, 2026
@github-actions github-actions Bot added documentation Documentation changes tests Test changes agents labels Nov 2, 2026
@github-actions

github-actions Bot commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Skill audit

Skill Verdict Claimed tier Cleared tiers Findings Rules
hub/agents/gaia/npm ✅ ALLOW experimental experimental 3 high body.injection.credential_request, body.injection.guardrail_bypass, body.injection.persona_override

✅ All audited skills cleared the tier they claim.

Per-finding detail is withheld here on purpose. Read it in the Security > Code scanning tab, or download the skill-audit-reports artifact from this run. Offending source text is withheld from CI everywhere — reproduce it locally with gaia skill audit <dir> --show-snippets.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Verdict: Approve with suggestions

This PR fixes skill messages that sent the model and the user to commands that fail, or that described behaviour GAIA doesn't have. I checked every command the new messages name against the real gaia skill CLI, and each one now runs as written. The bundled-skill install now says honestly that the bundled copy is the one that loads, and CI is green. Nothing blocks the merge.

Real-world evidence

The evidence stage ran on a runner with no model and a local fake hub. It confirms the new commands work and the old ones fail:

$ gaia skill info demo --remote                       # what the old hint named
gaia: error: unrecognized arguments: --remote          (exit 2)

$ gaia skill install 'demo@^9.0'
❌ No published version of skill 'demo' satisfies '^9.0'. Published: 1.0.0. Loosen the pin, e.g. 'gaia skill install demo' for the latest. ...   (exit 3)

$ gaia skill deltas github-triage --drop-section github-triage                 # old hint form
gaia skill deltas: --drop-section needs --scope, ...                           (exit 2)
$ gaia skill deltas github-triage --scope gaia --drop-section github-triage    # new hint form
Removed section 'github-triage' from github-triage 0.1.0 ...                   (exit 0)

$ gaia skill import <dir>                         → exit 4 (needs opt-in)
$ gaia skill import <dir> --allow-experimental    → ✅ Imported ... exit 0

It also called the agent's tools directly. Installing a hub copy of a bundled skill returned shadowed_by: {"root": "agent-bundled", "version": "0.1.0"} and the new next_step. Loading the skill afterwards put the bundled body in the system prompt, and the hub copy's planted marker was absent. On the compact tier, the list_skills hint names capture_skill, and that tool is still registered there.

The bundle marks two surfaces pending strix-halo lane: the capture_skill / remember_skill_lesson refusals in a live agent turn, and the Agent UI rendering. Those parts of the verdict rest on the unit tests and static review.

🔍 Technical details

Issues

🟢 Docs still name closed #1019 as the sandbox tracker. The PR moves src/gaia/skills/permissions.py:249,261 to #2863 (open, "Phase 2 — local-capability permission sandbox"). The same claim still links #1019 in docs/reference/cli.mdx:2964,3189,3355, docs/plans/skill-format.mdx:12,279,477, src/gaia/skills/migrate.py:27 and hub/skills/daily-brief/SKILL.md:57. CLAUDE.md asks that a changed claim be updated everywhere it appears. src/gaia/cli.py:4643 (scheduler + skills) is a different topic, so leave it.

🟢 A second private import from gaia.skills.capture. src/gaia/agents/tools/skill_library_tools.py:348 imports _shell_path, a private helper. It works, but now that a second module uses it, consider making it public (shell_path) so a rename in capture.py doesn't quietly break the refusal path.

Out of scope (noticed in the evidence): for a skill that ships scripts/run.py, the CLI's tier-gate refusal on gaia skill import says "This skill is instruction-only: it ships no code". That message is older than this PR, but it's wrong and worth its own issue.

Checked and fine

  • install_skill shadowing: install.py calls resolver.reload(), so discover() right after the install is fresh. Only agent-bundled outranks user, so "GAIA already includes" is accurate for the winner.root != ROOT_USER branch. winner is None happens only through _excluded_names, which matches the "turned off" wording.
  • The docs anchors match the skill-format.mdx headings (the evidence confirms lines 107 and 138).
  • The CHANGELOG entry covers the user-visible changes, and the golden prompt fixture is updated to match CATALOG_HEADER.

Strengths

  • The new tests parse each named command with the real gaia skill argparse tree, so a future flag rename breaks a test instead of the user. This is the "verify the call is valid, not just invoked" rule done properly.
  • The provenance refusal now says "a tool already ran" only for tool_content, so harmless reads aren't blamed on a web page, and a test pins the no-provenance case.
  • The shadowed-install test checks the loaded prompt as well as the message. It proves the bundled body loads and the hub copy's marker doesn't.

… public

The migrate module still named closed #1019 as the Phase 2 sandbox tracker
while the runtime errors point at open #2863; it now names #2863 too.
capture's path-quoting helper is now public (shell_path) because the skill
library tools import it as well.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

The migrate docs now point at the open sandbox issue (#2863), matching the runtime errors, and capture's path helper is public (shell_path) now that the skill tools import it.

I left daily-brief alone: its #1019 link is about running a skill on a schedule, not the sandbox, so #2863 would be the wrong target. That's the same link the gaia schedule add --skill error uses, and there's no open issue for skill scheduling to point either at yet. The CLI reference and skill-format plan are being rewritten in #6461.

Brings in the skill import-digest change. Keeps both sides' imports and tests, takes main's migrate docstring with the #2863 sandbox link, and exports shell_path from gaia.skills.capture.
@kovtcharov-amd

Copy link
Copy Markdown
Collaborator Author

Merged main, which now includes #6463. Kept both sides' tests, took main's migrate docstring with the #2863 sandbox link, and exported shell_path from gaia.skills.capture. The skill unit tests and the hub-agent skill tests pass.

@kovtcharov-amd
kovtcharov-amd added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 59647a0 Nov 2, 2026
70 of 71 checks passed
@kovtcharov-amd
kovtcharov-amd deleted the fix/skill-tool-instructions branch November 2, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents documentation Documentation changes tests Test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(skills): SKILL.md support — build, load, share agent skills via agentskills.io standard

1 participant