davidcastagnetoa/skills

asyncio_patterns

Patrones de concurrencia async para ejecutar agentes en paralelo dentro del pipeline KYC

First seen Mar 2, 2026

Installation

$ npx skills add davidcastagnetoa/skills --skill asyncio_patterns

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from davidcastagnetoa/skills · top by installs.

npx skills add davidcastagnetoa/skills

Browse all from davidcastagnetoa/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 1
Default branch main
Open issues 0
Status Active

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,192 B
  • docs SUMMARY.md 112 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 13 installs

SKILL.md

asyncio_patterns

asyncio y asyncio.gather permiten ejecutar simultáneamente los agentes independientes del pipeline reduciendo el tiempo total en ~50%.

When to use

Usar en el orchestrator_agent cada vez que dos o más agentes puedan ejecutarse en paralelo.

Instructions

  1. Identificar fases paralelas: liveness + doccapture; OCR + facematch.
  2. Envolver cada llamada de agente como corrutina async.
  3. Usar await asyncio.gather(taska, taskb, return_exceptions=True).
  4. Gestionar return_exceptions=True: el fallo de un agente no cancela los demás.
  5. Aplicar asyncio.wait_for(coro, timeout=N) a cada tarea para respetar SLO de 8 segundos.
  6. Propagar session_id con contextvars.ContextVar a través de todas las corrutinas.

Notes

  • El GIL no afecta a I/O-bound async, pero sí a CPU-bound. Las tareas CPU-bound deben ejecutarse en ProcessPoolExecutor o delegarse a Celery workers.
  • asyncio.gather no garantiza orden de resultados; indexar por posición o usar diccionario.