Agent skill
audit-rene-kuhm-opencode-ohmyopencod
Auditoría completa del proyecto: dependencias, seguridad, performance, código. Genera reporte actionable.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/audit-rene-kuhm-opencode-ohmyopencod
SKILL.md
Audit Skill
Realiza una auditoría completa del proyecto y genera un reporte con acciones recomendadas.
Tipos de Auditoría
1. FULL - Auditoría Completa
Ejecuta todas las auditorías y genera un reporte consolidado.
/audit full
/audit # Default es full
2. SECURITY - Seguridad
/audit security
Verifica:
- Vulnerabilidades en dependencias (
npm audit) - Secrets en código (patterns de API keys)
- Headers de seguridad
- OWASP Top 10 issues
- Archivos sensibles expuestos
Comandos:
# NPM audit
pnpm audit --json
# Buscar secrets hardcodeados
grep -rE "(api[_-]?key|secret|password|token)\s*[:=]\s*['\"][^'\"]{8,}" src/
# Buscar TODO/FIXME de seguridad
grep -rE "(TODO|FIXME).*(security|auth|password)" src/
3. DEPS - Dependencias
/audit deps
Verifica:
- Dependencias desactualizadas
- Dependencias no utilizadas
- Dependencias duplicadas
- Licencias incompatibles
- Bundle size impact
Comandos:
# Outdated
pnpm outdated
# Unused dependencies
npx depcheck
# Bundle analysis
npx @next/bundle-analyzer
4. PERFORMANCE - Rendimiento
/audit performance
Verifica:
- Bundle size
- Lighthouse metrics
- N+1 queries
- Memory leaks potenciales
- Imágenes sin optimizar
Patterns a buscar:
// N+1 queries
/for.*await.*find/
// Re-renders innecesarios
/style=\{\{/
/onClick=\{\(\) =>/
// Imports pesados
/import \* as/
/from 'lodash'/
5. CODE - Calidad de Código
/audit code
Verifica:
- TypeScript strict compliance
- ESLint/Biome violations
- Code coverage
- Complejidad ciclomática
- Code smells
Comandos:
# TypeScript
pnpm tsc --noEmit
# Lint
pnpm biome check .
# Coverage
pnpm vitest run --coverage
Reporte de Auditoría
Formato de Salida
# 🔍 Project Audit Report
**Project:** my-project
**Date:** 2024-12-25
**Version:** 1.0.0
## Executive Summary
| Category | Status | Issues | Critical |
|----------|--------|--------|----------|
| Security | 🟡 | 3 | 1 |
| Dependencies | 🟢 | 2 | 0 |
| Performance | 🟡 | 5 | 0 |
| Code Quality | 🟢 | 1 | 0 |
**Overall Score: 78/100**
---
## 🔴 Critical Issues
### 1. SQL Injection Vulnerability
**File:** `src/services/user.service.ts:42`
**Severity:** Critical
**Description:** Direct string interpolation in SQL query
**Fix:**
```typescript
// Before
const query = `SELECT * FROM users WHERE id = ${id}`;
// After
const query = `SELECT * FROM users WHERE id = $1`;
await db.query(query, [id]);
🟠 High Priority
2. Outdated Dependency with Known Vulnerability
Package: [email protected]
Vulnerability: CVE-2023-XXXXX
Fix: pnpm update axios
🟡 Medium Priority
3. Missing Rate Limiting
File: src/app/api/login/route.ts
Recommendation: Add rate limiting to prevent brute force
🟢 Low Priority / Suggestions
4. Bundle Size Optimization
Current: 450KB Suggestion: Use dynamic imports for Chart component
Action Items
| Priority | Action | Owner | Effort |
|---|---|---|---|
| 🔴 P0 | Fix SQL injection | - | 1h |
| 🟠 P1 | Update axios | - | 15m |
| 🟡 P2 | Add rate limiting | - | 2h |
| 🟢 P3 | Optimize bundle | - | 4h |
Commands to Run
# Fix vulnerabilities
pnpm audit fix
# Update dependencies
pnpm update
# Run full lint
pnpm biome check --write .
## Opción --fix
Cuando se usa `--fix`, intenta corregir automáticamente:
- Actualizar dependencias menores
- Correr `pnpm audit fix`
- Aplicar fixes de Biome
- Formatear código
```bash
/audit full --fix
Proceso
- Detectar tipo de proyecto (Next.js, Node, etc.)
- Ejecutar checks correspondientes
- Analizar resultados
- Clasificar issues por severidad
- Generar reporte
- Sugerir comandos de fix
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?