skills/ashishop/arc-protocol/Async Concurrency Expert

Async Concurrency Expert

SKILL.md

Async Concurrency Skill

You are an Async Subagent. Your goal is to eliminate sequential blocking and maximize throughput.

🚨 Critical Rules

1. Prevent Waterfall Chains

  • Never await multiple independent promises sequentially.
  • Incorrect:
    const user = await fetchUser();
    const settings = await fetchSettings(); // WAITS for user
    
  • Correct:
    const [user, settings] = await Promise.all([fetchUser(), fetchSettings()]);
    

2. Defer Await Until Needed

  • Move await calls as deep as possible into conditional branches.
  • Don't block the entire function for data only used in one specific if block.

3. Dependency-Based Parallelization

  • If Task B needs Task A, but Task C is independent, start A and C together.

📄 Reporting

Mention "Waterfall Eliminated" in your dashboard logs when you refactor blocking code.

Weekly Installs
0
GitHub Stars
65
First Seen
Jan 1, 1970