xiaozhi-client: Instructions file for Codex

AGENTS.md

xiaozhi-client AGENTS.md is an instructions file for Codex, OpenCode from shenjingnan/xiaozhi-client. It costs 5,523 tokens per session, scanned A, original, MIT.

Project instructions for the Xiaozhi Client repository, covering its development principles, commands, quality checks, Git hooks, and release process. Git hooks are automated checks that run during commits.

In plain words
What is it for?
Use them when developing, building, testing, linting, type-checking, checking duplication or spelling, and preparing releases.
Why use it?
They tell a coding agent how this repository is organized, tested, formatted, and released.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions CLAUDE.md; mentions Claude Code.

This is shenjingnan/xiaozhi-client's own configuration. It tells Codex and OpenCode how to work on xiaozhi-client 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 xiaozhi-client configures →

Reuse

Borrowing it

Nothing to install: this file belongs to shenjingnan/xiaozhi-client. 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/shenjingnan/xiaozhi-client/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/shenjingnan/xiaozhi-client

Made for: Codex, OpenCode.

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 xiaozhi-client AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/shenjingnan/xiaozhi-client/agents-md.svg)](https://agentmods.dev/instructions/shenjingnan/xiaozhi-client/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/shenjingnan/xiaozhi-client/agents-md"><img src="https://agentmods.dev/badge/instructions/shenjingnan/xiaozhi-client/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 5,523 This file is loaded in full into every session.
When invoked 5,523 The same file — it is already loaded in full.
Security scan A 0 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.05523 $0.05523
Opus 5 $0.02762 $0.02762
Sonnet 5 $0.01105 $0.01105
Haiku 4.5 $0.00552 $0.00552

Measured 8d ago against content hash a988139de0f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

xiaozhi-client AGENTS.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 8d 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.

AGENTS.md · 514 lines

How it starts

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

CLAUDE.md

本文件为 Claude Code (claude.ai/code) 在此代码仓库中工作时提供指导。

开发理念

核心原则

  • 功能驱动:如无必要勿增实体,需要什么功能就实现什么功能
  • 优雅实现:代码要清晰、可维护、结构合理
  • 避免过度设计:不提前考虑竞态、并发、互斥锁、缓存等复杂概念
  • 架构合理:整体架构要有逻辑性,但不引入不必要的抽象层
  • 确认优先:当不确认时询问用户,不做自作主张的决策

开发哲学

  • 先实现,后优化:先把功能做好,再考虑性能优化
  • 实用主义:解决实际问题比理论完美更重要
  • 简单直接:避免为了工程化而工程化
  • 渐进改进:遇到问题再优化,不过度预防

开发命令

构建和测试

  • pnpm build - 构建项目(包括 Web 构建和 TypeScript 编译)
  • pnpm dev - 开发模式(带监视功能)
  • pnpm test - 运行一次测试
  • pnpm test:coverage - 运行测试并生成覆盖率报告

代码质量

  • pnpm lint - 运行 Biome linter
  • pnpm lint:fix - 运行 Biome linter 并自动修复(包括格式化)
  • pnpm typecheck - 运行 TypeScript 类型检查
  • pnpm check:all - 运行所有质量检查(lint、typecheck、spellcheck、duplicate check)

其他质量工具

  • pnpm spellcheck - 使用 cspell 检查拼写
  • pnpm check:cpd - 使用 jscpd 检查重复代码
  • pnpm dev:docs - 启动文档开发服务器

Git Hooks(Pre-commit)

项目配置了 husky + lint-staged + commitlint,在 git commit 时自动执行以下检查:

  • pre-commit: 对暂存的文件自动执行 lint 和格式化
    • *.{ts,tsx,json}biome check --write(自动修复并重新暂存)
    • *.{md,mdx}cspell 拼写检查
  • commit-msg: 校验 commit message 符合 Conventional Commits 规范

注意: 紧急情况下可使用 git commit --no-verify 跳过 hooks,但不建议日常使用。

发布

项目使用 release-it 进行版本发布,配合 @release-it/conventional-changelog 自动生成 CHANGELOG。

标准发布流程
# 发布指定版本(正式版)
pnpm release 2.4.0 --ci

# 发布 Beta 版本
pnpm release:beta

# 或指定预发布版本号
pnpm release 2.4.0-beta.0 --preRelease=beta --ci

# 快捷发布(自动 bump patch/minor/major)
pnpm release:patch    # 2.3.0 → 2.3.1
pnpm release:minor    # 2.3.0 → 2.4.0
pnpm release:major    # 2.3.0 → 3.0.0
自动执行
  • 验证工作目录是否干净
  • 更新 package.json 版本号
  • 生成/更新 CHANGELOG.md(基于 Conventional Commits)
  • 创建 Git commit 和 tag
  • 推送代码和 tag 到远程仓库(--ci 模式)
  • 创建 GitHub Release
  • GitHub Actions 自动执行 npm publish
预演模式
# 预演发布流程(不实际执行任何操作)
pnpm release:dry
仅本地更新(不推送)
# 显式关闭 push 和 GitHub release,避免交互过程中误推送
pnpm release 2.4.0 --git.push=false --github.release=false

Read the full file on GitHub · 514 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. 8d ago First seen · 514 lines · 5,523 tokens per session scan A a988139de0f4

Subscribe to this mod's changes

xiaozhi-client AGENTS.md is an instructions file published in the GitHub repository shenjingnan/xiaozhi-client (337 stars, last pushed 4d ago), licensed MIT. It adds 5,523 tokens to every session, about $0.0276 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

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 6,785 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,296 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,469 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens