writing-agents

Create and edit Claude Code subagent definition files with validation workflows.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/wuji-technology/pm-workflow-plugin --skill writing-agents-wuji-technology
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: writing-agents
Source: https://github.com/wuji-technology/pm-workflow-plugin/tree/main/skills/writing-agents
Command: npx skills add https://github.com/wuji-technology/pm-workflow-plugin --skill writing-agents-wuji-technology

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps users design, edit, and validate Claude Code subagent definition files so that agents have clear responsibilities, safe tool permissions, and consistent output formats, reducing misconfiguration and unreliable delegations.

Core Features & Use Cases

  • Agent authoring: Guided frontmatter and system-prompt templates for creating .claude/agents/.md or ~/.claude/agents/.md files.
  • Validation workflow: Multi-phase process including requirement confirmation, three-pass logical self-check, and verification steps (load, manual trigger, auto-delegate, tool permission tests).
  • Safety and tooling guidance: Best practices for tools white-listing, permissionMode, hooks, memory, and preventing common mistakes like accidental MCP inheritance.
  • Use case: Turn a written agent brief into a production-ready agent file, run diagnostics, and produce a validation report before deployment.

Quick Start

Describe the agent's purpose, required tools, inputs, and desired output template and ask the skill to generate or update the agent file in .claude/agents and perform the three-pass validation.

Frequently Asked Questions about writing-agents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a valid Claude Code subagent definition file?

To create a Claude Code subagent, generate a markdown file in the .claude/agents directory with specific frontmatter constraints like name and description. This process involves setting tool whitelists, defining I/O templates, and establishing behavior rules to ensure clear responsibilities and safe delegations.

What is a three-pass logical self-check for subagent validation?

A three-pass logical self-check is a validation process within subagent authoring that verifies the agent's system prompt and behavior rules for logical consistency before deployment. It ensures the agent's responsibilities, tool permissions, and output formats are correctly configured to prevent unreliable delegations.

How do I configure tool permissions and prevent MCP inheritance in Claude Code agents?

Configuring tool permissions involves setting a tools whitelist and permissionMode in the agent's frontmatter. To prevent accidental MCP inheritance and ensure safe tooling, you should follow specific safety guidance and validation steps that test tool permissions during the agent setup process.

What steps are needed to validate a Claude Code subagent before deployment?

Validating a Claude Code subagent requires running through multiple verification steps including loading the agent, triggering it manually, testing auto-delegation, and checking tool permissions. This workflow ensures the agent file is production-ready and produces a validation report.

Can I use this subagent authoring process for both project-level and personal agent repositories?

Yes, the subagent authoring process applies to designing and maintaining single-subagent markdown files for both project-level (.claude/agents/*.md) and personal (~/.claude/agents/*.md) agent repositories. It helps manage frontmatter and system prompts across different repository scopes.