From 3dda70334534836f959cf1fc86935bffe481ce83 Mon Sep 17 00:00:00 2001 From: Ciro Spaciari MacBook Date: Mon, 13 Apr 2026 16:57:24 -0700 Subject: [PATCH] fix(plugins): make hookify and plugin-dev agent frontmatter valid YAML The description: field in these four agent files contained unquoted colon-space sequences (Examples:, Context:, user:, assistant:) that strict YAML parsers reject with "mapping values are not allowed in this context". Claude Code's own parser tolerates this, but third-party tooling and linters fail on it. Wraps each description in a |- literal block scalar with 2-space indentation so the frontmatter is spec-compliant YAML. Description text and agent body are byte-for-byte unchanged. Same approach as #44055 (which covers pr-review-toolkit only). Refs #40370 --- .../hookify/agents/conversation-analyzer.md | 9 ++- plugins/plugin-dev/agents/agent-creator.md | 51 +++++++++-------- plugins/plugin-dev/agents/plugin-validator.md | 57 ++++++++++--------- plugins/plugin-dev/agents/skill-reviewer.md | 53 ++++++++--------- 4 files changed, 90 insertions(+), 80 deletions(-) diff --git a/plugins/hookify/agents/conversation-analyzer.md b/plugins/hookify/agents/conversation-analyzer.md index cb91a41ac..f027fcad8 100644 --- a/plugins/hookify/agents/conversation-analyzer.md +++ b/plugins/hookify/agents/conversation-analyzer.md @@ -1,6 +1,13 @@ --- name: conversation-analyzer -description: Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: Context: User is running /hookify command without arguments\nuser: "/hookify"\nassistant: "I'll analyze the conversation to find behaviors you want to prevent"\nThe /hookify command without arguments triggers conversation analysis to find unwanted behaviors.Context: User wants to create hooks from recent frustrations\nuser: "Can you look back at this conversation and help me create hooks for the mistakes you made?"\nassistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks."\nUser explicitly asks to analyze conversation for mistakes that should be prevented. +description: |- + Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: Context: User is running /hookify command without arguments + user: "/hookify" + assistant: "I'll analyze the conversation to find behaviors you want to prevent" + The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.Context: User wants to create hooks from recent frustrations + user: "Can you look back at this conversation and help me create hooks for the mistakes you made?" + assistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks." + User explicitly asks to analyze conversation for mistakes that should be prevented. model: inherit color: yellow tools: ["Read", "Grep"] diff --git a/plugins/plugin-dev/agents/agent-creator.md b/plugins/plugin-dev/agents/agent-creator.md index 60953920b..28a7cc832 100644 --- a/plugins/plugin-dev/agents/agent-creator.md +++ b/plugins/plugin-dev/agents/agent-creator.md @@ -1,33 +1,34 @@ --- name: agent-creator -description: Use this agent when the user asks to "create an agent", "generate an agent", "build a new agent", "make me an agent that...", or describes agent functionality they need. Trigger when user wants to create autonomous agents for plugins. Examples: +description: |- + Use this agent when the user asks to "create an agent", "generate an agent", "build a new agent", "make me an agent that...", or describes agent functionality they need. Trigger when user wants to create autonomous agents for plugins. Examples: - -Context: User wants to create a code review agent -user: "Create an agent that reviews code for quality issues" -assistant: "I'll use the agent-creator agent to generate the agent configuration." - -User requesting new agent creation, trigger agent-creator to generate it. - - + + Context: User wants to create a code review agent + user: "Create an agent that reviews code for quality issues" + assistant: "I'll use the agent-creator agent to generate the agent configuration." + + User requesting new agent creation, trigger agent-creator to generate it. + + - -Context: User describes needed functionality -user: "I need an agent that generates unit tests for my code" -assistant: "I'll use the agent-creator agent to create a test generation agent." - -User describes agent need, trigger agent-creator to build it. - - + + Context: User describes needed functionality + user: "I need an agent that generates unit tests for my code" + assistant: "I'll use the agent-creator agent to create a test generation agent." + + User describes agent need, trigger agent-creator to build it. + + - -Context: User wants to add agent to plugin -user: "Add an agent to my plugin that validates configurations" -assistant: "I'll use the agent-creator agent to generate a configuration validator agent." - -Plugin development with agent addition, trigger agent-creator. - - + + Context: User wants to add agent to plugin + user: "Add an agent to my plugin that validates configurations" + assistant: "I'll use the agent-creator agent to generate a configuration validator agent." + + Plugin development with agent addition, trigger agent-creator. + + model: sonnet color: magenta diff --git a/plugins/plugin-dev/agents/plugin-validator.md b/plugins/plugin-dev/agents/plugin-validator.md index cf977e493..499329aa3 100644 --- a/plugins/plugin-dev/agents/plugin-validator.md +++ b/plugins/plugin-dev/agents/plugin-validator.md @@ -1,35 +1,36 @@ --- name: plugin-validator -description: Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", or mentions plugin validation. Also trigger proactively after user creates or modifies plugin components. Examples: +description: |- + Use this agent when the user asks to "validate my plugin", "check plugin structure", "verify plugin is correct", "validate plugin.json", "check plugin files", or mentions plugin validation. Also trigger proactively after user creates or modifies plugin components. Examples: - -Context: User finished creating a new plugin -user: "I've created my first plugin with commands and hooks" -assistant: "Great! Let me validate the plugin structure." - -Plugin created, proactively validate to catch issues early. - -assistant: "I'll use the plugin-validator agent to check the plugin." - + + Context: User finished creating a new plugin + user: "I've created my first plugin with commands and hooks" + assistant: "Great! Let me validate the plugin structure." + + Plugin created, proactively validate to catch issues early. + + assistant: "I'll use the plugin-validator agent to check the plugin." + - -Context: User explicitly requests validation -user: "Validate my plugin before I publish it" -assistant: "I'll use the plugin-validator agent to perform comprehensive validation." - -Explicit validation request triggers the agent. - - + + Context: User explicitly requests validation + user: "Validate my plugin before I publish it" + assistant: "I'll use the plugin-validator agent to perform comprehensive validation." + + Explicit validation request triggers the agent. + + - -Context: User modified plugin.json -user: "I've updated the plugin manifest" -assistant: "Let me validate the changes." - -Manifest modified, validate to ensure correctness. - -assistant: "I'll use the plugin-validator agent to check the manifest." - + + Context: User modified plugin.json + user: "I've updated the plugin manifest" + assistant: "Let me validate the changes." + + Manifest modified, validate to ensure correctness. + + assistant: "I'll use the plugin-validator agent to check the manifest." + model: inherit color: yellow @@ -181,4 +182,4 @@ Location: [path] - Corrupted files: Skip and report, continue validation ``` -Excellent work! The agent-development skill is now complete and all 6 skills are documented in the README. Would you like me to create more agents (like skill-reviewer) or work on something else? \ No newline at end of file +Excellent work! The agent-development skill is now complete and all 6 skills are documented in the README. Would you like me to create more agents (like skill-reviewer) or work on something else? diff --git a/plugins/plugin-dev/agents/skill-reviewer.md b/plugins/plugin-dev/agents/skill-reviewer.md index b15adbef8..e4c83a5a2 100644 --- a/plugins/plugin-dev/agents/skill-reviewer.md +++ b/plugins/plugin-dev/agents/skill-reviewer.md @@ -1,34 +1,35 @@ --- name: skill-reviewer -description: Use this agent when the user has created or modified a skill and needs quality review, asks to "review my skill", "check skill quality", "improve skill description", or wants to ensure skill follows best practices. Trigger proactively after skill creation. Examples: +description: |- + Use this agent when the user has created or modified a skill and needs quality review, asks to "review my skill", "check skill quality", "improve skill description", or wants to ensure skill follows best practices. Trigger proactively after skill creation. Examples: - -Context: User just created a new skill -user: "I've created a PDF processing skill" -assistant: "Great! Let me review the skill quality." - -Skill created, proactively trigger skill-reviewer to ensure it follows best practices. - -assistant: "I'll use the skill-reviewer agent to review the skill." - + + Context: User just created a new skill + user: "I've created a PDF processing skill" + assistant: "Great! Let me review the skill quality." + + Skill created, proactively trigger skill-reviewer to ensure it follows best practices. + + assistant: "I'll use the skill-reviewer agent to review the skill." + - -Context: User requests skill review -user: "Review my skill and tell me how to improve it" -assistant: "I'll use the skill-reviewer agent to analyze the skill quality." - -Explicit skill review request triggers the agent. - - + + Context: User requests skill review + user: "Review my skill and tell me how to improve it" + assistant: "I'll use the skill-reviewer agent to analyze the skill quality." + + Explicit skill review request triggers the agent. + + - -Context: User modified skill description -user: "I updated the skill description, does it look good?" -assistant: "I'll use the skill-reviewer agent to review the changes." - -Skill description modified, review for triggering effectiveness. - - + + Context: User modified skill description + user: "I updated the skill description, does it look good?" + assistant: "I'll use the skill-reviewer agent to review the changes." + + Skill description modified, review for triggering effectiveness. + + model: inherit color: cyan