library-development

Development guidance for strands-compose, a Python library that reads YAML configuration and creates connected agent, model, tool, session, and MCP objects.

In plain words
What is it for?
Use it when changing configuration schemas, loaders, resolvers, orchestration, streaming, manifests, or the command-line interface.
Why use it?
It keeps new library code consistent with the existing design and with the APIs provided by its dependencies.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/strands-compose/sdk-python/library-development
Any agent
npx skills add strands-compose/sdk-python --skill library-development
Clone the repo
git clone --depth 1 https://github.com/strands-compose/sdk-python

Made for: Claude Code, Codex.

Per session 70 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,158 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found 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 $0.00070 $0.04158
Opus 5 $0.00035 $0.02079
Sonnet 5 $0.00014 $0.00832
Haiku 4.5 $0.00007 $0.00416

Measured yesterday against content hash a1268bf9e3d8, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

library-development scanned grade A with 0 findings 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.kiro/skills/library-development/SKILL.md · 321 lines

How it starts

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

Library Development

Rules for the strands-compose library in src/strands_compose/ (Python ≥ 3.11 + Pydantic v2 + strands-agents + PyYAML + MCP). They describe the mental model and conventions, not the current set of files — sections, providers, and orchestration modes come and go, the shape stays.

strands-compose does exactly one thing: read YAML and hand back fully wired, plain strands objects — no wrappers, no subclasses. Everything agent-, model-, session-, tool-, or MCP-related is provided by strands. Before building anything that touches those, check the installed SDK (.venv/lib/python*/site-packages/strands/) and use what it provides rather than re-implementing it. When in doubt about upstream APIs, use the strands-api-lookup skill.

Before creating anything new, read a sibling that plays the same role and copy its shape. Matching the existing pattern matters more than any rule below. See references/project-map.md for where each role lives and what to read first — load it whenever you are unsure where something goes.


Core Principles — NON-NEGOTIABLE

  1. Strands-first — if strands provides it, import and use it directly; never re-implement it. This library is a translator, not a framework.
  2. Thin wrapper — translate YAML to strands objects, then get out of the way. Return plain Agent / Swarm / Graph / Model / MCPClient, never a subclass or proxy.
  3. The pipeline flows one way — text -> dict -> validated schema -> live objects. Never resolve during parsing; never parse during resolution (see The Pipeline).
  4. Explicit over implicit — no auto-registration, no global singletons, no hidden state. Every object is wired by hand and passed as an argument.
  5. Single responsibility — each module does one thing; one resolver per config concept, one builder per orchestration mode.
  6. Composition over inheritance — small functions and focused modules that compose. The only base classes are the strands-facing ones (e.g. HookProvider).
  7. Smallest reasonable change — don't refactor unrelated code to land a feature.

Read the full file on GitHub · 321 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. yesterday First seen · 321 lines · 70 tokens per session scan A a1268bf9e3d8

Subscribe to this mod's changes

library-development is a skill published in the GitHub repository strands-compose/sdk-python (5 stars, last pushed 17d ago), licensed Apache-2.0. It adds 70 tokens to every session and 4,158 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

agent-creator

Create and update AgentCore runtime agents in a DEPLOYED instance of this accelerator. Use whenever the user wants to create a new agent, build an orchestrator/swarm/graph agent, add or remove tools/MCP-servers/skills from an existing agent, change an agent's model or system prompt, or otherwise modify a live runtime…

aws-samples/sample-agentic-chatbot-accelerator · 97 tokens

prep-pr

Prepare a development branch for a pull request to main. Run /code-review and ASH security scan, auto-fix high-confidence issues, then draft a PR title and body. Use this whenever the user signals intent to open a PR ("create a PR", "open a PR", "ready to PR", "submit PR", "PR this branch", "let's PR this"), even if…

aws-samples/sample-agentic-chatbot-accelerator · 103 tokens

mirror-cdk-to-terraform

Propose a Terraform mirror plan for the most recent CDK commit on this branch. Use whenever the user has just committed CDK changes and says things like "mirror this to terraform", "propose tf changes", "what's the terraform equivalent", "tf follow-up", "sync to terraform", or any variation that signals they want the…

aws-samples/sample-agentic-chatbot-accelerator · 120 tokens

iac-config-generator

Generate matching CDK config.yaml and Terraform terraform.tfvars files from a short description of the features the user wants to deploy (Knowledge Base, Data Processing, AgentCore Runtime, Observability, Experiments, MCP servers, Evaluator, etc.). Use whenever the user says things like "generate a config", "create my…

aws-samples/sample-agentic-chatbot-accelerator · 140 tokens

spec-design

Turn a specs/ .yaml spec into an AI-DLC design-doc.md, entering the pipeline at the design phase (spec is already-refined requirements, so story/refine are skipped).

aws-samples/sample-agentic-chatbot-accelerator · 39 tokens

tasks

Expand a design doc's task map into a tasks/ folder — a README index plus one file per subtask.

aws-samples/sample-agentic-chatbot-accelerator · 22 tokens