From 0aae1e2ad7ab174004f39746eb4c72b905de932d Mon Sep 17 00:00:00 2001 From: Simone Date: Fri, 4 Sep 2026 01:17:57 +0200 Subject: [PATCH] fix(antigravity): discover legacy workspace skills (#9410) Co-authored-by: Simone <185146821+Lucenx9@users.noreply.github.com> --- .../Drivers/AntigravitySkills.test.ts | 24 ++++++++++++++++++- .../src/provider/Drivers/AntigravitySkills.ts | 1 + docs/user/providers-antigravity.md | 4 ++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/server/src/provider/Drivers/AntigravitySkills.test.ts b/apps/server/src/provider/Drivers/AntigravitySkills.test.ts index fb5aa06681e1338674788b99be71e0fd5d1b07fa..c5e1faacf237308da04ca74c3317b212a004d0a8 100644 --- a/apps/server/src/provider/Drivers/AntigravitySkills.test.ts +++ b/apps/server/src/provider/Drivers/AntigravitySkills.test.ts @@ -28,7 +28,7 @@ const makeWorkspace = Effect.fn("makeWorkspace")(function* () { }); it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => { - it.effect("reads skill names, descriptions and paths from all four native roots", () => + it.effect("reads skill names, descriptions and paths from the current native roots", () => Effect.gen(function* () { const path = yield* Path.Path; const input = yield* makeWorkspace(); @@ -63,6 +63,27 @@ it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => { }), ); + it.effect("discovers skills from the legacy workspace root", () => + Effect.gen(function* () { + const path = yield* Path.Path; + const input = yield* makeWorkspace(); + const skillPath = yield* writeSkill( + path.join(input.cwd, ".agent", "skills", "review"), + "---\nname: review\ndescription: Review changes.\n---\n", + ); + + assert.deepEqual(yield* discoverAntigravitySkills(input), [ + { + name: "review", + description: "Review changes.", + path: skillPath, + scope: "project", + enabled: true, + }, + ]); + }), + ); + it.effect("uses native root order for duplicate names", () => Effect.gen(function* () { const fileSystem = yield* FileSystem.FileSystem; @@ -73,6 +94,7 @@ it.layer(NodeServices.layer)("discoverAntigravitySkills", (it) => { path.join(input.cwd, ".gemini", "skills"), path.join(input.profileDirectory, "antigravity-cli", "skills"), path.join(input.cwd, ".agents", "skills"), + path.join(input.cwd, ".agent", "skills"), ]; for (const [index, root] of roots.entries()) { yield* writeSkill( diff --git a/apps/server/src/provider/Drivers/AntigravitySkills.ts b/apps/server/src/provider/Drivers/AntigravitySkills.ts index 697a1abd5cde60a4497583c8c51ce27394c03270..a8b206a89279a9271f2f5ec1d210981d3f653ab9 100644 --- a/apps/server/src/provider/Drivers/AntigravitySkills.ts +++ b/apps/server/src/provider/Drivers/AntigravitySkills.ts @@ -134,6 +134,7 @@ export const discoverAntigravitySkills = Effect.fn("discoverAntigravitySkills")( scope: "user", }, { directory: path.resolve(input.cwd, ".agents", "skills"), scope: "project" }, + { directory: path.resolve(input.cwd, ".agent", "skills"), scope: "project" }, ]; const budget: ScanBudget = { remainingBytes: MAX_SCAN_BYTES, diff --git a/docs/user/providers-antigravity.md b/docs/user/providers-antigravity.md index 29bc81569e8d34e41c719b9a2918595afb279a9b..74a841e075d5c7e338fd3e9f85c751b0a03b812e 100644 --- a/docs/user/providers-antigravity.md +++ b/docs/user/providers-antigravity.md @@ -117,6 +117,10 @@ T3 Code asks you to select an available model instead of silently changing it. Use Antigravity's native `/plan` command to request a plan. T3 Code's separate Plan mode control is not available for this provider. +Project skills should use `.agents/skills`. T3 Code also discovers `.gemini/skills` and the legacy +`.agent/skills` location. When multiple locations define the same skill name, `.gemini/skills` +takes precedence, followed by `.agents/skills` and then `.agent/skills`. + Antigravity reads and edits workspace files through T3 Code. Each write shows up as a file change approval with the content, so **Supervised** and **Auto-accept edits** behave the same way they do for other providers. Attach images, PDFs, text files, or audio clips to a message and -- 2.54.0