Python Resilience
Handles Python script errors gracefully, automatically retries failed tasks, and logs detailed recovery information.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add python-resilience npx -- -y @trustedskills/python-resilience
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"python-resilience": {
"command": "npx",
"args": [
"-y",
"@trustedskills/python-resilience"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
The python-resilience skill provides tools and techniques to build robust Python applications that can handle failures gracefully, recover from errors, and maintain stability under varying conditions. It includes features like retry mechanisms, circuit breakers, timeouts, and fallback strategies.
When to use it
- Handling external API calls that may fail intermittently or time out
- Ensuring reliability in microservices communication where dependencies might be unstable
- Building systems that can recover from transient errors without crashing
Key capabilities
- Retry logic for failed operations
- Circuit breaker pattern to prevent cascading failures
- Timeout management for blocking operations
- Fallback strategies to provide default responses during failures
Example prompts
- "Implement a retry mechanism with exponential backoff for this API call."
- "Add a circuit breaker to this service so it stops calling a failing dependency after three attempts."
- "Set up timeouts and fallback responses for database queries that take too long."
Tips & gotchas
- Ensure proper configuration of retry limits to avoid infinite loops or excessive resource usage.
- Use monitoring tools to track failures and adjust circuit breaker thresholds based on real-world behavior.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.