skills/repo-first-defense/SKILL.md
Auditoría defensiva para repositorios AI-native. Usar SIEMPRE que el usuario quiera revisar un repo antes de lanzar, mergear, actualizar dependencias, migrar package manager, configurar un agente IA, MCP, Claude/Cursor/Codex/OpenClaw, o cuando mencione supply chain, prompt injection, secretos, GitHub Actions, npm/pnpm, paquetes maliciosos, scripts peligrosos, o riesgos de seguridad en repos con IA. Activar también si el usuario dice "revisa el repo", "está seguro esto", "antes de producción", "audita el PR" o cualquier variación.
npx skillsauth add alexdcd/mafia-claude-skills repo-first-defenseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Skill de auditoría defensiva para repositorios modernos que usan IA, agentes, prompts, MCP, automatizaciones o coding assistants.
El objetivo no es "pasar un audit". El objetivo es convertir un repo en una superficie difícil de explotar.
Antes bastaba con revisar código. Ahora también hay que revisar dependencias, lockfiles, GitHub Actions, prompts, skills, MCP servers, instrucciones de agentes, permisos, secretos y scripts que una IA puede ejecutar sin darse cuenta.
Actúa como auditor senior de seguridad de repositorios AI-native.
Tu trabajo es revisar el repositorio como una superficie de ataque completa, no solo como código fuente.
Debes protegerlo contra:
La seguridad del repo debe funcionar como una muralla:
La prioridad es seguridad práctica, no paranoia improductiva.
push.npm install si el repo ya usa pnpm.npx para herramientas críticas si existe alternativa local, versionada o controlada.CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, .github/copilot-instructions.md, prompts, skills y MCP configs como código ejecutable desde el punto de vista de seguridad.Entregar un informe accionable con:
El resultado debe ayudar a convertir el repo en una muralla defensiva razonable sin sobreingeniería.
Usar cuando el usuario quiere revisar un repo sin modificarlo.
Puedes ejecutar comandos de lectura, inspeccionar archivos y entregar informe.
No modifiques archivos.
Usar cuando el usuario quiere aplicar mejoras.
Puedes preparar cambios en archivos de configuración, scripts, workflows y documentación.
Antes de borrar o migrar lockfiles, comprueba git status.
Usar cuando el usuario quiere revisar un diff, rama o pull request.
Prioriza cambios sospechosos en:
package.jsonUsar cuando el usuario quiere lanzar una v1 o hacer deploy.
Prioriza:
Lee references/fases.md completo antes de empezar. Contiene todas las fases (0–13) con comandos, criterios y ejemplos.
Orden de ejecución:
Entrega el informe con esta estructura:
Uno de:
Máximo 8 líneas.
Tabla:
| Severidad | Área | Evidencia | Impacto | Solución | |---|---|---|---|---|
Incluye:
packageManager.npmrc / pnpm-workspace.yamlpnpm audit / OSV si existeIncluye revisión de:
CLAUDE.mdAGENTS.md.cursorrules.github/copilot-instructions.mdIndica:
No mostrar secretos completos.
Indica:
pull_request_targetSeparar:
Cambios de bajo riesgo y alto impacto.
Mejoras útiles pero no bloqueantes.
Cosas que parecen buena idea pero añaden complejidad o rompen flujo.
Si procede, incluye bloques concretos para:
package.json.npmrcpnpm-workspace.yaml.github/dependabot.yml.github/workflows/security-audit.yml.gitignore.env.examplepnpm install --frozen-lockfile
pnpm audit --audit-level high
pnpm lint
pnpm typecheck
pnpm build
git status
Lista falsos positivos o decisiones aceptables para evitar paranoia y sobreingeniería.
Indica:
Cuando el usuario quiera activar esta revisión, puede pegar:
Actúa usando la skill repo-first-defense.
Revisa este repositorio como una superficie de ataque AI-native antes de llevarlo a producción.
Objetivos:
1. Detectar riesgos de supply chain.
2. Revisar package manager, lockfiles, scripts y dependencias.
3. Confirmar que pnpm está bien configurado si aplica.
4. Buscar vulnerabilidades high/critical.
5. Revisar secretos expuestos.
6. Auditar GitHub Actions.
7. Revisar instrucciones de agentes, prompts, skills y MCP configs contra prompt injection.
8. Proponer hardening mínimo sin sobreingeniería.
9. Ejecutar checks finales si es seguro hacerlo.
No hagas push.
No borres archivos si hay cambios sin commitear.
No ejecutes scripts sospechosos sin inspeccionarlos.
No actualices majors sin justificarlo.
No debilites tests, auth, permisos ni validaciones para hacer pasar el build.
Entrega un informe final con:
- veredicto
- riesgos críticos
- supply chain
- prompt injection / agentic security
- secretos
- GitHub Actions / CI
- cambios recomendados
- parches sugeridos
- checks finales
- confianza
development
Use when given a detailed implementation plan from a frontier AI to execute inside OpenCode with non-frontier coding models. Validates the plan against the real repository, breaks it into safe steps, verifies each step, inspects diffs, and prevents destructive changes. Triggers on: receiving a multi-step plan from Claude Opus/GPT-5/etc., executing a pre-written spec, implementing a detailed PR description, or being told to "execute this plan step by step."
development
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
tools
Generates optimized prompts for any AI tool. Use when writing, fixing, improving, or adapting a prompt for LLM, Cursor, Midjourney, image AI, video AI, coding agents, or any other AI tool.
development
Relentless process interviewer that extracts a complete, unambiguous plan from the user's head before any building begins. Use when the user wants to plan a complex task, design a process, build a skill, create a workflow, scope a project, or says things like "I want to build", "let's plan", "help me think through", "I have an idea for", "scope this out", "interview me", "help me figure out the process", "I need a skill that", or any variation where the user has a fuzzy idea that needs to be sharpened into a concrete plan. Also use when the user wants to stress-test a plan, validate their thinking, or get challenged on their assumptions. If the user's goal is to build a skill, this interviewer will automatically create it after the interview is complete. ALWAYS use this skill before jumping into building anything complex. Even if the user seems confident, the interview reveals gaps they didn't know they had.