minicode_usage

minicode_usage is a skill for Claude Code, Codex from WalterSumbon/minicode-sdk. It costs 45 tokens per session (982 once invoked), scanned A, original, MIT.

A usage guide for the minicode-sdk Python library, which helps you build AI agents that can generate or stream responses and use tools or MCP servers. It includes setup examples and shows how to create custom tools.

In plain words
What is it for?
Use it when building an agent with minicode-sdk, connecting an AI model, streaming its output, adding built-in tools such as reading, writing, or shell commands, or defining your own tools.
Why use it?
It removes the need to work out the library’s installation, agent setup, response handling, and tool configuration from scratch.

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/waltersumbon/minicode-sdk/minicode-usage
Any agent
npx skills add WalterSumbon/minicode-sdk --skill minicode-usage
Clone the repo
git clone --depth 1 https://github.com/WalterSumbon/minicode-sdk

Made for: Claude Code, Codex.

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 minicode_usage

README.md
[![agentmods](https://agentmods.dev/badge/skills/waltersumbon/minicode-sdk/minicode-usage.svg)](https://agentmods.dev/skills/waltersumbon/minicode-sdk/minicode-usage)
Your own site
<a href="https://agentmods.dev/skills/waltersumbon/minicode-sdk/minicode-usage"><img src="https://agentmods.dev/badge/skills/waltersumbon/minicode-sdk/minicode-usage.svg" alt="Measured on agentmods" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 982 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.00045 $0.00982
Opus 5 $0.00023 $0.00491
Sonnet 5 $0.00009 $0.00196
Haiku 4.5 $0.00005 $0.00098

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

Security

Grade A, and why

minicode_usage 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 5d 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.

.minicode/skills/minicode-usage/SKILL.md · 199 lines

How it starts

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

minicode-sdk Usage Guide

Installation

pip install minicode-sdk

Quick Start

Basic Agent

import asyncio
from minicode import Agent
from minicode.llm import OpenAILLM

async def main():
    agent = Agent(
        name="assistant",
        llm=OpenAILLM(api_key="your-api-key"),
    )

    response = await agent.generate("Hello, how are you?")
    print(response)

asyncio.run(main())

Streaming Response

async def main():
    agent = Agent(name="assistant", llm=OpenAILLM(api_key="your-key"))

    async for chunk in agent.stream("Tell me a story"):
        if chunk["type"] == "content":
            print(chunk["content"], end="", flush=True)

Adding Tools

Built-in Tools

from minicode.tools.builtin import ReadTool, WriteTool, BashTool

agent = Agent(
    name="assistant",
    llm=my_llm,
    tools=[ReadTool(), WriteTool(), BashTool()],
)

Custom Tools

from minicode.tools.base import BaseTool

class MyTool(BaseTool):
    @property
    def name(self) -> str:
        return "my_tool"

    @property
    def description(self) -> str:
        return "Description of what this tool does"

    @property
    def parameters(self) -> dict:
        return {
            "type": "object",
            "properties": {
                "param1": {"type": "string", "description": "First parameter"},
            },
            "required": ["param1"],
        }

    async def execute(self, params: dict, context) -> dict:
        # Implement tool logic
        return {"success": True, "result": "..."}

MCP Integration

Method 1: Direct Configuration

async with Agent(
    name="assistant",
    llm=my_llm,
    mcp_servers=[
        {
            "name": "memory",
            "command": ["npx", "-y", "@modelcontextprotocol/server-memory"],
        }
    ],
) as agent:
    response = await agent.generate("Remember that my name is Alice")

Method 2: Configuration File

Create .minicode/mcp.json:

Read the full file on GitHub · 199 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. 5d ago First seen · 199 lines · 45 tokens per session scan A 04fb4a46588a

Subscribe to this mod's changes

minicode_usage is a skill published in the GitHub repository WalterSumbon/minicode-sdk (2 stars, last pushed 7mo ago), licensed MIT. It adds 45 tokens to every session and 982 once invoked, about $0.0002 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

fastapi

Use when building, reviewing, testing, securing or shipping a FastAPI / async Python service — routers, Pydantic v2 schemas, dependency injection, async SQLAlchemy 2.0, OAuth2/JWT, ASGITransport tests, production wiring. NOT language-level Python or packaging (that is python), NOT engine-level SQL (that is…

ericrisco/rsc-harness · 94 tokens

python

Use when the task is Python itself, in any framework or none: PEP 695 generics, mypy --strict typing, dataclass/Protocol/TypedDict/Enum choices, asyncio.TaskGroup, stdlib idioms, src/ layout + pyproject.toml with uv, ruff+mypy+pytest gate. NOT a FastAPI/ASGI service (that is fastapi), NOT a deep pytest suite (that is…

ericrisco/rsc-harness · 94 tokens

csharp-dotnet

Use when writing, reviewing, testing, or shipping C# / .NET code — ASP.NET Core APIs (minimal APIs vs controllers), EF Core data access, async correctness, solution layout in .cs/.csproj/.sln. NOT a Java/Spring backend (that is spring-boot), NOT a Node/TypeScript backend (that is nestjs), NOT framework-neutral REST…

ericrisco/rsc-harness · 89 tokens

nodejs

Use when building or operating a plain Node.js / Express 5 backend service: project layout, async correctness, central error middleware, fail-fast config, graceful shutdown on SIGTERM. NOT DI modules/providers/guards (that is nestjs), NOT the type system or tsconfig (that is typescript), NOT REST contract design (that…

ericrisco/rsc-harness · 77 tokens

worker-integration

Worker-Agent integration for intelligent task dispatch and performance tracking.

ruvnet/ruflo · 14 tokens

foundry-config-setup

Resolve missing setup caused by a hardcoded Foundry project endpoint or model in a sample. Use when a sample fails because it uses a placeholder/hardcoded projectendpoint (for example "https://your-project.services.ai.azure.com") or a hardcoded model instead of reading them from the environment.

microsoft/agent-framework · 65 tokens