From aeac1e8fdda76d4c4654df84ad0cc28bd49a0b14 Mon Sep 17 00:00:00 2001 From: protosphinx <133899485+protosphinx@users.noreply.github.com> Date: Mon, 7 Sep 2026 16:14:54 +0000 Subject: [PATCH] feat(builtins): add ReportFindings to BUILTIN_TOOLS ReportFindings is a built-in Claude Code tool for surfacing structured code-review findings to the host UI. Skills that include it in allowed-tools (e.g. code-review skills) were getting a false tool-unknown diagnostic. Adding it to BUILTIN_TOOLS suppresses that false positive. Tests added for both the set membership and the tool-unknown rule. --- src/builtins.ts | 1 + test/builtins.test.ts | 4 ++++ test/checks.test.ts | 10 ++++++++++ 3 files changed, 15 insertions(+) diff --git a/src/builtins.ts b/src/builtins.ts index 070ed52..eb09b99 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -23,6 +23,7 @@ export const BUILTIN_TOOLS: ReadonlySet = new Set([ "Read", "ReadNotifications", "RemoteTrigger", + "ReportFindings", "ScheduleWakeup", "SendMessage", "SendUserFile", diff --git a/test/builtins.test.ts b/test/builtins.test.ts index b27a445..98b31b4 100644 --- a/test/builtins.test.ts +++ b/test/builtins.test.ts @@ -32,6 +32,10 @@ describe("builtins", () => { expect(BUILTIN_TOOLS.has("Workflow")).toBe(true); }); + it("BUILTIN_TOOLS includes ReportFindings", () => { + expect(BUILTIN_TOOLS.has("ReportFindings")).toBe(true); + }); + it("isMcpTool detects mcp__ prefix", () => { expect(isMcpTool("mcp__github__create_issue")).toBe(true); expect(isMcpTool("Read")).toBe(false); diff --git a/test/checks.test.ts b/test/checks.test.ts index e4bf45c..480835e 100644 --- a/test/checks.test.ts +++ b/test/checks.test.ts @@ -1185,6 +1185,16 @@ describe("runChecks", () => { const ds = runChecks([s], config); expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined(); }); + + it("does not flag ReportFindings as an unknown tool", () => { + const s = mkSkill("/test/foo/SKILL.md", { + name: "foo", + description: "do the foo thing", + "allowed-tools": "ReportFindings Read", + }); + const ds = runChecks([s], config); + expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined(); + }); }); describe("buildValidated", () => {