agentleFS
ayushcodes10ayushcodes10/echo-mem/.agents/skills/source-command-analysis-bottleneck-detect/SKILL.md

source-command-analysis-bottleneck-detect

Skill2 starsChanged 3 months agoApache-2.0View on GitHub

Migrated source command `analysis-bottleneck-detect`

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this skill when the user asks to run the migrated source command analysis-bottleneck-detect.

    line 8
  2. Very specific:

    When using --fix, the following optimizations may be applied:

    line 123

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

source-command-analysis-bottleneck-detect

Use this skill when the user asks to run the migrated source command analysis-bottleneck-detect.

Command Template

bottleneck detect

Analyze performance bottlenecks in swarm operations and suggest optimizations.

Usage

npx Codex-flow bottleneck detect [options]

Options

  • --swarm-id, -s <id> - Analyze specific swarm (default: current)
  • --time-range, -t <range> - Analysis period: 1h, 24h, 7d, all (default: 1h)
  • --threshold <percent> - Bottleneck threshold percentage (default: 20)
  • --export, -e <file> - Export analysis to file
  • --fix - Apply automatic optimizations

Examples

Basic bottleneck detection

npx Codex-flow bottleneck detect

Analyze specific swarm

npx Codex-flow bottleneck detect --swarm-id swarm-123

Last 24 hours with export

npx Codex-flow bottleneck detect -t 24h -e bottlenecks.json

Auto-fix detected issues

npx Codex-flow bottleneck detect --fix --threshold 15

Metrics Analyzed

Communication Bottlenecks

  • Message queue delays
  • Agent response times
  • Coordination overhead
  • Memory access patterns

Processing Bottlenecks

  • Task completion times
  • Agent utilization rates
  • Parallel execution efficiency
  • Resource contention

Memory Bottlenecks

  • Cache hit rates
  • Memory access patterns
  • Storage I/O performance
  • Neural pattern loading

Network Bottlenecks

  • API call latency
  • MCP communication delays
  • External service timeouts
  • Concurrent request limits

Output Format

🔍 Bottleneck Analysis Report
━━━━━━━━━━━━━━━━━━━━━━━━━━━

📊 Summary
├── Time Range: Last 1 hour
├── Agents Analyzed: 6
├── Tasks Processed: 42
└── Critical Issues: 2

🚨 Critical Bottlenecks
1. Agent Communication (35% impact)
   └── coordinator → coder-1 messages delayed by 2.3s avg

2. Memory Access (28% impact)
   └── Neural pattern loading taking 1.8s per access

⚠️ Warning Bottlenecks
1. Task Queue (18% impact)
   └── 5 tasks waiting > 10s for assignment

💡 Recommendations
1. Switch to hierarchical topology (est. 40% improvement)
2. Enable memory caching (est. 25% improvement)
3. Increase agent concurrency to 8 (est. 20% improvement)

✅ Quick Fixes Available
Run with --fix to apply:
- Enable smart caching
- Optimize message routing
- Adjust agent priorities

Automatic Fixes

When using --fix, the following optimizations may be applied:

  1. Topology Optimization

    • Switch to more efficient topology
    • Adjust communication patterns
    • Reduce coordination overhead
  2. Caching Enhancement

    • Enable memory caching
    • Optimize cache strategies
    • Preload common patterns
  3. Concurrency Tuning

    • Adjust agent counts
    • Optimize parallel execution
    • Balance workload distribution
  4. Priority Adjustment
    • Reorder task queues
    • Prioritize critical paths
    • Reduce wait times

Performance Impact

Typical improvements after bottleneck resolution:

  • Communication: 30-50% faster message delivery
  • Processing: 20-40% reduced task completion time
  • Memory: 40-60% fewer cache misses
  • Overall: 25-45% performance improvement

Integration with Codex

// Check for bottlenecks in Codex
mcp__claude-flow__bottleneck_detect {
  timeRange: "1h",
  threshold: 20,
  autoFix: false
}

See Also

  • performance report - Detailed performance analysis
  • token usage - Token optimization analysis
  • swarm monitor - Real-time monitoring
  • cache manage - Cache optimization

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.