Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(skills): add controls for bundled skills

vastsa4324eb345398
diff --git a/apps/desktop/electron/main/builtin-skills.ts b/apps/desktop/electron/main/builtin-skills.ts
index 636146358..c558e1b27 100644
--- a/apps/desktop/electron/main/builtin-skills.ts
+++ b/apps/desktop/electron/main/builtin-skills.ts
@@ -83,8 +83,25 @@ export type BuiltinSkillInput = {
workspacePath?: string | null;
/** Directories of currently loaded plugins, used to detect a dev workspace. */
pluginPaths?: string[];
+ /** User-disabled ids are withheld from the agent and composer catalog. */
+ disabledIds?: readonly string[];
};
+const BUILTIN_SKILL_FILES = [
+ [IMAGE_GENERATION_SKILL_ID, IMAGE_GENERATION_SKILL_FILE],
+ [PLUGIN_DEV_SKILL_ID, PLUGIN_DEV_SKILL_FILE],
+] as const;
+
+/** All bundled skill entries, including ones whose applicability is conditional. */
+export function builtinSkillCatalog(): PluginSkillDef[] {
+ return BUILTIN_SKILL_FILES.flatMap(([id, file]) => {
+ const raw = readBuiltinSkill(file);
+ if (!raw?.raw.trim()) return [];
+ const parsed = parseSkillFrontmatter(raw.raw);
+ return parsed.body ? [{ id, name: parsed.name ?? id, description: parsed.description }] : [];
+ });
+}
+
/**
* Catalog entries for the built-in skills that apply to the given session, read
* fresh so a packaged update takes effect without a restart.
@@ -92,13 +109,22 @@ export type BuiltinSkillInput = {
export function builtinSkills(input: BuiltinSkillInput): PluginSkillDef[] {
const ids = [IMAGE_GENERATION_SKILL_ID];
if (isPluginWorkspace(input.workspacePath, input.pluginPaths)) ids.push(PLUGIN_DEV_SKILL_ID);
- return ids.flatMap((id) => {
- const file = id === IMAGE_GENERATION_SKILL_ID ? IMAGE_GENERATION_SKILL_FILE : PLUGIN_DEV_SKILL_FILE;
- const raw = readBuiltinSkill(file);
- if (!raw?.raw.trim()) return [];
- const parsed = parseSkillFrontmatter(raw.raw);
- return parsed.body ? [{ id, name: parsed.name ?? id, description: parsed.description }] : [];
- });
+ const activeIds = new Set(ids);
+ const disabled = new Set(input.disabledIds ?? []);
+ return builtinSkillCatalog().filter(
+ (skill) => activeIds.has(skill.id) && !disabled.has(skill.id),
+ );
+}
+
+/** Refuse a stale on-demand load after a bundled skill has been switched off. */
+export async function assertBuiltinSkillEnabled(
+ id: string,
+ loadDisabledIds: () => Promise<string[]>,
+): Promise<void> {
+ if (id !== IMAGE_GENERATION_SKILL_ID && id !== PLUGIN_DEV_SKILL_ID) return;
+ if ((await loadDisabledIds()).includes(id)) {
+ throw new Error(`Built-in skill "${id}" is disabled in Settings`);
+ }
}
/**
@@ -107,7 +133,9 @@ export function builtinSkills(input: BuiltinSkillInput): PluginSkillDef[] {
*/
export function loadBuiltinSkillBody(id: string): LoadedSkillDocument | null {
if (id !== PLUGIN_DEV_SKILL_ID && id !== IMAGE_GENERATION_SKILL_ID) return null;
- const raw = readBuiltinSkill(id === IMAGE_GENERATION_SKILL_ID ? IMAGE_GENERATION_SKILL_FILE : PLUGIN_DEV_SKILL_FILE);
+ const raw = readBuiltinSkill(
+ id === IMAGE_GENERATION_SKILL_ID ? IMAGE_GENERATION_SKILL_FILE : PLUGIN_DEV_SKILL_FILE,
+ );
if (!raw?.raw.trim()) return null;
const parsed = parseSkillFrontmatter(raw.raw);
if (!parsed.body) return null;
diff --git a/apps/desktop/electron/main/index.ts b/apps/desktop/electron/main/index.ts
index 420a72024..0d345e055 100644
--- a/apps/desktop/electron/main/index.ts
+++ b/apps/desktop/electron/main/index.ts
@@ -385,6 +385,7 @@ const {
activeUserSkills,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
loadUserSkillBody,
resolveEffectiveCommandShell,
resolveAgentRuntimeLaunch,
@@ -748,6 +749,7 @@ const sidecarRuntime = createSidecarRuntime({
sessionProjects,
loadUserSkillBody,
activeUserSkills,
+ disabledBuiltinSkills,
pluginActiveInProject,
currentNetworkProxy,
});
@@ -930,6 +932,7 @@ function registerIpc() {
describeError,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
pluginViews,
pluginScopes,
rememberPluginScopes,
diff --git a/apps/desktop/electron/main/ipc/composer-ipc.ts b/apps/desktop/electron/main/ipc/composer-ipc.ts
index 91eca827b..12ea72220 100644
--- a/apps/desktop/electron/main/ipc/composer-ipc.ts
+++ b/apps/desktop/electron/main/ipc/composer-ipc.ts
@@ -21,6 +21,7 @@ export type ComposerIpcDependencies = {
name: string;
description?: string;
}>>;
+ disabledBuiltinSkills?: () => Promise<string[]>;
pluginActiveInProject: (pluginId: string, projectPath: string | null | undefined) => boolean;
loadComposerTemplatesCached: (root: string | null) => Promise<Array<{
name: string;
@@ -40,6 +41,7 @@ export function createComposerCommandService({
refreshUserMcp,
agentExtensions,
activeUserSkills,
+ disabledBuiltinSkills = async () => [],
pluginActiveInProject,
loadComposerTemplatesCached,
}: Omit<ComposerIpcDependencies, "registrar" | "optionalWorkspaceRoot">): ComposerCommandService {
@@ -49,6 +51,7 @@ export function createComposerCommandService({
const builtins = builtinSkills({
workspacePath: root,
pluginPaths: plugins.listLoaded().map((loaded) => loaded.path),
+ disabledIds: await disabledBuiltinSkills(),
});
const pluginSkills = plugins
.getSkills()
diff --git a/apps/desktop/electron/main/ipc/register.ts b/apps/desktop/electron/main/ipc/register.ts
index 01e82bf2e..b406531c8 100644
--- a/apps/desktop/electron/main/ipc/register.ts
+++ b/apps/desktop/electron/main/ipc/register.ts
@@ -60,6 +60,7 @@ export type RegisterIpcDependencies = {
setNotificationViewingSessionId: (sessionId: string | null) => void;
activeUserSubagentDocuments: (...args: any[]) => Promise<any>;
disabledBuiltinSubagents: () => Promise<string[]>;
+ disabledBuiltinSkills: () => Promise<string[]>;
liveCallService?: LiveCallService;
liveVoiceWidget?: LiveVoiceWidget;
restartForStorage: () => void;
@@ -125,6 +126,7 @@ export function registerIpcHandlers(dependencies: RegisterIpcDependencies) {
activeUserSkills,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
pluginActiveInProject,
getWorkPanelReservationWidth,
setWorkPanelReservationWidth,
@@ -309,6 +311,7 @@ export function registerIpcHandlers(dependencies: RegisterIpcDependencies) {
agentExtensions,
optionalWorkspaceRoot,
activeUserSkills,
+ disabledBuiltinSkills,
pluginActiveInProject,
loadComposerTemplatesCached,
});
@@ -444,6 +447,7 @@ export function registerIpcHandlers(dependencies: RegisterIpcDependencies) {
optionalWorkspaceRoot,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
stripWinLongPrefix,
sendToRenderer,
logger,
diff --git a/apps/desktop/electron/main/ipc/skills-ipc.ts b/apps/desktop/electron/main/ipc/skills-ipc.ts
index b6a7128f9..c753b35fd 100644
--- a/apps/desktop/electron/main/ipc/skills-ipc.ts
+++ b/apps/desktop/electron/main/ipc/skills-ipc.ts
@@ -1,7 +1,8 @@
import { app, dialog, shell } from "electron";
import { importSkillFolders, readLastSkillImportDirectory, writeLastSkillImportDirectory } from "../skill-folder-import";
-import { ErrorCodes, IPC, type ActivationScope, type AgentCapabilityMove, type AgentCapabilityQuery, type UserSkillRecord, type UserSubagentRecord } from "@pi-desktop/shared";
+import { ErrorCodes, IPC, type ActivationScope, type AgentCapabilityMove, type AgentCapabilityQuery, type BuiltinSkillRecord, type UserSkillRecord, type UserSubagentRecord } from "@pi-desktop/shared";
import { loadSubagentDefinitions, type UserSubagentDocument } from "@pi-desktop/agent-runtime";
+import { builtinSkillCatalog } from "../builtin-skills";
import type { HostProcess } from "../host-process";
import type { Logger } from "../logger";
import type {
@@ -22,6 +23,8 @@ export type SkillsIpcDependencies = {
activeUserSubagentDocuments: (projectPath: string | undefined) => Promise<UserSubagentDocument[]>;
/** Handles whose shipped definition the user turned off (builtin activation). */
disabledBuiltinSubagents: () => Promise<string[]>;
+ /** User-disabled bundled skill IDs, read from host-owned activation state. */
+ disabledBuiltinSkills: () => Promise<string[]>;
stripWinLongPrefix: (path: string) => string;
sendToRenderer: (channel: string, payload?: unknown) => void;
searchSkillMarket: (query: string, sources: { id: string; name: string; url: string }[]) => Promise<SkillMarketSearchResult>;
@@ -36,6 +39,7 @@ export function registerSkillsIpc({
optionalWorkspaceRoot,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
stripWinLongPrefix,
sendToRenderer,
searchSkillMarket,
@@ -150,6 +154,38 @@ export function registerSkillsIpc({
return host.call("skills.list", query);
});
+ handle(IPC.invoke.skillBuiltinList, async () => {
+ if (!host) throw new Error("host unavailable");
+ const disabled = await disabledBuiltinSkills();
+ const off = new Set(disabled);
+ const builtins: BuiltinSkillRecord[] = builtinSkillCatalog().map((skill) => ({
+ id: skill.id,
+ name: skill.name,
+ ...(skill.description ? { description: skill.description } : {}),
+ enabled: !off.has(skill.id),
+ }));
+ return { builtins };
+ });
+
+ handle(
+ IPC.invoke.skillBuiltinSetEnabled,
+ async (payload: { id?: unknown; enabled?: unknown } = {}) => {
+ if (!host) throw new Error("host unavailable");
+ if (typeof payload.id !== "string" || typeof payload.enabled !== "boolean") {
+ throw new Error("invalid builtin skill activation request");
+ }
+ if (!builtinSkillCatalog().some((skill) => skill.id === payload.id)) {
+ throw new Error("unknown builtin skill");
+ }
+ const result = await host.call("skills.setBuiltinEnabled", {
+ id: payload.id,
+ enabled: payload.enabled,
+ });
+ sendToRenderer(IPC.event.pluginChanged, { reason: "skill" });
+ return result;
+ },
+ );
+
handle(IPC.invoke.skillCreate, async (skill: Record<string, unknown>) => {
if (!host) throw new Error("host unavailable");
const res = await host.call("skills.create", { skill });
diff --git a/apps/desktop/electron/main/runtime/session-launch.ts b/apps/desktop/electron/main/runtime/session-launch.ts
index 0cea28ef9..968bfbdbe 100644
--- a/apps/desktop/electron/main/runtime/session-launch.ts
+++ b/apps/desktop/electron/main/runtime/session-launch.ts
@@ -209,6 +209,26 @@ export function createSessionLaunchRuntime({
}
}
+ /** Built-in skill activation is host-owned and defaults on. */
+ async function disabledBuiltinSkills(): Promise<string[]> {
+ if (!runtimeState.host?.isAvailable()) {
+ throw new Error("host unavailable while reading built-in skill activation");
+ }
+ try {
+ const result = await runtimeState.host!.call<{ disabled: string[] }>(
+ "skills.disabledBuiltins",
+ );
+ return result.disabled ?? [];
+ } catch (error) {
+ if (!isHostUnavailable(error)) {
+ logger.app("plugin", "warn", "builtin skill state failed", {
+ data: String(error),
+ });
+ }
+ throw error;
+ }
+ }
+
/**
* Load one of the user's own skill documents by id, or `null` if there is no
* such skill — so the caller can fall through to the plugin catalog.
@@ -449,6 +469,7 @@ export function createSessionLaunchRuntime({
...builtinSkills({
workspacePath: projectPath,
pluginPaths: plugins.listLoaded().map((loaded) => loaded.path),
+ disabledIds: await disabledBuiltinSkills(),
}),
...plugins
.getSkills()
@@ -716,6 +737,7 @@ export function createSessionLaunchRuntime({
activeUserSkills,
activeUserSubagentDocuments,
disabledBuiltinSubagents,
+ disabledBuiltinSkills,
loadUserSkillBody,
resolveEffectiveCommandShell,
resolveAgentRuntimeLaunch,
diff --git a/apps/desktop/electron/main/runtime/sidecar.ts b/apps/desktop/electron/main/runtime/sidecar.ts
index 1d1388300..c0b96949b 100644
--- a/apps/desktop/electron/main/runtime/sidecar.ts
+++ b/apps/desktop/electron/main/runtime/sidecar.ts
@@ -7,7 +7,10 @@ import {
classifySidecarCrash,
sidecarCrashErrorCode,
} from "@pi-desktop/agent-runtime";
-import { loadBuiltinSkillBody } from "../builtin-skills";
+import {
+ assertBuiltinSkillEnabled,
+ loadBuiltinSkillBody,
+} from "../builtin-skills";
import { createImageGenerationTool } from "../services/image-generation-service";
import { registerPluginDevTools } from "../plugin-dev-tools";
import { resolveLocalFile } from "../browser-view";
@@ -60,6 +63,7 @@ export type SidecarRuntimeDependencies = {
projectPath: string | null,
) => Promise<LoadedSkillDocument | null>;
activeUserSkills: (projectPath: string | undefined) => Promise<any[]>;
+ disabledBuiltinSkills: () => Promise<string[]>;
pluginActiveInProject: (pluginId: string, projectPath: string | null | undefined) => boolean;
currentNetworkProxy: () => any;
};
@@ -90,6 +94,7 @@ export function createSidecarRuntime({
sessionProjects,
loadUserSkillBody,
activeUserSkills,
+ disabledBuiltinSkills,
pluginActiveInProject,
currentNetworkProxy,
}: SidecarRuntimeDependencies): {
@@ -608,6 +613,7 @@ export function createSidecarRuntime({
}
const projectPath = sessionProjects.get(sessionId) ?? null;
try {
+ await assertBuiltinSkillEnabled(id, disabledBuiltinSkills);
// Bundled skills answer first; they are not owned by any plugin. A user
// skill is looked up next, and only then a plugin's — the ids cannot
// collide, since a plugin skill id always carries a `<pluginId>/` prefix.
diff --git a/apps/desktop/src/components/settings/AgentSkillsPage.tsx b/apps/desktop/src/components/settings/AgentSkillsPage.tsx
index cea2bc2e3..2f5d3de2c 100644
--- a/apps/desktop/src/components/settings/AgentSkillsPage.tsx
+++ b/apps/desktop/src/components/settings/AgentSkillsPage.tsx
@@ -3,6 +3,7 @@ import { useTranslation } from "react-i18next";
import {
GLOBAL_SCOPE,
type AgentCapabilityLevel,
+ type BuiltinSkillRecord,
type UserSkillRecord,
} from "@pi-desktop/shared";
import { api } from "../../lib/api";
@@ -60,18 +61,20 @@ type SkillEditorState = {
};
type SkillCollection = {
+ builtins: BuiltinSkillRecord[];
global: UserSkillRecord[];
project: UserSkillRecord[];
};
-const EMPTY_SKILL_COLLECTION: SkillCollection = { global: [], project: [] };
+const EMPTY_SKILL_COLLECTION: SkillCollection = { builtins: [], global: [], project: [] };
export function AgentSkillsPage() {
const { t } = useTranslation();
const showToast = useAppStore((state) => state.showToast);
const { selectedProjectPath, setSelectedProjectPath, options } = useAgentProjects();
const fetchSkills = useCallback(async (): Promise<SkillCollection> => {
- const [global, project] = await Promise.all([
+ const [builtins, global, project] = await Promise.all([
+ api.listBuiltinSkills(),
api.listUserSkills({
level: "global",
...(selectedProjectPath ? { projectPath: selectedProjectPath } : {}),
@@ -80,10 +83,14 @@ export function AgentSkillsPage() {
? api.listUserSkills({ level: "project", projectPath: selectedProjectPath })
: Promise.resolve({ skills: [] as UserSkillRecord[] }),
]);
- return { global: global.skills ?? [], project: project.skills ?? [] };
+ return {
+ builtins: builtins.builtins ?? [],
+ global: global.skills ?? [],
+ project: project.skills ?? [],
+ };
}, [selectedProjectPath]);
const {
- data: { global: globalSkills, project: projectSkills },
+ data: { builtins: builtinSkills, global: globalSkills, project: projectSkills },
setData: setSkills,
loading,
refreshing,
@@ -102,6 +109,14 @@ export function AgentSkillsPage() {
const { armed, setArmed } = useArmedDelete();
const rowKey = (level: AgentCapabilityLevel, id: string) => `${level}:${id}`;
+ const builtinRowKey = (id: string) => `builtin:${id}`;
+
+ const patchBuiltin = (id: string, patch: Partial<BuiltinSkillRecord>) => {
+ setSkills((current) => ({
+ ...current,
+ builtins: current.builtins.map((row) => (row.id === id ? { ...row, ...patch } : row)),
+ }));
+ };
const patchRow = (
level: AgentCapabilityLevel,
@@ -145,6 +160,28 @@ export function AgentSkillsPage() {
}
};
+ const toggleBuiltin = async (skill: BuiltinSkillRecord) => {
+ const key = builtinRowKey(skill.id);
+ if (busyId === key) return;
+ const next = !skill.enabled;
+ setBusyId(key);
+ patchBuiltin(skill.id, { enabled: next });
+ try {
+ await api.setBuiltinSkillEnabled(skill.id, next);
+ showToast(
+ t(next ? "settings.capabilityEnabled" : "settings.capabilityDisabled", {
+ name: skill.name || skill.id,
+ }),
+ { variant: "success" },
+ );
+ } catch (error) {
+ patchBuiltin(skill.id, { enabled: skill.enabled });
+ showToast(error instanceof Error ? error.message : String(error), { variant: "error" });
+ } finally {
+ setBusyId(null);
+ }
+ };
+
/** Where a new or imported skill lands: the filtered level, global when both. */
const targetLevel: AgentCapabilityLevel = filter === "project" ? "project" : "global";
@@ -286,15 +323,18 @@ export function AgentSkillsPage() {
const visible = useMemo(() => {
const match = (skill: UserSkillRecord) =>
matchesCapabilitySearch(search, skill.name, skill.id, skill.description);
+ const matchBuiltin = (skill: BuiltinSkillRecord) =>
+ matchesCapabilitySearch(search, skill.name, skill.id, skill.description);
return {
+ builtins: builtinSkills.filter(matchBuiltin),
global: globalSkills.filter(match),
project: projectSkills.filter(match),
};
- }, [globalSkills, projectSkills, search]);
+ }, [builtinSkills, globalSkills, projectSkills, search]);
const counts = {
- all: visible.global.length + visible.project.length,
- global: visible.global.length,
+ all: visible.builtins.length + visible.global.length + visible.project.length,
+ global: visible.builtins.length + visible.global.length,
project: visible.project.length,
};
@@ -464,6 +504,34 @@ export function AgentSkillsPage() {
);
};
+ const renderBuiltinRow = (skill: BuiltinSkillRecord) => {
+ const key = builtinRowKey(skill.id);
+ const name = skill.name || skill.id;
+ const busy = busyId === key;
+ return (
+ <CapabilityRow
+ key={key}
+ glyph={<IconBookOpen size={16} />}
+ name={name}
+ off={!skill.enabled}
+ badges={
+ <span className="agent-capability-badge is-level">
+ {t("settings.builtin")}
+ </span>
+ }
+ description={skill.description || t("settings.noCapabilityDescription")}
+ actions={
+ <CapabilityToggle
+ checked={skill.enabled}
+ busy={busy}
+ label={t("settings.toggleCapability", { name })}
+ onChange={() => void toggleBuiltin(skill)}
+ />
+ }
+ />
+ );
+ };
+
const showGlobal = filter !== "project";
const showProject = filter !== "global";
const newSkillTitle =
@@ -595,6 +663,11 @@ export function AgentSkillsPage() {
<>
{showGlobal ? (
<>
+ <CapabilityGroupHeader
+ label={t("settings.builtinSkills")}
+ count={visible.builtins.length}
+ />
+ {visible.builtins.map(renderBuiltinRow)}
<CapabilityGroupHeader
label={t("settings.globalLevel")}
path={GLOBAL_SKILLS_PATH}
diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.ts
index bd1112fa5..ff8c791d3 100644
--- a/apps/desktop/src/lib/api.ts
+++ b/apps/desktop/src/lib/api.ts
@@ -91,6 +91,7 @@ import type {
SessionCollaborationSummary,
TraySessionPreferences,
ToolPermissionResolution,
+ BuiltinSkillRecord,
UserSkillInput,
UserSkillRecord,
UserSubagentInput,
@@ -1171,6 +1172,10 @@ export const api = {
),
// --- Skills the user owns -------------------------------------------------
+ listBuiltinSkills: () =>
+ invoke<{ builtins: BuiltinSkillRecord[] }>(IPC.invoke.skillBuiltinList),
+ setBuiltinSkillEnabled: (id: string, enabled: boolean) =>
+ invoke<{ id: string; enabled: boolean }>(IPC.invoke.skillBuiltinSetEnabled, { id, enabled }),
listUserSkills: (query?: AgentCapabilityQuery) =>
invoke<{ skills: UserSkillRecord[] }>(IPC.invoke.skillList, query),
createUserSkill: (skill: UserSkillInput) =>
diff --git a/apps/desktop/test/agent-capability-settings.test.mjs b/apps/desktop/test/agent-capability-settings.test.mjs
index 158265751..a194886e3 100644
--- a/apps/desktop/test/agent-capability-settings.test.mjs
+++ b/apps/desktop/test/agent-capability-settings.test.mjs
@@ -39,6 +39,14 @@ test("agent settings have three independent destinations and extensions have two
assert.doesNotMatch(pluginsPage, /plugins-(?:tab|panel)-(?:mcp|skills|subagents)/);
});
+test("bundled skill activation validates the catalog and writes host-owned state", () => {
+ assert.match(skillImport, /handle\(IPC\.invoke\.skillBuiltinList,[\s\S]*?disabledBuiltinSkills\(\)/);
+ assert.match(skillImport, /handle\([\s\S]*?IPC\.invoke\.skillBuiltinSetEnabled,[\s\S]*?typeof payload\.enabled !== "boolean"/);
+ assert.match(skillImport, /builtinSkillCatalog\(\)\.some\(\(skill\) => skill\.id === payload\.id\)/);
+ assert.match(skillImport, /host\.call\("skills\.setBuiltinEnabled"/);
+ assert.match(skillImport, /sendToRenderer\(IPC\.event\.pluginChanged, \{ reason: "skill" \}\)/);
+});
+
test("skills and MCP filter one list by level instead of stacking two sections", () => {
for (const source of [skills, mcp]) {
assert.match(source, /useAgentProjects\(\)/);
diff --git a/apps/desktop/test/composer-mcp.test.mjs b/apps/desktop/test/composer-mcp.test.mjs
index 235a9c223..421107878 100644
--- a/apps/desktop/test/composer-mcp.test.mjs
+++ b/apps/desktop/test/composer-mcp.test.mjs
@@ -115,6 +115,7 @@ test("Skill commands use an explicit namespace and resolve original ids at send
},
agentExtensions: { allCommands: () => [] },
activeUserSkills: async () => [{ id: "review", name: "User review" }],
+ disabledBuiltinSkills: async () => ["pi-desktop/imagegen"],
pluginActiveInProject: () => true,
loadComposerTemplatesCached: async () => [{ name: "review" }],
});
@@ -124,7 +125,7 @@ test("Skill commands use an explicit namespace and resolve original ids at send
const pluginSkill = skills.find((command) => command.skillId === "plugin/review");
const userSkill = skills.find((command) => command.skillId === "review");
- assert.equal(builtinSkill?.name, "skill:pi-desktop/imagegen");
+ assert.equal(builtinSkill, undefined);
assert.equal(pluginSkill?.name, "skill:plugin/review");
assert.equal(userSkill?.name, "skill:review");
assert.equal(commands.find((command) => command.name === "review")?.kind, "template");
diff --git a/apps/desktop/test/image-generation.test.mjs b/apps/desktop/test/image-generation.test.mjs
index 0c0d34efd..fd5223297 100644
--- a/apps/desktop/test/image-generation.test.mjs
+++ b/apps/desktop/test/image-generation.test.mjs
@@ -105,12 +105,35 @@ test("edit inputs reject outside paths, traversal and non-image files", async (t
});
test("the default imagegen skill is discoverable and loads in an ordinary session", async () => {
- const { builtinSkills, loadBuiltinSkillBody } = await import(
- "../electron/main/builtin-skills.ts"
- );
+ const {
+ assertBuiltinSkillEnabled,
+ builtinSkillCatalog,
+ builtinSkills,
+ loadBuiltinSkillBody,
+ } = await import("../electron/main/builtin-skills.ts");
+ const catalogIds = builtinSkillCatalog().map((skill) => skill.id);
+ assert.ok(catalogIds.includes("pi-desktop/imagegen"));
+ assert.ok(catalogIds.includes("pi-desktop/plugin-development"));
const skills = builtinSkills({});
assert.equal(skills.find((skill) => skill.id === "pi-desktop/imagegen")?.name, "imagegen");
assert.ok(!skills.some((skill) => skill.id === "pi-desktop/plugin-development"));
+ const pluginSkills = builtinSkills({
+ workspacePath: "/repo",
+ pluginPaths: ["/repo/example-plugin"],
+ disabledIds: ["pi-desktop/imagegen"],
+ });
+ assert.ok(!pluginSkills.some((skill) => skill.id === "pi-desktop/imagegen"));
+ assert.ok(pluginSkills.some((skill) => skill.id === "pi-desktop/plugin-development"));
+ await assert.rejects(
+ assertBuiltinSkillEnabled("pi-desktop/imagegen", async () => ["pi-desktop/imagegen"]),
+ /disabled in Settings/,
+ );
+ let queriedActivation = false;
+ await assertBuiltinSkillEnabled("plugin/review", async () => {
+ queriedActivation = true;
+ return ["pi-desktop/imagegen"];
+ });
+ assert.equal(queriedActivation, false);
const body = loadBuiltinSkillBody("pi-desktop/imagegen").body;
assert.match(body, /GenerateImages/);
assert.match(body, /previous result path/);
diff --git a/apps/desktop/test/plugin-skills.test.mjs b/apps/desktop/test/plugin-skills.test.mjs
index 75939634d..c97709212 100644
--- a/apps/desktop/test/plugin-skills.test.mjs
+++ b/apps/desktop/test/plugin-skills.test.mjs
@@ -124,6 +124,7 @@ test("the built-in skill body loads through the same Skill tool", () => {
);
assert.match(mainSrc, /const userIds = \(await activeUserSkills/);
assert.match(desktopSidecarSrc, /formatSkillToolContent\(skill\)/);
+ assert.match(desktopSidecarSrc, /await assertBuiltinSkillEnabled\(id, disabledBuiltinSkills\)/);
assert.match(builtinSrc, /location: raw\.path/);
assert.match(runtimeSrc, /location: skill\.path/);
});
diff --git a/apps/desktop/test/settings-inline-import-user-path.test.mjs b/apps/desktop/test/settings-inline-import-user-path.test.mjs
index f6a69d606..79fa16d55 100644
--- a/apps/desktop/test/settings-inline-import-user-path.test.mjs
+++ b/apps/desktop/test/settings-inline-import-user-path.test.mjs
@@ -60,6 +60,13 @@ const project = {
};
const calls = [];
let imported = false;
+const builtinSkill = {
+ id: "pi-desktop/imagegen",
+ name: "imagegen",
+ description: "Generate and edit images.",
+ enabled: true,
+};
+let builtinSkillSetCall;
// Toast audio is optional feedback; this hidden fixture checks the visible
// toast only and does not emit a sound during the automated UI run.
@@ -81,6 +88,14 @@ window.piDesktop = {
case IPC.invoke.skillList:
data = { skills: [] };
break;
+ case IPC.invoke.skillBuiltinList:
+ data = { builtins: [builtinSkill] };
+ break;
+ case IPC.invoke.skillBuiltinSetEnabled:
+ builtinSkillSetCall = { channel, input };
+ builtinSkill.enabled = input.enabled;
+ data = { id: input.id, enabled: input.enabled };
+ break;
case IPC.invoke.mcpList:
data = {
servers: imported && input?.level === "project" ? [importedServer] : [],
@@ -150,6 +165,36 @@ async function waitFor(predicate, message) {
}
window.settingsInlineMcpImportProbe = async () => {
+ await waitFor(
+ () => [...document.querySelectorAll(".agent-capability-row .agent-capability-name")]
+ .find((node) => node.textContent.trim() === "imagegen"),
+ "Bundled imagegen skill did not appear in Settings",
+ );
+ const builtinRow = requireNode(
+ [...document.querySelectorAll(".agent-capability-row")]
+ .find((row) => row.querySelector(".agent-capability-name")?.textContent.trim() === "imagegen"),
+ "Bundled skill row is missing",
+ );
+ const builtinToggle = requireNode(
+ builtinRow.querySelector('[role="switch"]'),
+ "Bundled skill toggle is missing",
+ );
+ if (builtinToggle.getAttribute("aria-checked") !== "true") {
+ throw new Error("Bundled skill must be enabled by default");
+ }
+ flushSync(() => builtinToggle.click());
+ await waitFor(
+ () => builtinSkillSetCall && builtinToggle.getAttribute("aria-checked") === "false",
+ "Turning off the bundled skill did not update the setting",
+ );
+ if (!builtinRow.classList.contains("is-off")) {
+ throw new Error("Disabled bundled skill row did not show its off state");
+ }
+ const builtinToggleState = {
+ persisted: builtinSkillSetCall,
+ visibleOff: builtinRow.classList.contains("is-off"),
+ };
+
await waitFor(() => buttonByLabel("MCP"), "MCP destination did not render");
flushSync(() => requireNode(buttonByLabel("MCP"), "MCP navigation is missing").click());
await waitFor(
@@ -234,6 +279,7 @@ window.settingsInlineMcpImportProbe = async () => {
const visibleRow = [...document.querySelectorAll(".agent-capability-row")]
.find((row) => row.querySelector(".agent-capability-name")?.textContent.trim() === candidate.label);
return {
+ builtinToggleState,
scanCountBeforeExplicitClick,
scanCalls,
runCall,
@@ -260,7 +306,7 @@ const urlAssets = {
},
};
-test("Settings MCP page imports a selected external server into the chosen project", {
+test("Settings disables a bundled skill and imports an external MCP server into a project", {
timeout: 60_000,
skip:
process.platform === "linux" && !process.env.DISPLAY
@@ -284,6 +330,7 @@ test("Settings MCP page imports a selected external server into the chosen proje
define: { "process.env.NODE_ENV": '"production"', "import.meta.env.DEV": "true" },
alias: {
"@pi-desktop/i18n": join(root, "packages/i18n/src"),
+ "@pi-desktop/shared": join(root, "packages/shared/src"),
react: join(root, "apps/desktop/node_modules/react"),
"react-dom": join(root, "apps/desktop/node_modules/react-dom"),
i18next: join(root, "apps/desktop/node_modules/i18next"),
@@ -353,6 +400,13 @@ app.whenReady().then(async () => {
assert(resultLine, output);
const result = JSON.parse(resultLine.slice("SETTINGS_INLINE_MCP_IMPORT ".length));
+ assert.deepEqual(result.builtinToggleState, {
+ persisted: {
+ channel: "pi-desktop/skill/builtin/setEnabled",
+ input: { id: "pi-desktop/imagegen", enabled: false },
+ },
+ visibleOff: true,
+ });
assert.equal(result.scanCountBeforeExplicitClick, 0, "Expanding the inline panel must not scan");
assert.equal(result.scanCalls.length, 2, "The explicit scan and post-import refresh should run");
assert.deepEqual(result.scanCalls[0].input, {
diff --git a/crates/host-core/src/rpc/mod.rs b/crates/host-core/src/rpc/mod.rs
index 91d558c52..7b514155e 100644
--- a/crates/host-core/src/rpc/mod.rs
+++ b/crates/host-core/src/rpc/mod.rs
@@ -4710,6 +4710,23 @@ async fn handle_request(
let skills = st.user_skills.active_for(project_path).map_err(skill_err)?;
Ok(json!({ "skills": skills }))
}
+ "skills.disabledBuiltins" => {
+ let st = state.lock().await;
+ Ok(json!({ "disabled": st.user_skills.disabled_builtins() }))
+ }
+ "skills.setBuiltinEnabled" => {
+ let id = require_id(&params)?;
+ let enabled = params
+ .get("enabled")
+ .and_then(Value::as_bool)
+ .unwrap_or(false);
+ let mut st = state.lock().await;
+ let id = st
+ .user_skills
+ .set_builtin_enabled(&id, enabled)
+ .map_err(skill_err)?;
+ Ok(json!({ "id": id, "enabled": enabled }))
+ }
"skills.create" => {
let input = parse_skill_input(&params)?;
let mut st = state.lock().await;
@@ -5081,6 +5098,70 @@ mod tests {
use crate::state::AppState;
use std::time::Duration;
+ #[tokio::test]
+ async fn builtin_skill_activation_rpc_round_trips() {
+ let data_dir = tempfile::tempdir().unwrap();
+ let mut app_state = AppState::open(data_dir.path()).unwrap();
+ app_state.handshook = true;
+ let state = Arc::new(Mutex::new(app_state));
+ let tx = mpsc::unbounded_channel().0;
+
+ let initial = handle_request(
+ state.clone(),
+ "skills.disabledBuiltins",
+ json!({}),
+ tx.clone(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(initial, json!({ "disabled": [] }));
+
+ let disabled = handle_request(
+ state.clone(),
+ "skills.setBuiltinEnabled",
+ json!({ "id": "pi-desktop/imagegen", "enabled": false }),
+ tx.clone(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ disabled,
+ json!({ "id": "pi-desktop/imagegen", "enabled": false })
+ );
+
+ let current = handle_request(
+ state.clone(),
+ "skills.disabledBuiltins",
+ json!({}),
+ tx.clone(),
+ )
+ .await
+ .unwrap();
+ assert_eq!(current, json!({ "disabled": ["pi-desktop/imagegen"] }));
+
+ let enabled = handle_request(
+ state.clone(),
+ "skills.setBuiltinEnabled",
+ json!({ "id": "pi-desktop/imagegen", "enabled": true }),
+ tx,
+ )
+ .await
+ .unwrap();
+ assert_eq!(
+ enabled,
+ json!({ "id": "pi-desktop/imagegen", "enabled": true })
+ );
+ let current = handle_request(
+ state,
+ "skills.disabledBuiltins",
+ json!({}),
+ mpsc::unbounded_channel().0,
+ )
+ .await
+ .unwrap();
+ assert_eq!(current, json!({ "disabled": [] }));
+ }
+
// Issue #1071: the per-request wall-clock budget must cut loose requests
// stuck on the global state lock (the dominant queueing case) so their
// in-flight slots come back, without ever shortening a legitimate
diff --git a/crates/host-core/src/user_skills.rs b/crates/host-core/src/user_skills.rs
index f1b425c01..b991b3e75 100644
--- a/crates/host-core/src/user_skills.rs
+++ b/crates/host-core/src/user_skills.rs
@@ -26,6 +26,10 @@ pub const MAX_SKILL_PACKAGE_BYTES: usize = 16 * 1024 * 1024;
const MAX_NAME_CHARS: usize = 120;
const MAX_DESCRIPTION_CHARS: usize = 400;
const SKILL_KIND: &str = "skills";
+/// Built-in skills have no scanned document, so their activation lives in a
+/// separate state file from user skills. The user-skill scan prunes missing
+/// documents and must not erase a built-in preference.
+const BUILTIN_SKILL_KIND: &str = "skill-builtins";
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "camelCase")]
@@ -109,6 +113,7 @@ impl ImportShape {
pub struct UserSkillRegistry {
state: CapabilityState,
+ builtins: CapabilityState,
}
/// Place a single skill file at `target`, either as a copy or a symlink.
@@ -198,6 +203,25 @@ fn valid_id(id: &str) -> bool {
valid_capability_id(id, 64)
}
+fn normalize_builtin_skill_id(id: &str) -> Result<String> {
+ let id = id.trim();
+ let valid_segment = |segment: &str| {
+ !segment.is_empty()
+ && segment.len() <= 64
+ && segment.starts_with(|c: char| c.is_ascii_lowercase() || c.is_ascii_digit())
+ && segment
+ .chars()
+ .all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-')
+ };
+ let Some((namespace, name)) = id.split_once('/') else {
+ bail!("SKILL_INVALID: invalid builtin skill id");
+ };
+ if id.len() > 129 || !valid_segment(namespace) || !valid_segment(name) {
+ bail!("SKILL_INVALID: invalid builtin skill id");
+ }
+ Ok(id.to_string())
+}
+
fn render_document(name: &str, description: Option<&str>, body: &str) -> String {
let mut out = String::from("---\n");
out.push_str(&format!("name: {}\n", name.replace('\n', " ")));
@@ -738,9 +762,30 @@ impl UserSkillRegistry {
pub fn new(data_dir: &Path) -> Self {
Self {
state: CapabilityState::new(data_dir, SKILL_KIND),
+ builtins: CapabilityState::new(data_dir, BUILTIN_SKILL_KIND),
}
}
+ /// Built-in skill ids switched off by the user. They are global and default
+ /// to enabled; ids remain stored if a later release temporarily omits one.
+ pub fn disabled_builtins(&self) -> Vec<String> {
+ self.builtins
+ .disabled_ids(BUILTIN_SKILL_KIND, CapabilityLevel::Global)
+ }
+
+ /// Set one built-in skill's global activation state.
+ pub fn set_builtin_enabled(&mut self, id: &str, enabled: bool) -> Result<String> {
+ let id = normalize_builtin_skill_id(id)?;
+ self.builtins.set_enabled(
+ BUILTIN_SKILL_KIND,
+ CapabilityLevel::Global,
+ &id,
+ None,
+ enabled,
+ )?;
+ Ok(id)
+ }
+
fn scan_level(
&mut self,
level: CapabilityLevel,
diff --git a/crates/host-core/src/user_skills/tests.rs b/crates/host-core/src/user_skills/tests.rs
index 07fe7e082..0cacc7908 100644
--- a/crates/host-core/src/user_skills/tests.rs
+++ b/crates/host-core/src/user_skills/tests.rs
@@ -117,6 +117,62 @@ fn capability_state_is_not_written_into_skill_documents() {
.contains(".agents"));
}
+#[test]
+fn builtin_activation_defaults_on_persists_and_is_separate_from_scanned_skills() {
+ let app = tempdir().unwrap();
+ let agents = tempdir().unwrap();
+ let mut registry = UserSkillRegistry::new(app.path());
+ assert!(registry.disabled_builtins().is_empty());
+
+ registry
+ .set_builtin_enabled("pi-desktop/imagegen", false)
+ .unwrap();
+ assert_eq!(
+ registry.disabled_builtins(),
+ vec!["pi-desktop/imagegen".to_string()]
+ );
+
+ test_support::with_global_agents(agents.path(), || {
+ registry.list(CapabilityLevel::Global, None).unwrap();
+ });
+ let mut reopened = UserSkillRegistry::new(app.path());
+ test_support::with_global_agents(agents.path(), || {
+ reopened.list(CapabilityLevel::Global, None).unwrap();
+ });
+ assert_eq!(
+ reopened.disabled_builtins(),
+ vec!["pi-desktop/imagegen".to_string()]
+ );
+ assert!(app
+ .path()
+ .join("agent-capabilities/skill-builtins.json")
+ .is_file());
+
+ reopened
+ .set_builtin_enabled("pi-desktop/imagegen", true)
+ .unwrap();
+ assert!(reopened.disabled_builtins().is_empty());
+}
+
+#[test]
+fn builtin_activation_rejects_invalid_ids() {
+ let app = tempdir().unwrap();
+ let mut registry = UserSkillRegistry::new(app.path());
+ for id in [
+ "",
+ "imagegen",
+ "PI-Desktop/imagegen",
+ "pi-desktop/",
+ "pi-desktop/imagegen/extra",
+ ] {
+ assert!(
+ registry.set_builtin_enabled(id, false).is_err(),
+ "accepted {id:?}"
+ );
+ }
+ assert!(registry.disabled_builtins().is_empty());
+}
+
#[test]
fn import_uses_parent_directory_when_name_is_not_ascii() {
let app = tempdir().unwrap();
diff --git a/docs/spec/03-runtime/01-ipc-protocol.md b/docs/spec/03-runtime/01-ipc-protocol.md
index cf2b46286..29f38a4e4 100644
--- a/docs/spec/03-runtime/01-ipc-protocol.md
+++ b/docs/spec/03-runtime/01-ipc-protocol.md
@@ -1598,6 +1598,15 @@ one-liner.
- `skills.read({ id, level?, projectPath? })` → `{ skill, body }`
- `skills.remove({ id, level?, projectPath? })`
- `skills.setEnabled({ id, enabled, level, projectPath? })`
+- `skills.disabledBuiltins()` → `{ disabled: string[] }`
+- `skills.setBuiltinEnabled({ id, enabled })` → `{ id, enabled }`
+
+Built-in skill activation is global and defaults to enabled. Host stores only
+disabled IDs in `<data>/agent-capabilities/skill-builtins.json`, separately
+from the scanned user-skill state. Renderer IPC lists bundled entries with
+their effective enabled state and sets one entry's global state. The
+corresponding Desktop channels are `pi-desktop/skill/builtin/list` and
+`pi-desktop/skill/builtin/setEnabled`.
The list contains frontmatter-derived `name` and `description`, not the body.
Only the description enters the prompt, and the body is fetched when the model
diff --git a/docs/spec/03-runtime/02-agent-runtime.md b/docs/spec/03-runtime/02-agent-runtime.md
index 13e6595d0..fdecbb81f 100644
--- a/docs/spec/03-runtime/02-agent-runtime.md
+++ b/docs/spec/03-runtime/02-agent-runtime.md
@@ -1356,6 +1356,12 @@ boundary; checkpoints retain the effective per-entry state. Bodies remain
on-demand and permission-checked. Different plugin tool schemas/permissions
invalidate idle reuse even when their names are unchanged.
+The host-owned activation state for bundled skills is read when a session
+catalog is built. A disabled built-in is omitted from the prompt and slash
+catalog, and a stale direct load through `Skill` is refused. This switch governs
+the skill document only; associated agent tools keep their independent
+registration and activation behavior.
+
Before model dispatch, Desktop acknowledges new system records through Host's
existing transcript writer. Restart replays these provider-neutral records in
order. An old history without records receives the current declaration at its
diff --git a/docs/spec/04-ux/04-builtin-commands.md b/docs/spec/04-ux/04-builtin-commands.md
index e672a869f..3b00e5779 100644
--- a/docs/spec/04-ux/04-builtin-commands.md
+++ b/docs/spec/04-ux/04-builtin-commands.md
@@ -122,6 +122,10 @@ Only Skills active for the current project are listed or accepted, so project
scope and plugin activation remain enforced at send time. If the Skill is no
longer active, its token remains literal prompt text. Unprefixed names are not
Skill aliases; existing app commands and prompt templates keep their names.
+Bundled Skills are active by default and can be disabled globally in Settings
+> Agent > Skills. A disabled built-in is omitted from the session and slash
+catalogs; a stale direct load is rejected. This switch does not change agent
+tool availability.
## 9. Ideographic comma opens the slash menu (D405)
diff --git a/docs/spec/06-delivery/04-e2e-test-plan.md b/docs/spec/06-delivery/04-e2e-test-plan.md
index 27936fb3b..94ae5d34a 100644
--- a/docs/spec/06-delivery/04-e2e-test-plan.md
+++ b/docs/spec/06-delivery/04-e2e-test-plan.md
@@ -9708,6 +9708,7 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.
| C — Conversation & stream (IME slash alias) | E2E-255 |
| E — Tools & permissions (Skill residency) | E2E-254 |
| Quality (Skill residency and IME slash alias) | E2E-254, E2E-255 |
+| C / E / F / Quality — Built-in skill activation | E2E-SKILL-builtin-activation |
| C — Conversation & stream (plugin session import visibility) | E2E-257 |
| F — Persistence (plugin session import visibility) | E2E-257 |
| G — Plugins (session import visibility) | E2E-257 |
@@ -15273,6 +15274,41 @@ plugin-form fixtures in an isolated temporary directory at runtime.
rendered desktop journey Draft
(run only in a capable environment when this surface changes)
+#### E2E-SKILL-builtin-activation: Manage bundled skills from Settings
+
+- **Preconditions**: An isolated Desktop profile and an ordinary project
+ workspace. Keep a separate active user or plugin Skill so the `Skill` tool
+ remains available after imagegen is disabled.
+- **Steps**:
+ 1. Open Settings > Agent > Skills and inspect the Built-in skills group.
+ Confirm `pi-desktop/imagegen` and `pi-desktop/plugin-development` are
+ listed and enabled by default.
+ 2. Turn off `pi-desktop/imagegen` and open a new session in the ordinary
+ workspace. Inspect its skill catalog and Composer's `/` menu.
+ 3. Invoke the local `Skill` tool with the stale imagegen id.
+ 4. Turn imagegen back on and open another session. Restart the app and
+ inspect the setting and a new session catalog again.
+- **Expected**: The disabled imagegen skill is absent from the prompt catalog
+ and the `skill:pi-desktop/imagegen` slash entry. A stale direct `Skill` load
+ reports that the built-in skill is disabled. Re-enabling restores both
+ entries on a new session, and the setting survives restart. The
+ plugin-development row stays visible in Settings but its session entry
+ remains limited to plugin workspaces. Associated agent tools remain
+ independently available.
+- **Specs linked**: `07-plugins/01-plugin-system.md` (§12.3),
+ `03-runtime/01-ipc-protocol.md` (§12b), `03-runtime/02-agent-runtime.md`
+ (§7.0.0), `04-ux/04-builtin-commands.md` (§8)
+- **Acceptance**: C (conversation & stream), E (tools & permissions),
+ F (persistence), Quality
+- **Coverage**: `settings-inline-import-user-path.test.mjs` exercises the
+ Settings switch in isolated Electron and asserts the persisted IPC request
+ and visible off state. `image-generation.test.mjs`,
+ `composer-mcp.test.mjs`, host-core user-skill/RPC tests cover catalog
+ filtering, stale loads, persistence, and the activation wire contract. The
+ restart and full new-session journey remain part of desktop acceptance.
+- **Milestone**: M6+
+- **Status**: Rendered desktop journey Draft
+
#### E2E-255: An ideographic comma opens the slash menu
- **Preconditions**: A Chinese IME is available, the composer draft is empty,
diff --git a/docs/spec/07-plugins/01-plugin-system.md b/docs/spec/07-plugins/01-plugin-system.md
index c855b3434..1494beb58 100644
--- a/docs/spec/07-plugins/01-plugin-system.md
+++ b/docs/spec/07-plugins/01-plugin-system.md
@@ -542,6 +542,18 @@ Rules the control encodes:
### 12.3 Skills management in Settings > Agent
+- The page lists bundled skills in a **Built-in skills** group above the
+ user-owned global and project groups. Each bundled skill has a global
+ enablement switch, enabled by default. The user can turn a bundled skill off
+ without editing or removing its packaged document.
+- A disabled bundled skill is omitted from the effective session catalog and
+ Composer's `/skill:<id>` entries. A stale direct `Skill` load reports that
+ the skill is disabled. The activation state lives in the separate
+ `<data>/agent-capabilities/skill-builtins.json` file so scans of user-owned
+ documents cannot prune it.
+- Built-in skill activation controls the skill catalog and on-demand document
+ loading only. It does not disable or unregister any agent tool associated
+ with the skill; tool activation remains independent.
- The Skills page has independent global and selected-project columns rooted at
`~/.agents/skills` and `<project>/.agents/skills`.
- Each column has a native single-file Import action and a folder Import action
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index ac8cb4c16..93b92f4cc 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1035,6 +1035,8 @@ sklm: {
},
"skills": "Fähigkeiten",
"skillsGlobalPath": "Globaler Kompetenzpfad",
+ "builtinSkills": "Integrierte Skills",
+ "builtin": "Integriert",
"skillsProjectPath": "Projektkompetenzpfad",
"mcp": "MCP-Server",
"mcpGlobalPath": "Globaler MCP-Pfad",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 6eb776181..9ab7bdbc0 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -887,6 +887,8 @@ sklm: {
},
skills: "Skills",
skillsGlobalPath: "Global skills path",
+ builtinSkills: "Built-in skills",
+ builtin: "Built-in",
skillsProjectPath: "Project skills path",
mcp: "MCP servers",
mcpGlobalPath: "Global MCP path",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index 7b6afb85d..8a7b7e906 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1035,6 +1035,8 @@ sklm: {
},
"skills": "Habilidades",
"skillsGlobalPath": "Ruta de habilidades globales",
+ "builtinSkills": "Habilidades integradas",
+ "builtin": "Integrada",
"skillsProjectPath": "Ruta de habilidades del proyecto",
"mcp": "Servidores MCP",
"mcpGlobalPath": "Ruta MCP global",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index 0fa077165..c83813055 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1035,6 +1035,8 @@ sklm: {
},
"skills": "Compétences",
"skillsGlobalPath": "Parcours de compétences global",
+ "builtinSkills": "Compétences intégrées",
+ "builtin": "Intégrée",
"skillsProjectPath": "Parcours de compétences projet",
"mcp": "Serveurs MCP",
"mcpGlobalPath": "Chemin MCP global",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 616019f23..092d603e1 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1043,6 +1043,8 @@ sklm: {
},
skills: "스킬",
skillsGlobalPath: "전역 스킬 경로",
+ builtinSkills: "기본 제공 스킬",
+ builtin: "기본 제공",
skillsProjectPath: "프로젝트 스킬 경로",
mcp: "MCP 서버",
mcpGlobalPath: "전역 MCP 경로",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index a5af210e4..8a2c698ca 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -861,6 +861,8 @@ export const ptBR = {
},
skills: "Habilidades",
skillsGlobalPath: "Caminho global de habilidades",
+ builtinSkills: "Habilidades integradas",
+ builtin: "Integrada",
skillsProjectPath: "Caminho de habilidades do projeto",
mcp: "Servidores MCP",
mcpGlobalPath: "Caminho MCP global",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 276906c09..98919e8d2 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1037,6 +1037,8 @@ sklm: {
},
skills: "Beceriler",
skillsGlobalPath: "Genel beceriler yolu",
+ builtinSkills: "Yerleşik beceriler",
+ builtin: "Yerleşik",
skillsProjectPath: "Proje becerileri yolu",
mcp: "MCP sunucuları",
mcpGlobalPath: "Genel MCP yolu",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index eeda6388c..2dfa6308f 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1028,6 +1028,8 @@ sklm: {
},
skills: "技能",
skillsGlobalPath: "全局技能路径",
+ builtinSkills: "内置技能",
+ builtin: "内置",
skillsProjectPath: "项目技能路径",
mcp: "MCP 服务器",
mcpGlobalPath: "全局 MCP 路径",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index 1d446aca6..6162eab1b 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1028,6 +1028,8 @@ sklm: {
},
skills: "技能",
skillsGlobalPath: "全域性技能路徑",
+ builtinSkills: "內建技能",
+ builtin: "內建",
skillsProjectPath: "專案技能路徑",
mcp: "MCP 伺服器",
mcpGlobalPath: "全域性 MCP 路徑",
diff --git a/packages/shared/src/protocol.ts b/packages/shared/src/protocol.ts
index ce637841e..a557c92ca 100644
--- a/packages/shared/src/protocol.ts
+++ b/packages/shared/src/protocol.ts
@@ -325,6 +325,8 @@ export const IPC = {
mcpImportRun: "pi-desktop/mcp/importRun",
mcpMarketSearch: "pi-desktop/mcp/market/search",
skillList: "pi-desktop/skill/list",
+ skillBuiltinList: "pi-desktop/skill/builtin/list",
+ skillBuiltinSetEnabled: "pi-desktop/skill/builtin/setEnabled",
skillCreate: "pi-desktop/skill/create",
skillImport: "pi-desktop/skill/import",
skillImportScan: "pi-desktop/skill/importScan",
diff --git a/packages/shared/src/types/capabilities.ts b/packages/shared/src/types/capabilities.ts
index 506f73870..402f50fbd 100644
--- a/packages/shared/src/types/capabilities.ts
+++ b/packages/shared/src/types/capabilities.ts
@@ -149,6 +149,14 @@ export type UserSkillRecord = {
updatedAt: string;
};
+/** A skill bundled with PI-Desktop and enabled globally by default. */
+export type BuiltinSkillRecord = {
+ id: string;
+ name: string;
+ description?: string;
+ enabled: boolean;
+};
+
export type UserSkillInput = {
id?: string;
name: string;