Use this skill when writing shell scripts, Python automation, or any unattended batch job. Ensure failures are detected, logged, and handled — never silently ignored.
64
77%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./memory_data/skills/robust-error-handling-in-scripts/SKILL.mdShell scripts:
set -euo pipefail # Exit on error, undefined var, pipe failure
trap 'echo "Failed at line $LINENO"' ERRPython scripts:
import logging, sys
logging.basicConfig(level=logging.INFO, format='%(asctime)s %(levelname)s %(message)s')
try:
main()
except Exception as e:
logging.exception("Unhandled error: %s", e)
sys.exit(1)Retry with backoff for transient network/API failures:
from tenacity import retry, stop_after_attempt, wait_exponential
@retry(stop=stop_after_attempt(3), wait=wait_exponential(min=2, max=10))
def call_api(): ...922caf3
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.