Repository navigation
fix(skills): send hub skills through install, not capture - #6463
Conversation
A skill published on the GAIA hub is installed with its signature checked; capturing it from a hub link or under its hub name now refuses and points to `gaia skill install <name>`. - capture_skill refuses URLs on the configured hub (GAIA_HUB_URL, including its path) and on hub.amd-gaia.ai, and skills whose name the hub catalog lists. If the catalog cannot be read and there is no offline copy, capture fails with an actionable error instead of skipping the check. - `gaia skill import` refuses hub URLs through the same check. - When install_skill fails signature, checksum, or bundle verification, the result says the skill must not be obtained another way, and capture refuses that name for the rest of the session.
|
Verdict: Approve with suggestions This PR closes a loophole where a skill published on the GAIA hub could be copied in through capture or Two things to look at before merging:
Real-world evidenceThe evidence stage ran the real CLI from a throwaway The agent's 🔍 Technical details🟡 Import doesn't re-check a redirect target (
Add a test next to 🟢 Capture fails closed with no catalog (
🟢 Session state lives on the agent object (
Strengths
|
`gaia skill migrate` now applies the same tier and permission checks as `gaia skill import` and records a skill-lock.json entry, so a converted skill is held to the experimental tier when it loads. - A source whose mapped permissions sit above the experimental ceiling (e.g. `requires.bins: [gh]`) is reported unmigratable with import's message; the dry run reports it too. - install_migrated stages the converted skill and lands it via import_bundle: ceiling, symlink refusal, audit, --allow-experimental for code (new migrate flag), and a `source: migrated` entry with a content digest. Imports now record that digest as well. - A user-root skill with no lock entry is held to the experimental ceiling at load; `gaia skill lock --relock` records an authored skill as local. Agent-bundled and .claude roots are unchanged. - Relock records an unversioned skill as "unversioned" so the lock it writes can be read back.
… URL gaia skill import checked only the URL the user typed, so a link that redirected onto the hub was still imported. The download now applies the same final-URL check capture uses and refuses a hub landing before writing anything; a redirect to any other https host still imports.
|
The offline-capture behaviour (capture needs the hub catalog, even for pasted text) is unchanged; that one is a maintainer call. |
Skill audit
✅ 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 |
…messages (amd#6467) 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 - [x] 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` - [x] `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 - [x] 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 - [x] `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` <details> <summary>🔍 Technical details</summary> 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 amd#2863 instead of closed amd#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 amd#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:** amd#6463 adds imports on the line next to the one this PR adds in `install_skill`. Whichever merges second needs a trivial rebase. </details>
A skill published on the GAIA hub is installed with its signature checked, but capture and
gaia skill importcould also bring one in from a hub link, skipping that check. Capturing a hub link, or a skill under a name the hub publishes, now refuses and points you togaia skill install <name>. When an install fails signature verification, GAIA now says the skill must not be fetched, captured, downloaded, or rewritten some other way, and won't capture that name for the rest of the session.gaia skill migratenow applies the same tier and permission checks as import and records a lock entry, so a converted skill that needs a CLI is refused, and a skill in~/.gaia/skillswith no lock entry loads at the experimental tier.Test plan
python -m pytest tests/unit/test_capture_hub_source.py tests/unit/test_skill_capture.py tests/unit/test_skill_import_gate.py tests/unit/test_skills_install.py tests/unit/test_skill_migrate_gate.py tests/unit/test_skills_migrate.pypython -m pytest -p no:randomly hub/agents/gaia/python/tests/test_skill_library_tools.pygaia skill import https://hub.amd-gaia.ai/skills/research-report/1.0.0/research-report-1.0.0.ziprefuses with thegaia skill install research-reporthint and writes nothinggaia skill migrate <openclaw skill with requires.bins: [gh]>exits 4 with the experimental-ceiling message and writes nothing; an instruction-only skill migrates and appears inskill-lock.jsonassource: migratedgaia_skills_lifecycleandgaia_skills_capture(tool-result text changed)