Undefined CLAUDE.md

Project instructions for Undefined, a Python platform for QQ chat bots that communicates through the OneBot V11 protocol and includes web, desktop, and Android management tools.

In plain words
What is it for?
They are for developing, testing, formatting, type-checking, building, and running Undefined and its related front ends.
Why use it?
They explain how to install dependencies, start the bot or management interface, and run the required checks across the project.

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/69gg/undefined/claude-md
Clone the repo
git clone --depth 1 https://github.com/69gg/Undefined
Per session 3,571 This file is loaded in full into every session.
When invoked 3,571 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.03571 $0.03571
Opus 5 $0.01785 $0.01785
Sonnet 5 $0.00714 $0.00714
Haiku 4.5 $0.00357 $0.00357

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

Security

Grade A, and why

Undefined 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 · 172 lines

How it starts

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

项目概述

Undefined 是基于 Python asyncio 的高性能 QQ 机器人平台,通过 OneBot V11 协议(NapCat/Lagrange.Core)与 QQ 通信,搭载认知记忆架构、自研 Skills 系统、本地知识库、全局表情包库,以及 Management-first WebUI / Desktop / Android 管理端。

开发命令

# 依赖安装 / 初始化
uv sync
uv run playwright install       # 页面截图等能力依赖的浏览器运行时

# 启动
uv run Undefined-webui          # 启动 Management-first WebUI(推荐入口)
uv run Undefined                # 直接启动 Bot

# WebUI 自动启动 Bot
# 配置 [webui].autostart_bot = true 后,运行 uv run Undefined-webui 会自动拉起 bot 进程
# 默认为 false,保持传统手动启动行为
# 注意:该配置仅在 WebUI 启动时生效,运行时修改需重启 WebUI

# 代码质量(提交前必须全部通过)
uv run ruff format .
uv run ruff check .
uv run mypy .                   # strict=true
uv run pytest tests/
uv run pytest tests/test_xxx.py
uv run pytest tests/test_xxx.py::test_func -v
uv build --wheel                # 校验打包与资源包含

# 前端 / 桌面端(仅改动 apps/undefined-console/ 或 apps/undefined-chat/ 或 webui/static/js/ 时需要)
cd apps/undefined-console && npm ci && npm run check
cd apps/undefined-console && npm run dev
cd apps/undefined-console && npm run tauri:dev

cd apps/undefined-chat && npm ci && npm run check
cd apps/undefined-chat && npm run tauri:dev

# Git hooks 安装
bash scripts/install_git_hooks.sh
# pre-commit 自动执行:ruff format --check + ruff check + mypy
# 含 JS/Tauri 改动时额外执行:Biome + TypeScript + cargo fmt/check

代码规范

  • 类型注释:所有 Python 代码必须有完整类型注释,mypy strict 模式
  • 异步 IO:磁盘读写必须走 utils/io.pyasyncio.to_thread + 跨平台文件锁 + 原子写入),禁止在事件循环中直接阻塞 IO
  • Python 版本>=3.11, <3.14(推荐 3.12)
  • 测试:pytest + pytest-asyncio,asyncio_mode = "auto"
  • 前端格式化src/Undefined/webui/static/js/ 由根目录 biome.json 管理;apps/undefined-console/apps/undefined-chat/ 走 Biome + TypeScript + Cargo 检查
  • 版本号同步:发布版本时优先使用 uv run python scripts/bump_version.py <version>,统一同步 Python 包、console、chat 与 Tauri 版本号
  • Git hooks:优先通过 scripts/install_git_hooks.sh 安装,不要手动维护 core.hooksPath

架构分层

核心源码位于 src/Undefined/,主要模块如下:

Read the full file on GitHub · 172 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 · 172 lines · 3,571 tokens per session scan A 323997fd5c3c

Subscribe to this mod's changes

Undefined CLAUDE.md is an instructions file published in the GitHub repository 69gg/Undefined (259 stars, last pushed 6d ago), licensed MIT. It adds 3,571 tokens to every session, about $0.0179 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.