ZipAgent: Instructions file for Claude Code

CLAUDE.md

ZipAgent CLAUDE.md is an instructions file for Claude Code from JiayuXu0/ZipAgent. It costs 2,397 tokens per session, scanned C, original, MIT.

Repository-specific instructions for LiteAgent, a small Python framework for building AI agents with models, tools, conversation context, and an execution engine.

In plain words
What is it for?
They help set up the project with uv, configure a model, inspect dependencies, run checks, and build the Python package.
Why use it?
They explain the project's modules, design patterns, dependencies, configuration, and development commands before code is changed.

Instructions file for Claude Code

Written for Claude Code: the file is CLAUDE.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is JiayuXu0/ZipAgent's own configuration. It tells Claude Code how to work on ZipAgent 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 ZipAgent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to JiayuXu0/ZipAgent. 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/JiayuXu0/ZipAgent/master/CLAUDE.md
Clone the repo
git clone --depth 1 https://github.com/JiayuXu0/ZipAgent

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 ZipAgent CLAUDE.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/jiayuxu0/zipagent/claude-md"><img src="https://agentmods.dev/badge/instructions/jiayuxu0/zipagent/claude-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,397 This file is loaded in full into every session.
When invoked 2,397 The same file — it is already loaded in full.
Security scan C 2 findings. 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.02397 $0.02397
Opus 5.5 $0.00959 $0.00959
Sonnet 5.5 $0.00479 $0.00479
Haiku 4.5 $0.00240 $0.00240

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

Security

Grade C, and why

ZipAgent CLAUDE.md scanned grade C with 2 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 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -LsSf https://astral.sh/uv/install.sh | sh

Makes network callslowCapability

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

curl -LsSf https://astral.sh/uv/install.sh | sh
CLAUDE.md · 301 lines

How it starts

The opening of the file, as written. The whole thing — 301 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.

项目概述

LiteAgent 是一个轻量级的 AI Agent 框架,设计简洁且易于扩展。项目采用模块化架构,每个模块职责单一明确。

核心架构

模块结构

  • agent.py: Agent 核心类,管理代理配置、指令和工具集
  • context.py: 对话上下文管理,维护消息历史和 token 统计
  • model.py: LLM 接口抽象层,基于 OpenAI 客户端
  • runner.py: 执行引擎,处理工具调用循环和对话流程
  • tool.py: 工具系统,支持函数装饰器自动转换

设计模式

  • 策略模式:Model 抽象基类支持不同 LLM 实现
  • 装饰器模式:@function_tool 简化工具创建
  • 数据类:广泛使用 @dataclass 减少样板代码

开发环境设置

使用 uv 原生管理(推荐)

# 安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 克隆项目
git clone https://github.com/JiayuXu0/LiteAgent.git
cd LiteAgent

# uv 会自动创建虚拟环境并管理依赖
# 添加核心依赖
uv add openai pydantic

# 添加开发依赖
uv add --dev pyright ruff pytest pytest-cov pytest-asyncio

# 添加可选依赖
uv add python-dotenv

验证安装

# 检查依赖状态
uv tree

# 检查虚拟环境
uv run python --version
uv run python -c "import liteagent; print('✅ 安装成功')"

环境变量配置

# 创建 .env 文件
MODEL=gpt-3.5-turbo  # 或其他支持的模型
API_KEY=your_api_key
BASE_URL=https://api.openai.com/v1  # 可选

常用开发命令

构建和打包

# 使用 uv 构建
uv build

# 构建后的文件在 dist/ 目录
# - liteagent-0.1.0-py3-none-any.whl  # wheel 包
# - liteagent-0.1.0.tar.gz             # 源码包

# 安装构建的 wheel 包
pip install dist/liteagent-0.1.0-py3-none-any.whl

类型检查

# 使用 uv run 运行 pyright
uv run pyright

# 检查特定目录
uv run pyright src/

# 检查特定文件
uv run pyright src/liteagent/agent.py

代码风格检查

# 运行 ruff 代码检查
uv run ruff check .

# 自动修复可修复的问题
uv run ruff check --fix .

# 格式化代码
uv run ruff format .

# 检查特定文件
uv run ruff check src/liteagent/

运行测试

# 运行所有测试
uv run pytest

# 运行特定测试文件
uv run pytest tests/test_agent.py

# 运行并显示覆盖率
uv run pytest --cov=src/liteagent --cov-report=html

# 运行特定标记的测试
uv run pytest -m unit        # 只运行单元测试
uv run pytest -m integration # 只运行集成测试

# 详细输出
uv run pytest -v --cov-report=term-missing

当前项目状态

  • ✅ 测试: 37 个测试全部通过
  • 📊 覆盖率: 60% (核心模块 90%+)
  • 🔧 依赖: 2 个核心,5 个开发依赖
  • 📦 包大小: wheel 12.4KB

Read the full file on GitHub · 301 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 · 301 lines · 2,397 tokens per session scan C 28335327bcef

Subscribe to this mod's changes

ZipAgent CLAUDE.md is an instructions file published in the GitHub repository JiayuXu0/ZipAgent (111 stars, last pushed 9d ago), licensed MIT. It adds 2,397 tokens to every session, about $0.0096 per session on Opus 5.5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

ZipAgent CLAUDE.md compared with instructions from other repositories

ZipAgent CLAUDE.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
ZipAgent CLAUDE.mdJiayuXu0/ZipAgentInstructions file1119d agoMITC2,397Claude Code
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,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