yait-aichain

yait-aichain is a skill for Claude Code, Codex from yaitio/aichain. It costs 193 tokens per session (1,528 once invoked), scanned A, a copy of yait-aichain, MIT.

A Python toolkit for building AI features with model calls, multi-step pipelines, repeated work, and tool-using agents. It also supports human approval, spending limits, and pausing and resuming work across several model providers.

In plain words
What is it for?
It helps build Python AI calls and pipelines, process many items, and create agents using providers such as OpenAI, Anthropic, Google, or a local server.
Why use it?
It handles common workflow concerns such as risky-action approval, budget control, and continuation after a pause.

Skill for Claude CodeCodex

Written for Claude Code and Codex: shipped in a Claude Code plugin, but also agents/openai.yaml present.

Part of the yait-aichain plugin — 1 skill shipped together

Good fit It helps build Python AI calls and pipelines, process many items, and create agents using providers such as OpenAI, Anthropic, Google, or a local server.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/yaitio/aichain/yait-aichain
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.

Any agent
npx skills add yaitio/aichain --skill yait-aichain
Clone the repo
git clone --depth 1 https://github.com/yaitio/aichain

Made for: Claude Code, Codex.

Or install yait-aichain, the plugin that ships this one along with the rest of its 1 skill.

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 yait-aichain

README.md
[![agentmods](https://agentmods.dev/badge/skills/yaitio/aichain/yait-aichain/github.svg)](https://agentmods.dev/skills/yaitio/aichain/yait-aichain)
Your own site
<a href="https://agentmods.dev/skills/yaitio/aichain/yait-aichain"><img src="https://agentmods.dev/badge/skills/yaitio/aichain/yait-aichain/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 yait-aichain

Your own site · 80×15
<a href="https://agentmods.dev/skills/yaitio/aichain/yait-aichain"><img src="https://agentmods.dev/badge/skills/yaitio/aichain/yait-aichain.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 193 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,528 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 95% 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.00193 $0.01528
Opus 5.5 $0.00077 $0.00611
Sonnet 5.5 $0.00039 $0.00306
Haiku 4.5 $0.00019 $0.00153

Measured today against content hash abb0135b7c95, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

yait-aichain 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 today.

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.

Origin

This is a copy

95% identical to yait-aichain — 3 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.

plugin/skills/yait-aichain/SKILL.md · 96 lines

How it starts

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

Building with yait-aichain

Read llms.txt next to this file before writing code. It holds the real constructor signatures, one working example per primitive, and the rules that agents most often get wrong. Names from older tutorials — orchestrator=, max_steps=, VectorDB, Embedding(...), LocalTools — do not exist and raise.

Worked programs are in recipes.md next to this file: twenty tasks, each with a program that solves it. Start from the closest one.

When the package is installed, the documentation of that exact version is inside it — python -c "import yait_aichain; print(yait_aichain.docs_dir())" prints the folder, with llms.txt and every page. Prefer it to anything you remember: it matches the code that will run.

Pick the primitive

The task Use
One model call — summarise, extract, classify, translate Skill
Known steps in a fixed order, each feeding the next Chain
The same work over many inputs Pool
The next step depends on what the last one returned Agent with tools
A step that is plain code a function — a chain takes it as a step
Something the model may call @tool on a function; a built-in tool by name
An outside API, server or folder a utility — REST, MCP, Shell, Vectors — and give the agent its tools
A picture image(service, model=…), a tool, not a Skill
A run that must stop and continue later, in another process wait() / gate(tool) and store=FileStore(...)

Prefer the smallest that fits. A Chain whose steps you can list is cheaper, faster and more predictable than an Agent that rediscovers them.

Tools and utilities

  • Built-in tools are made by service name: search("exa"), fetch("local"), chunk(max_chars=500), embed("openai", model=…), rerank("cohere", model=…), decide("openai", questions=…), speech(…), transcribe(…), image(…). What a tool is goes in the factory; what one call asks goes in .run(input, options). A setting never appears in both.
  • Your own function is a tool with @tool; its docstring's first line is the description and its parameters the schema. Call it as fn.run(arg=…).
  • A utility is an object whose methods your code calls and some of whose members are tools: REST(base_url, description=…).endpoint(…), MCP(server).tools, Shell(folder).browse / .read / .write / .run, Vectors(backend, collection=…, description=…).query. Give an agent only the tools it should have — [sh.browse, sh.read] is a read-only agent.

Read the full file on GitHub · 96 lines

Files

What ships with it

3 files 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. today Changed · +1 lines abb0135b7c95
  2. yesterday Changed · +1 lines 053759697d56
  3. 3d ago Changed · +5 lines 8b4d6c5a84b8
  4. 4d ago Changed · +23 lines · +21 tokens per session 3329c7f25f60
  5. 16d ago First seen · 66 lines · 172 tokens per session scan A 310538e5d9f1

Subscribe to this mod's changes

yait-aichain is a skill published in the GitHub repository yaitio/aichain (10 stars, last pushed today), licensed MIT. It adds 193 tokens to every session and 1,528 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 95% identical to yait-aichain, differing in 3 lines, and is treated as a copy.