Agent skill

error-recovery

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/error-recovery-skill

SKILL.md

Error Recovery SKILL

Retry Logic

python
from tenacity import retry, stop_after_attempt, wait_exponential

@retry(
    stop=stop_after_attempt(3),
    wait=wait_exponential(multiplier=1, min=4, max=10)
)
def query_with_retry(query):
    return rag_chain.invoke(query)

Fallback Chain

python
try:
    result = primary_retriever.get_relevant_documents(query)
except Exception:
    result = fallback_retriever.get_relevant_documents(query)

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results