yoagent CLAUDE.md

Project instructions for Yoagent, a Rust library for building AI coding agents, covering its overview, development commands, architecture, and main agent loop.

In plain words
What is it for?
Use it when developing Yoagent, running its full test suite, checking formatting, using examples, or understanding its agent, tool, and model integrations.
Why use it?
It gives an agent the repository-specific rules and commands needed to build, test, format, and lint the project correctly.

Instructions file

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 instructions/yologdev/yoagent/claude-md
Clone the repo
git clone --depth 1 https://github.com/yologdev/yoagent
Per session 2,957 This file is loaded in full into every session.
When invoked 2,957 The same file — it is already loaded in full.
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.02957 $0.02957
Opus 5 $0.01478 $0.01478
Sonnet 5 $0.00591 $0.00591
Haiku 4.5 $0.00296 $0.00296

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

Security

Grade A, and why

yoagent CLAUDE.md 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 2d 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.

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.

CLAUDE.md · 153 lines

How it starts

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

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

yoagent is a Rust library (crate) for building AI coding agents. It provides a core agent loop, multi-provider LLM streaming, built-in tools, MCP integration, and context management. Published to crates.io as yoagent.

Build & Development Commands

cargo test --all-features            # Run all tests — what CI runs
cargo clippy --all-targets --all-features   # Lint — what CI runs (-Dwarnings)
cargo fmt                            # Auto-format code
cargo fmt -- --check                 # Check formatting (CI uses this)

cargo test <test_name>               # Run a single test by name
cargo test --test agent_test         # Run a specific test file
cargo run --example cli              # Run the interactive CLI example
cargo run --example basic            # Run the minimal example

Pass --all-features when checking your work. openapi and gasp are off by default, and some targets exist only behind them: gasp_emit and llm_compaction_live are both required-features = ["gasp"], so plain cargo clippy --all-targets skips them entirely and reports clean on code CI will reject. This is not hypothetical — a breaking change to CostConfig passed local clippy while llm_compaction_live no longer compiled.

CI (RUSTFLAGS="-Dwarnings") treats all clippy warnings as errors. Integration tests in tests/integration_anthropic.rs require a live API key and are skipped by default.

Architecture

Core Loop Pattern

The central abstraction is a stateless agent loop (agent_loop.rs) driven by two traits:

  • StreamProvider (provider/traits.rs) — streams LLM responses via SSE into an mpsc channel, returning a complete Message
  • AgentTool (types.rs) — defines tool name/schema/execution; the primary extension point for custom tools

The loop: stream assistant response → extract tool calls → execute tools (parallel by default) → append results → repeat until StopReason::Stop with no follow-ups.

Read the full file on GitHub · 153 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. 2d ago First seen · 153 lines · 2,957 tokens per session scan A b9522a800d99

Subscribe to this mod's changes

yoagent CLAUDE.md is an instructions file published in the GitHub repository yologdev/yoagent (177 stars, last pushed 5d ago), licensed MIT. It adds 2,957 tokens to every session, about $0.0148 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-30.

Related

Other instructions, from other repositories

kungfu AGENTS.md

AGENTS.md instructions for kungfu-systems/kungfu, covering agents.md, start from the person's objective, rules that always apply, load bounded context before changing the repository and execute and verify through shifu.

kungfu-systems/kungfu · 1,532 tokens

fast-agent AGENTS.md

AGENTS.md instructions for evalstate/fast-agent, covering fast-agent contributor notes and architectural orientation.

evalstate/fast-agent · 1,057 tokens

kungfu CLAUDE.md

Claude Code instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before working in this repository. It routes both product use and contribution work to the repository sources of truth, including the requirement that development and build tasks enter through Shifu.

kungfu-systems/kungfu · 54 tokens

kungfu copilot-instructions.md

Copilot instructions for kungfu-systems/kungfu: Read and follow AGENTS.md before proposing or running changes. It is the shared agent router for this repository, including the canonical Shifu development and build entrypoint.

kungfu-systems/kungfu · 45 tokens

zero2Agent AGENTS.md

Instructions for ranxi2001/zero2Agent, covering zero2agent repository guide, purpose, start every task, source of truth and repository skills.

ranxi2001/zero2Agent · 1,535 tokens

agents-universe CLAUDE.md

Instructions for agents-universe/agents-universe, covering agents universe — enterprise ai agent framework, project overview, monorepo layout, development commands and api (from packages/api/).

agents-universe/agents-universe · 1,950 tokens