Ling: Instructions file for Codex

AGENTS.md

Ling AGENTS.md is an instructions file for Codex, OpenCode from MisonL/Ling. It costs 1,373 tokens per session, scanned A, original, MIT.

Repository instructions for coding agents working on the Ling project, covering its folder layout, supported agent targets, implementation constraints, and testing rules.

In plain words
What is it for?
Use them when modifying the Ling CLI, templates, documentation, synchronization logic, or tests.
Why use it?
They give an agent project-specific rules so changes follow the repository's structure and expected behavior.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions Codex; mentions Gemini CLI.

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

Reuse

Borrowing it

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

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 Ling AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/misonl/ling/agents-md.svg)](https://agentmods.dev/instructions/misonl/ling/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/misonl/ling/agents-md"><img src="https://agentmods.dev/badge/instructions/misonl/ling/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,373 This file is loaded in full into every session.
When invoked 1,373 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.01373 $0.01373
Opus 5 $0.00687 $0.00687
Sonnet 5 $0.00275 $0.00275
Haiku 4.5 $0.00137 $0.00137

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

Security

Grade A, and why

Ling 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 3d 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 · 77 lines

How it starts

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

AGENTS.md

沟通与执行

  • 全程使用中文。
  • 结论必须基于仓库事实、命令输出、测试结果,不凭印象猜测。
  • 优先做最小必要修改;不要顺手扩大范围。
  • 不要引入静默降级、假成功路径或仅为过测试而写的硬编码。

仓库结构

  • bin/:CLI 主链路。bin/ling-cli.js 负责命令分发;bin/adapters/ 处理 gemini / antigravity / codex 目标差异;bin/core/ 负责构建与转换;bin/utils/ 放原子写入、manifest、托管区块等通用能力。
  • .agents/:仓库内唯一 Canonical 模板源。项目安装时:
    • gemini / antigravity -> 项目内 .agent/
    • codex -> 项目内 .agents/
  • .spec/:Spec 进阶能力的模板、profiles、references 与 skills 源。
  • tests/:Node 内置测试(*.test.js)。
  • docs/:对外技术文档。
  • reference/:只保留受管参考资料;当前应跟踪 reference/official/reference/docs-archive/,不要重新引入重复镜像目录。
  • web/:Next.js 文档站。仅使用 npm,不要重新引入 bun 工作流。

关键实现约束

  • geminiantigravity 共用 .agent/,但逻辑目标身份必须通过项目内 .ling/install-state.json 区分;涉及共享 .agent/ 的逻辑时,不要退回“默认全算 gemini”的旧行为。
  • codex 受管目录是 .agents/;遗留 .codex/ 只作为兼容迁移输入,不再作为主输出。
  • 全局同步默认目标是 codex + gemini + antigravitygeminiantigravity 不能再互相隐式代管。
  • 全局 codex Skills 根目录是 ~/.agents/skills/;若 ~/.gemini/skills/ 与 universal 根目录存在内容完全相同的同名 Skill,需要执行去重清理;若同名但内容不同,必须保留 Gemini 专用版本。
  • ling spec enable 若涉及 codexgemini,必须与全局去重逻辑保持一致,不能在启用 Spec 后重新写回 Gemini CLI 重复 Skill。
  • 文档、测试、CLI 帮助文本必须与实际命令行为一致;改命令行为时同步更新 README.mddocs/TECH.mddocs/PLAN.md 与相关测试。

构建、测试与验证

  • 安装依赖:npm install
  • 全量测试:npm test
  • CI 主链路验证:npm run ci:verify
  • 健康检查:npm run health-check
  • 清理预检:npm run clean:dry-run
  • Web 文档站检查:cd web && npm run lint
  • 仅改文档时,至少执行 git diff --check;若改 CLI、安装/更新逻辑、状态判定、Spec 或发布链路,必须跑相关测试,默认优先 npm test

代码风格

  • 遵循 .editorconfig:默认 4 空格缩进,JSON/YAML 2 空格,LF,UTF-8。
  • 根目录 Node 代码保持 CommonJS 风格(require / module.exports)。
  • 文件命名使用 kebab-case。
  • 不要加入 Emoji、花哨 Unicode 装饰符或无意义注释。

测试要求

  • 新功能或行为修正必须补回归测试,优先覆盖:
    • CLI 参数与默认目标
    • 工作区状态判定
    • 全局同步与备份语义
    • Spec enable/init/doctor
    • 文档与实现的一致性
  • 当修改 reference/ 跟踪策略时,同步更新 tests/standards-compliance.test.js

参考资料与忽略规则

  • 不要提交 __pycache__/*.pyc.DS_Store.next/*.log*.tmp.eslintcache.turbo/coverage/dist/web/tsconfig.tsbuildinfo、临时 tarball、测试临时工作区(如 .temp-ling-*.tmp-ling-*)或其他构建噪声。
  • reference/ 使用白名单忽略策略:保留需要受管的官方资料与归档文档,其余快照默认忽略。
  • 不要重新引入 reference/official-docs/ 这类重复目录;官方资料只保留一份。

Read the full file on GitHub · 77 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. 3d ago First seen · 77 lines · 1,373 tokens per session scan A d125dfc0368e

Subscribe to this mod's changes

Ling AGENTS.md is an instructions file published in the GitHub repository MisonL/Ling (8 stars, last pushed 5mo ago), licensed MIT. It adds 1,373 tokens to every session, about $0.0069 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-09-03.

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