Skip to content
TypeScript

fix(antigravity): discover legacy workspace skills (#9410)

Simone0aae1e2ad7ab
diff --git a/apps/server/src/provider/Drivers/AntigravitySkills.test.ts b/apps/server/src/provider/Drivers/AntigravitySkills.test.ts
index fb5aa06681e..c5e1faacf23 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 697a1abd5cd..a8b206a8927 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 29bc81569e8..74a841e075d 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