Skip to content
Back to skills

2410 Production F969b214

ASecurity

Prepare Alloy commands for production: retries, timeouts, idempotency, logging, and observability (~6 minutes). Requires Python 3.10+ and `pip install alloy-ai`. ---

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added May 31, 2026
businesspythonapi

Works with

  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 2410-production_f969b214 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2410 Production F969b214?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2410 Production F969b214
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2410-production-f969b214/badge)](https://www.skillsdirectory.com/skills/tools-only-2410-production-f969b214)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Production

Prepare Alloy commands for production: retries, timeouts, idempotency, logging, and observability (~6 minutes). Requires Python 3.10+ and `pip install alloy-ai`.

---

## Retries and timeouts

Use global defaults via `configure(...)` or per‑call overrides.

```python
from alloy import configure

configure(retry=2, max_tokens=512)
```

## Idempotency

- Keep tools idempotent where possible; include natural keys in inputs.
- For external side‑effects, design explicit commit steps behind `@ensure`.

## Logging and diagnostics

- Add structured logging around command entry/exit and tool calls.
- Redact secrets/PII in logs (inputs/outputs).

## Observability

- See Observability for JSON logging with redaction hints and an advanced example.
- OpenTelemetry integration is under evaluation and will land post‑RFC.

## Errors

- `ConfigurationError`: misconfiguration or unsupported capability. Examples: missing/invalid model, provider SDK not installed, invalid strict output schema, unsupported streaming mode.
- `CommandError`: command failed to produce a final value. Examples: model returned empty output; parse failed for the requested type; provider error bubbled up and retries (if any) were exhausted.
- `ToolError`: raised by tools (often via `@require/@ensure`) and surfaced back to the model as the tool's output so it can adjust — not a hard failure by itself.
- `ToolLoopLimitExceeded`: too many tool turns; includes the last partial assistant text to aid recovery.

Retry behavior
- Per-command retries are controlled by `configure(retry=...)` and `retry_on=...`.
- If `retry_on` is unset, all exceptions are retried up to `retry` attempts; if set, only matching exceptions are retried.

Provider error surfaces
- Runtime API errors (e.g., HTTP 4xx/5xx) propagate from providers; the command wrapper converts them into `CommandError` after retries (unless explicitly handled).
- Configuration errors (e.g., SDK missing) are raised as `ConfigurationError` immediately.

Contracts guidance
- Use contracts for recoverable guidance. Surface exceptions that must stop a workflow; avoid overusing exceptions for control flow.

Files in this skill

  • README.md850 B
  • skill.md2.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.