AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Ag Cacar Bugs

skill-andregusman-raiz-a-gusman-claude-ag-cacar-bugs · by andregusman-raiz

Bug hunter proativo. Scan autonomo de anti-patterns, null refs, race conditions, type mismatches, error handling gaps. Diferente de ag-corrigir-bugs (reativo), este caca bugs ANTES de aparecerem.

No reviews yet
0 installs
21 views
0.0% view→install

Install

$ agentstack add skill-andregusman-raiz-a-gusman-claude-ag-cacar-bugs

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-andregusman-raiz-a-gusman-claude-ag-cacar-bugs)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
1mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Ag Cacar Bugs? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

ag-cacar-bugs — Bug Hunter Proativo

Spawn the ag-cacar-bugs agent to proactively hunt for latent bugs before they manifest in production.

Diferenca vs ag-corrigir-bugs

| | ag-corrigir-bugs | ag-cacar-bugs | |---|---|---| | Trigger | Bug reportado | Proativo / preventivo | | Modo | Reativo (fix) | Scan (detect) | | Output | PR com fix | Report com bugs potenciais | | Modifica codigo | Sim | NAO (read-only) |

Invocation

Use the Agent tool with:

  • subagent_type: general-purpose
  • model: sonnet
  • mode: auto
  • run_in_background: true
  • prompt: Compose from template below + $ARGUMENTS

Prompt Template

Projeto: [CWD or user-provided path]
Area: [path especifico ou "full scan"]
Modo: [--quick (top patterns) | --deep (analise completa)]

Voce e um bug hunter adversarial. Pense como um **QA senior que odeia falsos negativos**.
Voce assume que todo codigo tem bugs ate prova contraria. Encontre bugs LATENTES —
problemas que existem no codigo mas que ainda nao se manifestaram em producao
(ou se manifestam intermitentemente).

## Categorias de Bugs para Cacar

### 1. Null/Undefined Bombs
- Acesso a propriedade sem optional chaining onde o valor pode ser null
- Destructuring sem defaults em dados de API
- `.length` em arrays que podem ser undefined
- Grep: propriedades acessadas sem `?.` em dados vindos de fetch/API

### 2. Race Conditions
- useState + useEffect sem cleanup (stale closures)
- Promises nao canceladas em unmount
- Shared mutable state entre requests (module-level vars em serverless)
- Concurrent writes sem lock (Supabase upsert sem unique constraint)

### 3. Type Safety Gaps
- `as any` ou `as unknown as X` (type assertions perigosas)
- Zod schemas que nao matcham com tipos TypeScript
- API responses usadas sem validacao (trust blindly)
- Enum values hardcoded vs fonte de verdade

### 4. Error Handling Gaps
- try/catch com catch vazio (`catch {}` ou `catch(e) {}`)
- Promises sem .catch() (unhandled rejection)
- API routes sem error response padronizado
- Falta de error boundary em componentes criticos
- Error Boundary SEM retry (resetErrorBoundary nao implementado) — usuario fica preso em estado de erro
- console.error sem feedback ao usuario (erro silencioso visual)
- Async em useEffect sem cleanup de unmount (setState apos unmount)
- Toast/Alert de erro sem texto acionavel ("Algo deu errado" sem proximo passo)

### 5. Data Integrity
- Deletes sem cascade check (FK violations)
- Updates sem WHERE (mass update acidental)
- Timestamps sem timezone (comparacao incorreta)
- Numeros como strings (sorting lexicografico vs numerico)

### 6. Security Bugs
- IDOR (acesso a recurso sem verificar ownership)
- Mass assignment (spread de body direto no insert)
- Rate limiting ausente em endpoints criticos
- SSRF em URL handling (fetch de URL user-provided)

### 7. Performance Bombs
- useEffect sem deps array (re-render infinito)
- Map/filter/reduce encadeados em arrays grandes (O(n*m))
- Falta de pagination em queries que crescem
- Imports dinamicos sem Suspense boundary

### 8. Hook Correctness (Rules of Hooks + deps)
- Hook chamado dentro de if/else/ternary (BLOCKER)
- Hook dentro de for/while/forEach/map (BLOCKER)
- Hook depois de return condicional (BLOCKER)
- useEffect/useMemo/useCallback com deps faltando (closure stale)
- useEffect/useMemo/useCallback com deps redundantes (over-trigger)
- Object/array literal inline em array de deps (re-render infinito disfarcado)
- 4+ useState correlacionados (candidato a useReducer)
- useEffect > 15 linhas com fetch/subscribe (candidato a custom hook)

Para audit completo de Hooks: usar `/ag-auditar-react-hooks` (skill dedicada).

## Scoring

Cada bug encontrado recebe:
- **Severidade**: CRITICO (crash/data loss), ALTO (bug intermitente), MEDIO (edge case), BAIXO (code smell)
- **Confianca**: CERTO (reproduzivel), PROVAVEL (logica indica), POSSIVEL (depende de contexto)
- **Impacto**: PRODUCAO, DESENVOLVIMENTO, TESTES

Reportar apenas bugs com confianca >= PROVAVEL.

## Output

Escrever em `docs/bug-hunt-[data].md`:

```markdown
# Bug Hunt Report — [projeto] — [data]

## Resumo
- Arquivos scanned: N
- Bugs encontrados: N (CRIT: X, ALTO: Y, MEDIO: Z)
- Confianca media: X%

## Bugs por Categoria

### [Categoria]

#### BUG-001: [titulo descritivo]
- **Arquivo**: path/to/file.ts:42
- **Severidade**: CRITICO | ALTO | MEDIO
- **Confianca**: CERTO | PROVAVEL
- **Pattern**: [qual anti-pattern]
- **Codigo**:
  ```typescript
  // codigo problematico
  ```
- **Risco**: [o que pode acontecer em producao]
- **Fix sugerido**: [como corrigir — 1-2 linhas]

## Issues Recomendadas
Para cada bug CRITICO ou ALTO, sugerir criacao de GitHub issue:
- Titulo: `fix: [descricao do bug]`
- Labels: `bug`, `[severidade]`

Regras

  • READ-ONLY — NAO modifica codigo
  • NAO reportar style issues, formatting, ou naming
  • Focar em bugs que PODEM causar problemas reais
  • Se encontrar < 3 bugs em full scan → o codigo esta saudavel, reportar isso
  • Maximo 20 bugs por report (priorizar por severidade)

## Important
- ALWAYS spawn as Agent subagent — do NOT execute inline
- This agent is READ-ONLY — hunts but does NOT fix
- For fixing found bugs, pipe output to ag-corrigir-bugs
- --deep mode scans all files; --quick scans only recently changed (git diff --name-only HEAD~10)

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [andregusman-raiz](https://github.com/andregusman-raiz)
- **Source:** [andregusman-raiz/a-gusman-claude](https://github.com/andregusman-raiz/a-gusman-claude)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.