Every agent MUST follow these rules. Violations waste tokens and context.
Enforces strict output discipline and token efficiency for AI agents. Provides batch search, GitHub CLI wrappers, and file analysis scripts to minimize redundant operations. Essential for building high-performance Claude Code plugins that follow anti-pattern prevention rules.
/plugin marketplace add c-daly/agent-swarm/plugin install agent-swarm@fearsidhe-pluginsEvery agent MUST follow these rules. Violations waste tokens and context.
NEVER use Read tool for understanding code. Use Serena:
mcp__plugin_serena_serena__find_symbol - Find where something is defined
mcp__plugin_serena_serena__find_references - Find where something is used
mcp__plugin_serena_serena__get_definition - Get signature + docstring
mcp__plugin_serena_serena__list_dir - Get structure
BAD: Read file.ts then parse it yourself
GOOD: find_symbol "handleAuth" → get location → get_definition if needed
NEVER use WebSearch for library docs. Use Context7:
mcp__context7__resolve-library-id - Get library ID
mcp__context7__query-docs - Get specific docs
BAD: WebSearch "react useEffect cleanup"
GOOD: query-docs "/facebook/react" "useEffect cleanup"
BATCH SEARCHES - Never run grep/glob more than once:
python3 ~/.claude/plugins/agent-swarm/scripts/batch_search.py '{"patterns": ["a","b","c"]}'
GH CLI WRAPPER - Never raw gh output:
python3 ~/.claude/plugins/agent-swarm/scripts/gh_wrapper.py pr list
FILE ANALYSIS - When you must read files, summarize:
python3 ~/.claude/plugins/agent-swarm/scripts/file_analyzer.py '{"files": ["a.py"]}'
Every token costs money and context. Before outputting anything, ask:
BAD: "I found the authentication logic in src/auth/login.ts. Let me show you the relevant code..." GOOD: "Auth: src/auth/login.ts:45-67"
BAD: "The function handleSubmit takes a form event and processes..." GOOD: "handleSubmit(FormEvent) → validates, calls API, updates state"
These mistakes WASTE HOURS. Do not repeat them.
# WRONG: Use a guide agent, read random files, try things
# RIGHT:
mcp__context7__resolve-library-id → query-docs
WebFetch to official GitHub raw docs
If you don't know the answer, LOOK IT UP before changing anything.
# Check ACTUAL load path
cat ~/.claude/plugins/installed_plugins.json | grep installPath
Editing the wrong directory does nothing. Plugins load from CACHE, not source.
Finish ALL changes → Verify everything → THEN one restart instruction. User restarts with incomplete fixes = wasted cycle.
Research ONCE → Apply ONCE → If fails, problem is elsewhere. Changing A→B→A→B means you don't understand the system.
ls -la <file> # Check permissions
diff <working> <broken> # Compare to working example
Files existing ≠ files readable. 600 vs 644 matters.
claude --debug "plugin"
Read actual errors. Don't guess.
ls -la ~/.claude/plugins/cache/claude-plugins-official/<working>/
Find differences. Don't debug in isolation.
Same category of fix failing 3x = wrong diagnosis. Step back. Use --debug. Ask user what was already tried.
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences