code-cli-any-llm AGENTS.md

A set of project instructions for developing the code-cli-any-llm repository, an application that routes requests between language-model providers. It documents the project layout, commands, naming rules, formatting, and testing expectations.

In plain words
What is it for?
Use it when installing dependencies, running the development server, building the TypeScript project, linting, running unit or end-to-end tests, and following its file and naming conventions.
Why use it?
It gives coding agents and developers the repository-specific context needed to make consistent changes. This reduces guesswork about where code belongs and how changes should be checked.

Instructions file for CodexOpenCode

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/x22x22/code-cli-any-llm/agents-md
Clone the repo
git clone --depth 1 https://github.com/x22x22/code-cli-any-llm

Made for: Codex, OpenCode.

Per session 958 This file is loaded in full into every session.
When invoked 958 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.00958 $0.00958
Opus 5 $0.00479 $0.00479
Sonnet 5 $0.00192 $0.00192
Haiku 4.5 $0.00096 $0.00096

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

Security

Grade A, and why

code-cli-any-llm 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 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.

AGENTS.md · 33 lines

How it starts

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

Repository Guidelines

Project Structure & Module Organization

  • 主干代码位于 src/,其中 controllers/ 暴露 HTTP 接口,services/providers/ 统筹模型路由、限流与分词策略,transformers/ 负责协议与响应格式转换。
  • 通用工具集中在 src/utils/src/common/,公共常量建议放入 src/common/constants/ 或模块内 constants.ts;配置模板与校验逻辑保存在 config/ 并需与 src/config/*.ts 同步维护。
  • 测试按层级拆分至 test/unit/test/integration/test/contract/test/e2e/;端到端脚本位于 specs/,构建产物生成到 dist/,运行日志写入 logs/

Build, Test, and Development Commands

  • pnpm install --frozen-lockfile:CI 与复现环境锁定依赖;初次开发可执行 pnpm install
  • pnpm run start:dev:启用 Nest 热重载调试;需要断点时使用 pnpm run start:debug 并配合 --inspect
  • pnpm run build:编译 TypeScript 产物至 dist/pnpm run start:prod 用于模拟生产部署。
  • pnpm run lint:执行 ESLint + Prettier 修复;合并前需配合 pnpm run testpnpm run test:covpnpm run test:e2e 视场景验收。
  • 如遇端口或子进程遗留问题,运行 pnpm run kill 快速清理。

Coding Style & Naming Conventions

  • 全量采用 TypeScript 与 ECMAScript 模块语法,格式化由根目录 prettier 与 ESLint 规则控制,默认两空格缩进、句尾保留分号、字符串使用单引号。
  • 类、装饰器、DTO 统一 PascalCase;服务方法、变量使用 camelCase;文件命名推荐 kebab-case,例如 tokenizer.service.tsrate-limit.constants.ts
  • 导入路径优先使用 @/ 别名,确保公共拦截器、守卫与管道自 src/common/ 复用。

Testing Guidelines

  • 测试框架为 Jest + ts-jest,pnpm run test 覆盖单元与集成用例,pnpm run test:e2e 运行端到端脚本,pnpm run test:cov 汇总覆盖率。
  • 新特性至少补充一条单测和一条集成或契约测试,关键模块覆盖率目标保持 ≥80%;可通过 pnpm run test -- --coverage 或读取 coverage/ 报告核对。
  • 调用外部 API 时设置 CAL_OPENAI_API_KEY=stub pnpm run test 隔离依赖;端到端脚本应同步更新 specs/ 文档说明。

Commit & Pull Request Guidelines

  • 建议提交信息遵循“动作 + 范围 + 结果”,示例:优化 controllers 响应缓存修复 providers 限流策略;避免“fix bug”等笼统描述。
  • PR 描述需说明变更动机、接口或配置影响、验证结果及回滚策略,并在涉及配置、脚本或文档时列出已同步更新的 docs/specs/config/ 清单。
  • 合并前确认 pnpm run lintpnpm run testpnpm run test:e2e 均通过,必要时附上截图、日志或关联 issue 链接方便审核。

Security & Configuration Tips

  • 配置优先级依次为环境变量 < ~/.code-cli-any-llm/config.yaml < 仓库 config/config.yaml,敏感密钥不得进入版本控制。
  • 引入新配置项时同步修改 src/config/config.schema.ts、默认模板与 README 或 docs/ 中的迁移说明,确保代理部署在多环境可复现。

Read the full file on GitHub · 33 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 · 33 lines · 958 tokens per session scan A e9f6a26cee64

Subscribe to this mod's changes

code-cli-any-llm AGENTS.md is an instructions file published in the GitHub repository x22x22/code-cli-any-llm (5 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 958 tokens to every session, about $0.0048 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 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

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

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

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,345 tokens