Skip to content
Back to skills

2938 Equivalence 6271e1c3

ASecurity

This page maps common “agent SDK” patterns to Alloy’s simpler primitives. The goal is the same functionality with less surface area and clearer types.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
toolspythongogit

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2938-equivalence_6271e1c3 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2938 Equivalence 6271e1c3?

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

Security grade badge for 2938 Equivalence 6271e1c3
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2938-equivalence-6271e1c3/badge)](https://www.skillsdirectory.com/skills/tools-only-2938-equivalence-6271e1c3)

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

SKILL.md
# Equivalence Guide

This page maps common “agent SDK” patterns to Alloy’s simpler primitives. The
goal is the same functionality with less surface area and clearer types.

## Agents with tools → Command with tools

- SDK: Define an agent and attach tools the model can call.
- Alloy: Write Python tools with `@tool`, then declare a `@command(..., tools=[...])`.

See: [`examples/30-tools/02_command_with_tools.py`](https://github.com/lydakis/alloy/blob/main/examples/30-tools/02_command_with_tools.py).

## Deterministic workflows → Chain commands

- SDK: Orchestrate multiple agents (research → draft → edit).
- Alloy: Chain typed commands; pass outputs as inputs.

See: [`examples/50-composition/03_recursive_analysis.py`](https://github.com/lydakis/alloy/blob/main/examples/50-composition/03_recursive_analysis.py).

## Parallel agents → asyncio.gather on .async_()

- SDK: Run agents in parallel.
- Alloy: Call `.async_()` on commands and `await asyncio.gather(...)`.

Tip: call `.async_()` and use `await asyncio.gather(...)` to run commands concurrently.

## Handoffs → Routing command

- SDK: Agent handoffs/transfer.
- Alloy: A small routing command decides and you call the specialized command.

See: [`examples/50-composition/02_routing_triage.py`](https://github.com/lydakis/alloy/blob/main/examples/50-composition/02_routing_triage.py).

## Dynamic system prompts → ask(..., system=...) or configure(...)

- SDK: Dynamic system messages.
- Alloy: Set `system` per call (`ask(..., system=...)`) or as a default via `configure(default_system=...)`.

Tip: pass a `system` per call or set a default via `configure(default_system=...)`.

## Streaming outputs → .stream() / ask.stream_async()

- SDK: Stream token deltas or high‑level events.
- Alloy: Stream text chunks (`Iterable[str]` or `AsyncIterable[str]`).

See: [`examples/80-patterns/04_streaming_updates.py`](https://github.com/lydakis/alloy/blob/main/examples/80-patterns/04_streaming_updates.py) and [`examples/80-patterns/08_streaming_limits.py`](https://github.com/lydakis/alloy/blob/main/examples/80-patterns/08_streaming_limits.py).

## Lifecycle hooks → Wrap calls (optional)

Alloy doesn’t expose built‑in lifecycle hooks. If needed, wrap calls in your app
layer (e.g., log start/stop around calling a command) or introduce a tiny helper
decorator. This keeps the core library small and predictable.

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.