Communitygithub.com

TerminalSkills/skills

Você é um especialista em AG2 (antigo AutoGen), o framework de conversação multiagente de código aberto. Você ajuda desenvolvedores a construir sistemas onde múltiplos agentes de IA colaboram através de conversas estruturadas — com uso de ferramentas, supervisão humana, execução de código, orquestração de chat em grupo e conversas aninhadas — para tarefas complexas como desenvolvimento de software, pesquisa e análise de dados.

O que é skills?

Este skill fornece conhecimento especializado sobre o AG2 (anteriormente AutoGen), um framework de código aberto para criar sistemas multiagente onde agentes de IA conversam entre si para resolver tarefas complexas. Ele cobre capacidades essenciais como conversas entre dois agentes, chat em grupo com múltiplos especialistas, registro e uso de ferramentas (como busca em código e execução de testes), e integração com execução segura de código em Docker. O skill é útil para desenvolvedores que desejam montar equipes de agentes especializados (arquiteto, desenvolvedor, revisor, testador) que colaboram automaticamente, com opções de supervisão humana. Suporta plataformas como Python (pip install ag2) e modelos de linguagem como GPT-4o, oferecendo boas práticas para definir papéis claros, controlar custos, e evitar loops infinitos.

Funciona com~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/TerminalSkills/skills/tree/HEAD/skills/ag2

Perguntar na sua IA favorita

Abre um novo chat com esta habilidade de agente já pré-carregada.

Documentação

AG2 (AutoGen) — Framework de Conversação Multiagente

Você é um especialista em AG2 (antigo AutoGen), o framework de conversação multiagente de código aberto. Você ajuda desenvolvedores a construir sistemas onde múltiplos agentes de IA colaboram através de conversas estruturadas — com uso de ferramentas, supervisão humana, execução de código, orquestração de chat em grupo e conversas aninhadas — para tarefas complexas como desenvolvimento de software, pesquisa e análise de dados.

Capacidades Principais

Conversa entre Dois Agentes

from autogen import ConversableAgent, UserProxyAgent

# Agente assistente de IA
assistant = ConversableAgent(
    name="Engenheiro",
    system_message="""Você é um engenheiro de software sênior.
    Escreva código Python limpo e testado. Explique suas decisões de design.""",
    llm_config={"model": "gpt-4o", "temperature": 0.2},
)

# Proxy humano (pode auto-aprovar ou exigir entrada humana)
user_proxy = UserProxyAgent(
    name="Usuário",
    human_input_mode="NEVER",             # NEVER / ALWAYS / TERMINATE
    max_consecutive_auto_reply=10,
    is_termination_msg=lambda msg: "TERMINATE" in msg.get("content", ""),
    code_execution_config={
        "work_dir": "workspace",
        "use_docker": True,               # Execução segura de código em Docker
    },
)

# Iniciar conversa — agentes conversam até a tarefa ser concluída
result = user_proxy.initiate_chat(
    assistant,
    message="Crie um app FastAPI com autenticação de usuário usando JWT. Inclua testes.",
)
# Engenheiro escreve código → Proxy de usuário executa → Engenheiro revisa saída → itera

Chat em Grupo (Múltiplos Agentes)

from autogen import GroupChat, GroupChatManager

# Agentes especialistas
architect = ConversableAgent(
    name="Arquiteto",
    system_message="Você projeta arquitetura de sistemas. Foco em escalabilidade, confiabilidade e interfaces limpas.",
    llm_config={"model": "gpt-4o"},
)

desenvolvedor = ConversableAgent(
    name="Desenvolvedor",
    system_message="Você implementa funcionalidades baseadas no design do arquiteto. Escreva código de qualidade de produção.",
    llm_config={"model": "gpt-4o"},
)

revisor = ConversableAgent(
    name="Revisor",
    system_message="Você revisa código em busca de bugs, problemas de segurança e boas práticas. Seja minucioso, mas construtivo.",
    llm_config={"model": "gpt-4o"},
)

testador = ConversableAgent(
    name="Testador",
    system_message="Você escreve testes abrangentes. Cubra casos extremos e cenários de integração.",
    llm_config={"model": "gpt-4o"},
)

# Chat em grupo com seleção de orador round-robin ou por IA
chat_grupo = GroupChat(
    agents=[user_proxy, arquiteto, desenvolvedor, revisor, testador],
    messages=[],
    max_round=20,
    speaker_selection_method="auto",      # LLM escolhe o próximo orador com base no contexto
)

gerenciador = GroupChatManager(groupchat=chat_grupo, llm_config={"model": "gpt-4o"})

user_proxy.initiate_chat(
    gerenciador,
    message="Construa um serviço de notificações em tempo real com suporte a WebSocket, pub/sub Redis e limitação de taxa.",
)
# Arquiteto projeta → Desenvolvedor implementa → Revisor captura problemas → Desenvolvedor corrige → Testador adiciona testes

Uso de Ferramentas

from autogen import register_function

def buscar_codigo(consulta: str, padrao_arquivo: str = "*.py") -> str:
    """Busca padrões específicos na base de código.

    Args:
        consulta: Consulta de busca (regex suportado)
        padrao_arquivo: Padrão glob de arquivos para buscar
    """
    import subprocess
    resultado = subprocess.run(["grep", "-rn", consulta, "--include", padrao_arquivo, "."],
                           capture_output=True, text=True)
    return resultado.stdout[:2000]

def executar_testes(caminho_teste: str = "tests/") -> str:
    """Executa pytest no diretório de teste especificado.

    Args:
        caminho_teste: Caminho para arquivos de teste ou diretório
    """
    import subprocess
    resultado = subprocess.run(["python", "-m", "pytest", caminho_teste, "-v", "--tb=short"],
                           capture_output=True, text=True)
    return f"STDOUT:\n{resultado.stdout}\nSTDERR:\n{resultado.stderr}"

# Registrar ferramentas para agentes específicos
register_function(buscar_codigo, caller=desenvolvedor, executor=user_proxy,
    description="Busca na base de código por padrões de código")
register_function(executar_testes, caller=testador, executor=user_proxy,
    description="Executa testes para verificar a correção do código")

Instalação

pip install ag2                           # Ou: pip install pyautogen

Melhores Práticas

  1. Mensagens de sistema claras — Defina o papel de cada agente com precisão; instruções vagas levam a conversas sem foco
  2. Seleção de orador — Use auto para seleção de orador por LLM em chat em grupo; round_robin para fluxo previsível
  3. Condições de término — Defina is_termination_msg e max_consecutive_auto_reply; evite loops infinitos
  4. Docker para execução de código — Ative use_docker: True para execução segura de código; agentes podem executar código não confiável
  5. Supervisão humana — Use o modo TERMINATE para aprovação em ações críticas; NEVER para totalmente autônomo
  6. Registro de ferramentas — Registre ferramentas com pares específicos de chamador/executor; nem todos os agentes precisam de todas as ferramentas
  7. Chats aninhados — Use conversas aninhadas para subtarefas; o agente pode iniciar uma conversa paralela e retornar resultados
  8. Controle de custos — Defina max_round e max_consecutive_auto_reply; monitore o uso de tokens em chats em grupo

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

TerminalSkills/skills

>- Run GitHub Actions locally with act. Use when a user asks to test GitHub Actions workflows locally, debug CI pipelines without pushing, or run workflows offline.

TerminalSkills/skills

>- Generate short-form videos with AI — script writing, text-to-speech narration, stock footage selection, subtitle generation, and video assembly. Use when: creating TikTok/YouTube Shorts/Reels content, automating video production, building content pipelines.

TerminalSkills/skills

>- Animate 3D objects and characters in Blender with Python. Use when the user wants to keyframe properties, create armatures and rigs, set up IK/FK chains, animate shape keys for facial animation, edit F-Curves, use the NLA editor to blend actions, add drivers for expression-based animation, or script any animation workflow in Blender.

TerminalSkills/skills

>- Automate motion capture and tracking workflows in Blender with Python. Use when the user wants to import BVH or FBX mocap data, retarget motion to armatures, track camera or object motion from video, solve camera motion, clean up motion capture data, or script any tracking pipeline in Blender.

TerminalSkills/skills

>- You are an expert in Bolt.new by StackBlitz, the AI-powered full-stack development environment that runs entirely in the browser. You help developers go from idea to deployed app in minutes using natural language prompts — Bolt generates complete applications with frontend, backend, database, and deployment, all running in a WebContainer without local setup.

TerminalSkills/skills

>- Assists with using Bun as an all-in-one JavaScript/TypeScript runtime, package manager, bundler, and test runner. Use when building HTTP servers, managing packages, running tests, or migrating from Node.js. Trigger words: bun, bun serve, bun install, bun test, bun build, javascript runtime, bun runtime.

TerminalSkills/skills

>- Self-host customer support with Chatwoot. Use when a user asks to set up open-source customer support, add live chat without SaaS costs, build a multi-channel inbox, or deploy a free Intercom alternative.

TerminalSkills/skills

>- You are an expert in Chi, the lightweight, idiomatic Go HTTP router built on `net/http`. You help developers build composable HTTP services using Chi's middleware stack, route groups, URL parameters, sub-routers, and context-based request scoping — providing Express-like ergonomics while staying 100% compatible with Go's standard library.

TerminalSkills/skills

When the user wants to edit, review, or improve existing marketing copy. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' or 'copy sweep.' This skill provides a systematic approach to editing marketing copy through multiple focused passes.

TerminalSkills/skills

>- Add live chat and customer support with Crisp. Use when a user asks to add a chat widget, implement live customer support, set up a help desk, create a knowledge base, or add a chatbot to a website.

TerminalSkills/skills

>- Assists with building custom interactive data visualizations using D3.js. Use when creating charts, graphs, maps, force layouts, or hierarchical diagrams that require fine-grained control beyond what charting libraries provide. Trigger words: d3, data visualization, chart, svg, scales, force graph, treemap, choropleth.

TerminalSkills/skills

dbt (data build tool) transforms data in your warehouse using SQL SELECT statements. Learn project setup, models, tests, documentation, incremental materializations, and integration with data warehouses like PostgreSQL, BigQuery, and Snowflake.

TerminalSkills/skills

>- You are an expert in dlt, the open-source Python library for building data pipelines. You help developers load data from any API, file, or database into warehouses and lakes using simple Python decorators — with automatic schema inference, incremental loading, and built-in data contracts. dlt is the "requests library for data pipelines.

TerminalSkills/skills

Data Version Control for ML projects. Track large datasets and models alongside Git, build reproducible ML pipelines, and run experiments with metric comparison. Works with any storage backend including S3, GCS, Azure, and local filesystems.

TerminalSkills/skills

>- You are an expert in E2B, the cloud platform for running AI-generated code in secure sandboxes. You help developers give AI agents the ability to execute code, install packages, read/write files, and run long processes in isolated cloud environments — each sandbox is a lightweight VM that boots in ~150ms with full Linux, filesystem, and networking.

TerminalSkills/skills

>- Transcode, convert, edit, and process audio and video with FFmpeg. Use when a user asks to convert video formats (webm to mp4, mkv to mp4), extract audio from video, compress video files, trim or cut clips, concatenate videos, add subtitles, create thumbnails, apply filters, change resolution or bitrate, re-encode media, create GIFs from video, add watermarks, normalize audio, stream media, or build automated media processing pipelines.

TerminalSkills/skills

>- Create advanced animations with GSAP. Use when building complex timelines, scroll-driven animations, SVG morphing, text animations, or high-performance web animations beyond CSS capabilities.

TerminalSkills/skills

>- Generate deterministic MP4 videos from HTML, CSS, media, and seekable animations using HeyGen's HyperFrames framework. Use when someone asks to "render HTML to video", "make a video with HyperFrames", "create a programmatic video", "turn an animation into MP4", "build a launch/product video from HTML", "render GSAP/Lottie/Three.js to video", or set up an agent-driven video pipeline. Covers init/preview/render/add/lint/inspect commands, data-* timing attributes, animation adapters, and the component catalog.

TerminalSkills/skills

When the user wants to perform load testing, stress testing, or performance testing of APIs and websites using k6. Also use when the user mentions "k6," "load test," "performance test," "stress test," "spike test," "soak test," "thresholds," "virtual users," or "VUs." For browser-based testing, see selenium.

TerminalSkills/skills

>- Lovable (formerly GPT Engineer) is a browser-based AI app builder that turns a natural-language description into a working full-stack web app with a built-in backend, authentication, database and one-click publishing. Use when the user wants to prototype or ship a web app with Lovable, write effective Lovable prompts, connect Supabase or GitHub, review generated security rules, or move a Lovable project into their own editor.

Habilidades Relacionadas