fix: correct skills-manager instructions, invalid model ids, and version drift

skills-manager told the agent to run `python skills_cli.py <cmd>`, but
installing the skill copies only SKILL.md — the script stays at the root of
the checkout or npm package. Every documented command failed with "No such
file or directory" on that path. The instructions now say where the script
actually lives, point at the slash commands as the path that needs no
resolution, and offer the ag-skills CLI when neither source is on disk.

Examples call python3; `python` is absent on a stock macOS or Linux install.
The Safety section claimed install "writes only under the global skills
directory", which is false when AG_SKILLS_DIR is set — it now names the
resolved destination and asks the agent to report the real path.

agent-orchestration-multi-agent-optimize listed 'claude-4-sonnet' and
'claude-4-haiku' in a cost table. Neither has ever been a served model id;
they are now claude-sonnet-4-6 and claude-haiku-4-5, with the per-1K input
prices those models actually charge and the unit stated.

plugin.json's version is maintained by hand and nothing compared it to
package.json, so a release that bumped one and forgot the other would stay
green forever. test_plugin_json_schema now asserts they match.
This commit is contained in:
rmyndharis
2026-08-03 01:19:43 +07:00
parent 0520abc901
commit 5cd4ebdffa
3 changed files with 24 additions and 12 deletions
@@ -175,10 +175,10 @@ class CostOptimizer:
def __init__(self):
self.token_budget = 100000 # Monthly budget
self.token_usage = 0
self.model_costs = {
self.model_costs = { # USD per 1K input tokens
'gpt-5': 0.03,
'claude-4-sonnet': 0.015,
'claude-4-haiku': 0.0025
'claude-sonnet-4-6': 0.003,
'claude-haiku-4-5': 0.001
}
def select_optimal_model(self, complexity):
+11 -9
View File
@@ -27,8 +27,10 @@ The `antigravity-skills-manager` skill empowers Google Antigravity agents and us
## Instructions
- Execute commands via `skills_cli.py` or through `/skills-manager` (or `/skills`) slash commands in the CLI chat interface.
- Ensure skill installations save to `~/.gemini/antigravity/skills/<skill_id>/SKILL.md`.
- Prefer the `/skills-manager` (or `/skills`) slash commands. They work wherever the plugin is registered and need no path resolution.
- **`skills_cli.py` does not sit next to this file.** Installing this skill copies only `SKILL.md` into the skills directory; the script lives at the root of the checkout or npm package it came from — `agy plugin install` clones the repo, so it is at the clone root, and the npm package puts it at `node_modules/@rmyndharis/antigravity-skills/skills_cli.py`. Locate it before invoking it, and run it from there; `python3 skills_cli.py <cmd>` from this skill's own directory will not find it.
- If neither the repo nor the npm package is on disk, use `npx @rmyndharis/antigravity-skills` (the `ag-skills` CLI) instead — it covers the same four operations.
- Ensure skill installations save to `~/.gemini/antigravity/skills/<skill_id>/SKILL.md`, or to `AG_SKILLS_DIR` when that is set.
- All underlying commands must use standard Python library features (`urllib.request`, `json`, `os`, `sys`) without third-party dependencies.
---
@@ -38,7 +40,7 @@ The `antigravity-skills-manager` skill empowers Google Antigravity agents and us
- `install` writes instructions that every future Antigravity session loads automatically. Confirm the skill id with the user before installing, and show them what `search` returned rather than picking on their behalf.
- `install` replaces an existing installation of the same skill id, discarding local edits under that directory. Say so before overwriting.
- Never install a skill id the user did not ask for, and never install one that is absent from the catalog.
- `install` writes only under the global skills directory; report the exact path back to the user.
- `install` writes under the resolved skills directory`AG_SKILLS_DIR` when set, otherwise `~/.gemini/antigravity/skills`. Report the exact path back to the user rather than assuming the default.
---
@@ -53,36 +55,36 @@ Provide a unified, lightweight, pure standard-library interface for managing Goo
### 1. List Catalog Skills
Lists catalog skills with their categories and descriptions. An unfiltered listing is capped at the first 40 entries with a count of the remainder; add a filter to see a complete result set:
```bash
python skills_cli.py list
python3 skills_cli.py list
```
*Slash command equivalent*: `/skills-manager list` (or `/skills list`)
### 2. Search Catalog Skills
Filters skills by matching keywords in skill id, name, description, category, tags, or triggers. Multi-word queries match skills containing every term, in any order, and results are never truncated:
```bash
python skills_cli.py search <term>
python3 skills_cli.py search <term>
```
*Example*:
```bash
python skills_cli.py search flutter
python3 skills_cli.py search flutter
```
*Slash command equivalent*: `/skills-manager search flutter` (or `/skills search flutter`)
### 3. Install Skill
Installs the whole skill folder into the global skills directory (`~/.gemini/antigravity/skills/<skill_id>/`), copying from the catalog shipped beside the script when present and downloading from GitHub otherwise. Any existing installation of the same id is replaced. Exits non-zero if some files could not be retrieved:
```bash
python skills_cli.py install <skill_id>
python3 skills_cli.py install <skill_id>
```
*Example*:
```bash
python skills_cli.py install flutter-expert
python3 skills_cli.py install flutter-expert
```
*Slash command equivalent*: `/skills-manager install flutter-expert` (or `/skills install flutter-expert`)
### 4. List Installed Skills
Inspects local `~/.gemini/antigravity/skills/` directory and lists installed skills:
```bash
python skills_cli.py installed
python3 skills_cli.py installed
```
*Slash command equivalent*: `/skills-manager installed` (or `/skills installed`)
+10
View File
@@ -26,6 +26,16 @@ class TestSchemaValid(unittest.TestCase):
self.assertIsInstance(data["version"], str)
self.assertTrue(re.match(r"^\d+\.\d+\.\d+$", data["version"]), f"Invalid semantic version: {data['version']}")
# plugin.json's version is maintained by hand and nothing else cross-checks it,
# so a release that bumps package.json and forgets this file stays green
# forever. Fail loudly at release time instead.
with open(os.path.join(REPO_ROOT, "package.json"), "r", encoding="utf-8") as f:
pkg_version = json.load(f)["version"]
self.assertEqual(
data["version"], pkg_version,
f"plugin.json version {data['version']} does not match package.json {pkg_version}",
)
# Validate description
self.assertIn("description", data, "plugin.json missing 'description'")
self.assertIsInstance(data["description"], str)