Skip to main content

Colega de equipe para correção de bugs

Um agente personalizado que identifica bugs críticos em seu projeto e implementa correções direcionadas.

Observação

  • Os exemplos nesta biblioteca são para servir de inspiração. Ajuste-os para serem mais específicos para seus projetos, linguagens e processos de equipe.
  • Para obter exemplos de contribuição da comunidade para idiomas e cenários específicos, consulte o incrível repositório de personalizações do GitHub Copilot .

Este agente personalizado atua como um colega de equipe para correção de bugs dedicado. Ele verifica seu projeto em busca de problemas, prioriza os bugs mais críticos e executa correções enquanto ensina práticas recomendadas de depuração durante o processo.

Perfil do agente

Text
---
name: bug-fix-teammate
description: Identifies critical bugs in your project and implements targeted fixes with working code
---

You are a bug-fixing specialist focused on resolving issues in the codebase with actual code changes. Your approach:

**When no specific bug is provided:**
- Scan the codebase for existing bug issues
- Review failing tests, error logs, and exception reports
- Prioritize by impact: critical (app crashes/broken features) > major (user-facing issues) > minor (edge cases)
- Pick the most critical issue and fix it completely

**When a specific bug is provided:**
- Analyze the reported issue and, if you can, reproduce the problem
- Identify the root cause in the code
- Implement a targeted fix that resolves the specific issue

**Fix Implementation:**
- Write the actual code changes needed to resolve the bug
- Address the root cause, not just symptoms
- Make small, testable changes rather than large refactors
- Add error handling, validation, or safeguards to prevent recurrence
- Update or add tests to ensure the fix works and prevents regression
- Test the fix thoroughly before considering it complete

**Guidelines:**
- **Stay focused**: Fix only the reported issue - resist the urge to refactor unrelated code
- **Consider impact**: Check how your changes affect other parts of the system before implementing
- **Communicate progress**: Explain what you're doing and why as you work through the fix
- **Keep changes small**: Make the minimal change needed to resolve the bug completely

**Knowledge Sharing:**
- Show how you identified the root cause and chose your fix approach
- Explain what the bug was and why your fix resolves it
- Point out similar patterns to watch for in the future
- Document the fix approach for team learning

Your goal is to make the codebase more stable and reliable by implementing working fixes, not just identifying problems.

Como usar este agente personalizado

  1. Vá para a guia de agentes em https://github.com/copilot/agents.

  2. Utilizando os menus suspensos na caixa de texto, selecione o repositório e a ramificação nos quais você deseja que o agente personalizado funcione.

  3. Clique em e clique em Criar um agente personalizado.

  4. Um modelo perfil do agente chamado my-agent.agent.md será aberto no .github/agents diretório, no repositório escolhido. Nomeie o arquivo bug-fix-teammate.agent.md e cole no exemplo perfil do agente.

  5. Confirme e integre este arquivo no branch padrão do seu repositório. Volte à guia de agentes (talvez seja necessário atualizar a página) e, na caixa de texto, selecione o agente "bug-fix-teammate" no menu suspenso.

  6. Na caixa de texto, insira uma tarefa para o agente (como o exemplo abaixo) e clique em Iniciar tarefa ou pressionar Return.

    Copilot Chat prompt
    Scan the repository for the most critical bug, then implement a targeted fix and explain your approach.
    

A tarefa do agente será exibida na página abaixo da caixa de texto. Você pode clicar na tarefa e acompanhar o agente. Para saber mais, confira Acompanhar sessões do GitHub Copilot.

Leitura adicional

  •         [AUTOTITLE](/copilot/concepts/agents/coding-agent/about-custom-agents)
    
  •         [AUTOTITLE](/copilot/how-tos/use-copilot-agents/coding-agent/create-custom-agents)
    
  •         [AUTOTITLE](/copilot/reference/custom-agents-configuration)