From ac3e3201b53463375ebd16cda882ce9331ba9835 Mon Sep 17 00:00:00 2001 From: protosphinx <133899485+protosphinx@users.noreply.github.com> Date: Mon, 7 Sep 2026 00:11:48 +0800 Subject: [PATCH] feat(builtins): add ReadNotifications and Workflow to known built-in tools Both tools are standard Claude Code built-ins available in every session. Skills that list either in allowed-tools: were getting a false tool-unknown warning because they were absent from BUILTIN_TOOLS. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_013TipGRXQAEDwKfYHttRTjX --- src/builtins.ts | 2 ++ test/builtins.test.ts | 8 ++++++++ test/checks.test.ts | 20 ++++++++++++++++++++ 3 files changed, 30 insertions(+) diff --git a/src/builtins.ts b/src/builtins.ts index 24b86fa..070ed52 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -21,6 +21,7 @@ export const BUILTIN_TOOLS: ReadonlySet = new Set([ "NotebookEdit", "PushNotification", "Read", + "ReadNotifications", "RemoteTrigger", "ScheduleWakeup", "SendMessage", @@ -37,6 +38,7 @@ export const BUILTIN_TOOLS: ReadonlySet = new Set([ "ToolSearch", "WebFetch", "WebSearch", + "Workflow", "Write", ]); diff --git a/test/builtins.test.ts b/test/builtins.test.ts index 344f5bf..b27a445 100644 --- a/test/builtins.test.ts +++ b/test/builtins.test.ts @@ -24,6 +24,14 @@ describe("builtins", () => { expect(BUILTIN_TOOLS.has("SendMessage")).toBe(true); }); + it("BUILTIN_TOOLS includes ReadNotifications", () => { + expect(BUILTIN_TOOLS.has("ReadNotifications")).toBe(true); + }); + + it("BUILTIN_TOOLS includes Workflow", () => { + expect(BUILTIN_TOOLS.has("Workflow")).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 ede5ccc..e4bf45c 100644 --- a/test/checks.test.ts +++ b/test/checks.test.ts @@ -1165,6 +1165,26 @@ describe("runChecks", () => { const d = ds.find((d) => d.rule === "model-unknown"); expect(d?.message).toContain("us.claude-fable-6"); }); + + it("does not flag ReadNotifications as an unknown tool", () => { + const s = mkSkill("/test/foo/SKILL.md", { + name: "foo", + description: "do the foo thing", + "allowed-tools": "ReadNotifications Read", + }); + const ds = runChecks([s], config); + expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined(); + }); + + it("does not flag Workflow as an unknown tool", () => { + const s = mkSkill("/test/foo/SKILL.md", { + name: "foo", + description: "do the foo thing", + "allowed-tools": "Workflow", + }); + const ds = runChecks([s], config); + expect(ds.find((d) => d.rule === "tool-unknown")).toBeUndefined(); + }); }); describe("buildValidated", () => {