servicenow-atlas: Skill for Claude Code

.agents/skills/python-resilience/SKILL.md

python-resilience is a skill for Claude Code, Codex from sagar-shirwalkar/servicenow-atlas. It costs 47 tokens per session (2,454 once invoked), scanned B, a copy of python-resilience, Apache-2.0.

A set of Python patterns for dealing with temporary failures in services and network calls, including retries, time limits, and circuit breakers. Exponential backoff means waiting longer between repeated attempts.

In plain words
What is it for?
Use it when adding bounded retries, timeouts, backpressure handling, fault-tolerant service calls, or infrastructure decorators.
Why use it?
It helps applications remain usable when an external service is slow, unavailable, rate-limited, or briefly failing.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is sagar-shirwalkar/servicenow-atlas's own configuration. It tells Claude Code and Codex how to work on servicenow-atlas itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything servicenow-atlas configures →

Reuse

Borrowing it

Nothing to install: this file belongs to sagar-shirwalkar/servicenow-atlas. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/sagar-shirwalkar/servicenow-atlas/main/.agents/skills/python-resilience/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/sagar-shirwalkar/servicenow-atlas

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for python-resilience

README.md
[![agentmods](https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/python-resilience/github.svg)](https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/python-resilience)
Your own site
<a href="https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/python-resilience"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/python-resilience/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for python-resilience

Your own site · 80×15
<a href="https://agentmods.dev/skills/sagar-shirwalkar/servicenow-atlas/python-resilience"><img src="https://agentmods.dev/badge/skills/sagar-shirwalkar/servicenow-atlas/python-resilience.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin 89% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00047 $0.02454
Opus 5 $0.00023 $0.01227
Sonnet 5 $0.00009 $0.00491
Haiku 4.5 $0.00005 $0.00245

Measured 12d ago against content hash 5662dd15560b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade B, and why

python-resilience scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

return httpx.post("https://api.example.com", json=request).json()
Origin

This is a copy

89% identical to python-resilience — 185 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.agents/skills/python-resilience/SKILL.md · 377 lines

How it starts

The opening of the file, as written. The whole thing — 377 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Python Resilience Patterns

Build fault-tolerant Python applications that gracefully handle transient failures, network issues, and service outages. Resilience patterns keep systems running when dependencies are unreliable.

When to Use This Skill

  • Adding retry logic to external service calls
  • Implementing timeouts for network operations
  • Building fault-tolerant microservices
  • Handling rate limiting and backpressure
  • Creating infrastructure decorators
  • Designing circuit breakers

Core Concepts

1. Transient vs Permanent Failures

Retry transient errors (network timeouts, temporary service issues). Don't retry permanent errors (invalid credentials, bad requests).

2. Exponential Backoff

Increase wait time between retries to avoid overwhelming recovering services.

3. Jitter

Add randomness to backoff to prevent thundering herd when many clients retry simultaneously.

4. Bounded Retries

Cap both attempt count and total duration to prevent infinite retry loops.

Quick Start

from tenacity import retry, stop_after_attempt, wait_exponential_jitter

@retry(
    stop=stop_after_attempt(3),
    wait=wait_exponential_jitter(initial=1, max=10),
)
def call_external_service(request: dict) -> dict:
    return httpx.post("https://api.example.com", json=request).json()

Fundamental Patterns

Pattern 1: Basic Retry with Tenacity

Use the tenacity library for production-grade retry logic. For simpler cases, consider built-in retry functionality or a lightweight custom implementation.

from tenacity import (
    retry,
    stop_after_attempt,
    stop_after_delay,
    wait_exponential_jitter,
    retry_if_exception_type,
)

TRANSIENT_ERRORS = (ConnectionError, TimeoutError, OSError)

@retry(
    retry=retry_if_exception_type(TRANSIENT_ERRORS),
    stop=stop_after_attempt(5) | stop_after_delay(60),
    wait=wait_exponential_jitter(initial=1, max=30),
)
def fetch_data(url: str) -> dict:
    """Fetch data with automatic retry on transient failures."""
    response = httpx.get(url, timeout=30)
    response.raise_for_status()
    return response.json()

Read the full file on GitHub · 377 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 377 lines · 47 tokens per session scan B 5662dd15560b

Subscribe to this mod's changes

python-resilience is a skill published in the GitHub repository sagar-shirwalkar/servicenow-atlas (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 47 tokens to every session and 2,454 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 1 finding (sends data to an external url). It is 89% identical to python-resilience, differing in 185 lines, and is treated as a copy.