Update Agent
Updates agent files to align with the latest template structure and applies any specified changes while preserving unique agent characteristics.
Purpose & Scope
This skill systematically updates agent files to maintain consistency with the current template while preserving each agent's unique personality, expertise, and collaboration networks.
What this skill does NOT do:
- •Create new agent files (use
/create-agentinstead) - •Delete or remove agent files
- •Modify agent core personality or expertise areas
- •Change agent role assignments without explicit instruction
When to REJECT:
- •No agents exist in the
/agentsdirectory - •Template file
template:agentis missing or invalid - •Request to modify protected agent characteristics without justification
- •Agent files are locked or in active use by running processes
Workflow
ultrathink: you'd perform the following steps
Step 1: Planning & Discovery
- •
Analyze Requirements
- •Parse $ARGUMENTS to extract:
- •Agent specifier (all, specific agent name, or pattern like
*frontend*) - •Change specifications (--changes parameter)
- •Agent specifier (all, specific agent name, or pattern like
- •Validate agent files exist if specific agent specified
- •Count total agents if updating all
- •Parse $ARGUMENTS to extract:
- •
Load Template Reference
- •Read template:agent for latest agent structure
- •Identify template sections and required elements
- •Note any template updates since last agent refresh
- •
Locate Agents
- •Discover all relevant agent files using Glob
- •Filter by specifier pattern if provided
- •Build list of agents to update
Step 2: Execution with Parallel Subagents
- •
Template Validation
- •Verify template:agent exists and is readable
- •Load template structure for reference
- •Identify mandatory sections that must be preserved
- •
Delegation
- •Create parallel specialized subagents (one per agent file) with:
- •Agent file path
- •All change specifications
- •Detailed instructions
- •Request to ultrathink
- •Create parallel specialized subagents (one per agent file) with:
- •
Subagent Task Specification
ultrathink: adopt the Agent Update Specialist mindset
- •You're an Agent Update Specialist with deep expertise in agent configuration who follows these principles:
- •Template-First Approach: Always compare against template before modification
- •Personality Preservation: Maintain unique agent characteristics and voice
- •Structural Integrity: Align with template structure while preserving customizations
- •Professional Polish: Deliver clean, consistent agent definitions
Assignment You're assigned to update agent: [agent name]
Agent Specifications:
- •Agent File: [agent file path]
- •Template: template:agent
- •Changes to Apply: [change specifications from inputs]
Steps
- •
Read Current Agent:
- •Read the agent file completely
- •Identify unique personality traits, expertise, and collaboration networks
- •Note any custom sections or configurations
- •
Compare with Template:
- •Read template:agent for current structure
- •Identify missing sections from template
- •Identify sections that need structural updates
- •Map changes to specific template sections
- •
Apply Updates:
- •Add any missing required sections from template
- •Update section formatting to match template
- •Apply specified changes from --changes parameter
- •Preserve all unique agent characteristics
- •Maintain collaboration networks and tool permissions
- •
Clean & Finalize:
- •Remove any outdated or deprecated sections
- •Ensure consistent formatting throughout
- •Verify agent definition is complete and valid
Report [IMPORTANT] You MUST return the following execution report (<500 tokens):
yamlstatus: success|failure|partial agent: '[agent-name]' summary: 'Brief description of changes applied' modifications: - section: '[section name]' change: '[what was changed]' template_compliance: true|false personality_preserved: true|false issues: ['issue1', 'issue2', ...] # only if problems encountered<<<
- •You're an Agent Update Specialist with deep expertise in agent configuration who follows these principles:
- •
Progress Monitoring
- •Track completion status of each delegated agent
- •Handle any subagent failures or escalations
- •Ensure constitutional compliance in all updates
Step 3: Verification
- •
Template Compliance Verification
- •Verify each updated agent follows template:agent structure
- •Check all mandatory sections are present and properly formatted
- •Validate frontmatter and metadata consistency
- •
Change Application Verification
- •Confirm all specified changes were applied correctly
- •Verify changes are reflected throughout the agent file
- •Check for any conflicting or contradictory specifications
- •
Personality Preservation Check
- •Ensure unique agent characteristics remain intact
- •Verify collaboration networks are preserved
- •Confirm expertise areas unchanged (unless explicitly modified)
Step 4: Reporting
Output Format:
[✅/❌] Command: update-agent $ARGUMENTS ## Summary - Agents processed: [count/total] - Successfully updated: [count] - Failed updates: [count] - Template compliance: [PASS/FAIL] ## Actions Taken 1. [Batch processing of agents with results] 2. [Template alignment changes applied] 3. [Custom changes applied (if any)] ## Workflows Applied - Update Agent Workflow: [Status] ## Updated Agents - [agent-name]: [Changes applied] - [agent-name]: [Changes applied] ## Issues Found (if any) - **Agent**: [agent-name] **Issue**: [Description of problem] **Resolution**: [Applied fix or manual intervention needed]
Examples
Update All Agents
/update-agent # Updates all agents in /agents directory to latest template # Preserves unique characteristics while ensuring template compliance
Update Specific Agent
/update-agent "priya-sharma" # Updates only the priya-sharma agent file # Aligns with template while preserving role-specific content
Update with Pattern Matching
/update-agent "*frontend*" # Updates all agents with 'frontend' in their filename # Useful for updating agents with similar roles or expertise
Update with Custom Changes
/update-agent --change="Add new security compliance gate" # Updates all agents and applies additional changes # Template alignment plus specified modifications
Update Specific Agent with Changes
/update-agent "james-mitchell" --change="Update collaboration network to include new DevOps role" # Updates specific agent with both template alignment and custom changes # Preserves agent identity while making requested modifications
Batch Update by Category
/update-agent "*-engineer*" --change="Update tool permissions for new security standards" # Updates all engineer-type agents with security updates # Efficient for role-based mass updates
Error Case Handling
/update-agent "non-existent-agent" # Error: Agent file not found # Suggestion: Use 'ls agents/' to see available agents # Alternative: Use '/update-agent' to update all agents
Template Validation
/update-agent --verify # Validates all agents against current template without making changes # Reports compliance status and suggests improvements