





















@@ -41,6 +41,10 @@ import {
4141shouldRenderOpenClawToolWorkflowHints,
4242} from "./prompt-surface.js";
4343import { sanitizeForPromptLiteral } from "./sanitize-for-prompt.js";
44+import {
45+buildSkillWorkshopPromptSection,
46+SKILL_WORKSHOP_TOOL_NAME,
47+} from "./skill-workshop-prompt.js";
4448import { SYSTEM_PROMPT_CACHE_BOUNDARY } from "./system-prompt-cache-boundary.js";
4549import type {
4650ProviderSystemPromptContribution,
@@ -923,23 +927,8 @@ export function buildAgentSystemPrompt(params: {
923927 skillsPrompt,
924928 readToolName,
925929});
926-const skillWorkshopSection = availableTools.has("skill_workshop")
927- ? [
928-"## Skill Workshop",
929-"Use `skill_workshop` when the user wants to create, update, revise, list, inspect, apply, reject, or quarantine a reusable skill, Skill Workshop proposal, playbook, workflow, procedure, or durable instruction.",
930-"Treat a request as durable when it should be saved, repeated, proposed, installed later, shared as a skill, or used as a standing workflow instead of answered once in chat.",
931-"Do not create or change skill proposal files manually with `write`, `edit`, `exec`, shell commands, or direct filesystem operations. The final proposal artifact must go through `skill_workshop`.",
932-"Use `action=create` for a new skill, `action=update` for an existing approved/live skill, and `action=revise` for an existing pending proposal; keep `description` under 160 bytes and `proposal_content` within the configured body limit.",
933-"For `action=update`, pass a concise `description` when the existing live skill description should be shortened in the proposal listing.",
934-"For `action=revise`, pass `proposal_id` when known. If it is not known, pass the proposal or skill name in `name` so `skill_workshop` can resolve the pending proposal or return candidates.",
935-"Use `action=list` or `action=inspect` only for pending proposal discovery/inspection. Do not use filesystem search for proposal discovery.",
936-"If the user names an existing live skill, read or view that skill when needed for context, but create the update proposal through `skill_workshop`.",
937-"Generated skills are pending proposals by default. Do not apply, install, approve, enable, or write into live skills unless the user explicitly asks for that separate action.",
938-"Use `action=apply`, `action=reject`, or `action=quarantine` only after the user explicitly asks to approve/use/apply, reject, or quarantine a specific proposal. Pass `proposal_id`; if it is not known, use `action=list` or `action=inspect` first.",
939-"Do not apply, reject, or quarantine proposals manually with filesystem operations or shell commands. Proposal lifecycle changes must use `skill_workshop`.",
940-"You may gather context first, but the durable proposal write or lifecycle change must use `skill_workshop`.",
941-"",
942-]
930+const skillWorkshopSection = availableTools.has(SKILL_WORKSHOP_TOOL_NAME)
931+ ? buildSkillWorkshopPromptSection()
943932 : [];
944933const memorySection = buildMemorySection({
945934 isMinimal,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。