# Cfn Agent Swap

> Agent Swap Mechanism Skill

- Skill: `masharratt/cfn-agent-swap` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add masharratt/cfn-agent-swap`
- Raw SKILL.md: https://api.skillmd.com/api/skills/masharratt/cfn-agent-swap/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: masharratt (https://skillmd.com/u/masharratt)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/masharratt/cfn-agent-swap

---

# Agent Swap Mechanism Skill

## Purpose
Recommend agent replacement strategies when performance issues are detected in CFN Loops.

## Replacement Rules
1. Identify lowest-performing agent
2. Match replacement based on feedback themes
   - Security feedback → security-specialist
   - Performance feedback → performance-engineer
   - Testing feedback → tester
   - Architecture feedback → architect

## Replacement Strategies
- Complete agent replacement
- Adding specialist alongside existing agents
- Prioritize maintaining existing team composition

## Usage
```bash
./recommend-swap.sh \
  --loop3-agents "backend-dev,coder" \
  --loop3-confidences "0.82,0.70" \
  --feedback-themes "security,error-handling"
```

## Output Details
- Agent to remove
- Reasoning for removal
- Recommended replacement agent
- Updated agent configuration

## Implementation Considerations
- Stateless design
- Minimal side effects
- Clear, reproducible recommendations
