ii-agent: Instructions file for Claude Code

CLAUDE.md

ii-agent CLAUDE.md is an instructions file for Claude Code from Intelligent-Internet/ii-agent. It costs 6,044 tokens per session, scanned A, original, Apache-2.0.

Project-specific instructions for working on II-Agent, an AI-agent platform built with FastAPI and SQLAlchemy. They describe its domain structure, architecture, database conventions, and important project rules.

In plain words
What is it for?
Use them when changing II-Agent’s application, domains, configuration, database layer, authentication, storage, or other documented parts of the project.
Why use it?
They give a coding agent the context needed to place changes correctly and follow the project’s existing conventions. This reduces guesswork when navigating the codebase.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md.

This is Intelligent-Internet/ii-agent's own configuration. It tells Claude Code how to work on ii-agent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ii-agent configures →

About the project

II-Agent is an open-source framework and AI agent for building applications, conducting research, and automating workflows from natural-language prompts. Developers, research teams, and enterprises use it to create mobile apps, websites, illustrated books, media, research outputs, and integrations with external services. The catalogue skills and instructions provide workflows and integrations for using II-Agent.

Intelligent-Internet/ii-agent · 3,391 stars · on GitHub · ii.inc

Reuse

Borrowing it

Nothing to install: this file belongs to Intelligent-Internet/ii-agent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Intelligent-Internet/ii-agent/main/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/Intelligent-Internet/ii-agent

Made for: Claude Code.

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 ii-agent CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/intelligent-internet/ii-agent/claude-md/github.svg)](https://agentmods.dev/instructions/intelligent-internet/ii-agent/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/intelligent-internet/ii-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/intelligent-internet/ii-agent/claude-md/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 ii-agent CLAUDE.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/intelligent-internet/ii-agent/claude-md"><img src="https://agentmods.dev/badge/instructions/intelligent-internet/ii-agent/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6,044 This file is loaded in full into every session.
When invoked 6,044 The same file — it is already loaded in full.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.06044 $0.06044
Opus 5.5 $0.02418 $0.02418
Sonnet 5.5 $0.01209 $0.01209
Haiku 4.5 $0.00604 $0.00604

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

Security

Grade A, and why

ii-agent CLAUDE.md scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:8000/health
CLAUDE.md · 592 lines

How it starts

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

II-Agent Project Guide

Project Overview

II-Agent is an AI agent platform built with FastAPI and SQLAlchemy 2.0. The codebase follows a domain-driven architecture where business logic is organized into domain modules.

Architecture

Domain Structure

src/ii_agent/
├── app/                        # FastAPI factory, router registration, lifespan, middleware
│
├── core/                       # Shared infrastructure & configuration
│   ├── config/                 # 13+ Pydantic settings classes (DB, Redis, Storage, Stripe, OAuth, LLM...)
│   ├── db/                     # SQLAlchemy 2.0 Base (UUID PK, DateTime timestamps), engine, session deps
│   ├── llm/                    # LLM billing service, execution service, base utilities
│   ├── middleware/              # CORS, request tracing, exception handling
│   ├── redis/                  # Async Redis client, cache, cancel tokens
│   ├── storage/                # GCS/local file storage abstraction + path resolver
│   └── container.py            # ApplicationContainer singleton (global + app.state)
│
├── auth/                       # OAuth 2.0, JWT (uuid.UUID user_id), session management
├── users/                      # User CRUD, API keys
│
├── billing/                    # Stripe webhooks, payment transactions
├── credits/                    # Credit balance, transactions
│
├── tasks/                      # Unified run lifecycle tracker (RunTask + TaskLog) -- CANONICAL DOMAIN
│
├── sessions/                   # Chat sessions (CRUD, state, fork, title, validation)
│   ├── pin/                    # Session pins
│   └── wishlist/               # Session wishlists/bookmarks
│
├── chat/                       # Chat API & LLM providers
│   ├── api/                    # Chat REST endpoints
│   ├── application/            # Chat orchestration (chat_service, tool_service, context, turn loop)
│   ├── llm/                    # LLM provider implementations (Anthropic, etc.)
│   ├── media/                  # Media processing (handlers, modes, services, utils)
│   ├── messages/               # Chat message storage & history
│   ├── prompts/                # Chat system prompts
│   ├── providers/              # Provider containers, files, vector stores
│   ├── runs/                   # Chat run management
│   ├── tools/                  # Chat tools (code interpreter, tool registry)
│   └── vectorstore/            # Vector store integration (OpenAI)
│
├── agents/                     # Agent execution framework
│   ├── models/                 # LLM provider models (Anthropic, OpenAI, Google, Cerebras, VertexAI)
│   ├── runs/                   # Agent run management (AgentRunTask)
│   ├── sandboxes/              # Sandbox environment management (E2B/Docker/local)
│   ├── skills/                 # Skills framework (built-in + custom)
│   ├── tools/                  # Tool implementations (13 categories, 100+ tools)
│   └── ...                     # connector, hooks, media, prompts, sessions, utils
│
├── content/                    # Content generation
│   ├── media/                  # Media templates & tools
│   ├── slides/                 # Slide/presentation generation
│   └── storybook/              # Storybook generation
│
├── files/                      # File upload/download, user & session assets
│
├── integrations/               # External integrations
│   ├── connectors/             # External connectors (GitHub, Google Drive, Composio)
│   ├── enhance_prompt/         # Prompt enhancement service
│   └── mobile/                 # Mobile integrations (Apple credentials)
│
├── projects/                   # Project & deployment management
│   ├── cloud_run/              # Google Cloud Run deployment
│   ├── databases/              # Database provisioning
│   ├── deployments/            # Deployment management
│   ├── design/                 # Project design preview
│   ├── secrets/                # Project secrets management
│   └── subdomains/             # Subdomain management
│
├── realtime/                   # Real-time communication
│   ├── events/                 # Event handling & persistence
│   ├── handlers/               # Socket.IO command handlers (21 total)
│   └── pubsub/                 # Async pub/sub (SioCallback + DatabaseCallback)
│
├── settings/                   # Admin/user settings (LLM, MCP, skills)
│
└── workers/                    # Background jobs
    ├── celery/                 # Celery task definitions & decorators
    └── cron/                   # Scheduled jobs (credit refresh, sandbox timeout)

Read the full file on GitHub · 592 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. 2mo ago First seen · 592 lines · 6,044 tokens per session scan A cd513a5f5c36

Subscribe to this mod's changes

ii-agent CLAUDE.md is an instructions file published in the GitHub repository Intelligent-Internet/ii-agent (3,391 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 6,044 tokens to every session, about $0.0242 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ii-agent CLAUDE.md compared with instructions from other repositories

ii-agent CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ii-agent CLAUDE.mdIntelligent-Internet/ii-agentInstructions file3.4k2mo agoApache-2.0A6,044Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode