Get the FREE Ultimate OpenClaw Setup Guide →

mend-subagents

npx machina-cli add skill yu-iskw/meta-agent-skills/mend-subagents --openclaw
Files (1)
SKILL.md
2.0 KB

Mend Subagents

Purpose

This skill ensures that all Subagents have accurate references to the available Agent Skills. It manages the binding between agents and skills, ensuring they remain consistent as the ecosystem grows or changes.

When to Use

  • After creating new Agent Skills.
  • After deleting or renaming skills.
  • When an agent seems to lack the capabilities it needs to perform its role.

Instructions

1. Index Available Skills

  • Scan the platform-specific skills/ directory and the root skills/ directory.
  • For each SKILL.md, extract the name and description from the YAML frontmatter.

2. Audit Subagents

  • Iterate through each agent definition (e.g., in .claude/agents/ or root agents/).
  • Parse the YAML frontmatter skills list and the ## Capabilities section.

3. Synchronize Bindings

  • Remove Dead Links: If an agent references a skill that no longer exists, remove it from the frontmatter and the Capabilities section.
  • Update Links: Ensure all links point to the correct relative path for the current platform.
    • Claude Code: [skill-name](../skills/skill-name/SKILL.md)
    • Cursor: [skill-name](../../skills/meta-agent-skills/skill-name/SKILL.md)
  • Capabilities Section: Use the <!-- SKILLS_START --> and <!-- SKILLS_END --> markers to synchronize the table of skills in the agent's body.

4. Suggestive Mending (AI Heuristic)

  • Compare the Agent's description with the descriptions of all available skills.
  • If a skill appears relevant but is not bound to the agent:
    • Interactive: Suggest the binding to the user via AskQuestion.
    • Proactive: If confidence is high, add the binding and report it.

5. Final Report

  • List all agents updated.
  • List all new bindings suggested or added.
  • Highlight any broken links that were removed.

Source

git clone https://github.com/yu-iskw/meta-agent-skills/blob/main/skills/mend-subagents/SKILL.mdView on GitHub

Overview

Mend Subagents keeps Subagents aligned with the current pool of Agent Skills. It audits skills, updates bindings, and removes broken references so agents always have the capabilities they need.

How This Skill Works

It scans the skills/ directories for Skill YAML frontmatter to index available skills, then audits each Subagent's frontmatter and Capabilities section. It synchronizes bindings by removing dead links, updating relative paths for Claude Code and Cursor, and using the <!-- SKILLS_START --> and <!-- SKILLS_END --> markers to align the capabilities table. AI heuristics suggest or apply bindings based on description similarity and confidence.

When to Use It

  • After creating new Agent Skills.
  • After deleting or renaming skills.
  • When an agent seems to lack the capabilities it needs to perform its role.
  • When platform-specific link paths change (affecting Claude Code and Cursor).
  • During regular maintenance to ensure all bindings are current.

Quick Start

  1. Step 1: Index Available Skills by scanning skills/ and root skills/ directories and extracting name and description from YAML frontmatter.
  2. Step 2: Audit Subagents by parsing each agent's frontmatter skills list and the Capabilities section.
  3. Step 3: Synchronize Bindings by removing dead links, updating relative paths for Claude Code and Cursor, and reviewing the final report.

Best Practices

  • Keep YAML frontmatter consistent across skills and ensure Skill names are unique.
  • Regularly verify that all relative skill links point to the correct paths per platform.
  • Validate that the Capabilities section matches the actual Skill capabilities.
  • Run a final report after each run and review updated agents and bindings.
  • Test a representative agent to confirm new bindings provide the expected capabilities.

Example Use Cases

  • Renaming a Skill from 'text-gen' to 'text-generation' prompts mend-subagents to update all agent bindings and Capabilities accordingly.
  • Deleting a Skill triggers dead-link removal from all agents' frontmatter and Capabilities sections.
  • A new Skill 'summarization' is added; mend-subagents suggests binding it to agents that require summarization capabilities.
  • An agent lacks 'image-processing' capability; heuristic binding is suggested or applied based on high confidence.
  • Platform-specific link paths are updated so Claude Code and Cursor links resolve to the correct relative SKILL.md locations.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers