Saltar al contenido
Skillpedia
Programación general48 mil · #4014

bash-defensive-patterns

Qué hace

Esta herramienta te ayuda a escribir scripts de línea de comandos (Bash) más seguros y fiables. Te enseña a evitar errores comunes y a asegurarte de que tus scripts funcionen bien, incluso en situaciones inesperadas.

Cuándo usarla

  • ✓Cuando creas scripts para automatizar tareas en tu ordenador.
  • ✓Cuando construyes herramientas que se ejecutan en servidores o en la nube.
  • ✓Cuando necesitas que tus scripts sean robustos y no fallen con facilidad.

Link de la skill

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/bash-defensive-patterns/SKILL.md

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/bash-defensive-patterns/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“¿Cómo puedo escribir un script de Bash que compruebe si un archivo existe antes de intentar borrarlo?”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta sugiere buenas prácticas, como revisar lo que va a hacer el script, asegurarse de que la información que recibe es correcta y configurarlo para que informe de los errores.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de GitHub.

Bash Defensive Patterns

Comprehensive guidance for writing production-ready Bash scripts using defensive programming techniques, error handling, and safety best practices to prevent common pitfalls and ensure reliability.

Use this skill when

  • Writing production automation scripts
  • Building CI/CD pipeline scripts
  • Creating system administration utilities
  • Developing error-resilient deployment automation
  • Writing scripts that must handle edge cases safely
  • Building maintainable shell script libraries
  • Implementing comprehensive logging and monitoring
  • Creating scripts that must work across different platforms

Do not use this skill when

  • You need a single ad-hoc shell command, not a script
  • The target environment requires strict POSIX sh only
  • The task is unrelated to shell scripting or automation

Instructions

  1. Confirm the target shell, OS, and execution environment.
  2. Enable strict mode and safe defaults from the start.
  3. Validate inputs, quote variables, and handle files safely.
  4. Add logging, error traps, and basic tests.

Safety

  • Avoid destructive commands without confirmation or dry-run flags.
  • Do not run scripts as root unless strictly required.

Refer to resources/implementation-playbook.md for detailed patterns, checklists, and templates.

Resources

  • resources/implementation-playbook.md for detailed patterns, checklists, and templates.

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
Preguntas frecuentes

¿Qué son los 'scripts de Bash'?

Son pequeñas secuencias de comandos que escribes para que el ordenador realice una tarea de forma automática.

¿Por qué necesito 'scripts defensivos'?

Para evitar que tus scripts causen problemas accidentales, como borrar archivos importantes o detenerse de forma inesperada.

¿Esta herramienta escribe el script por mí?

No, te enseña buenas prácticas para que puedas escribir tú mismo scripts mejores y más seguros.

Detalles

Descripción original del autor

Master defensive Bash programming techniques for production-grade scripts. Use when writing robust shell scripts, CI/CD pipelines, or system utilities requiring fault tolerance and safety.

repo: sickn33/agentic-awesome-skills

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#4014
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas