legacy-lands-library: Instructions file for Codex

AGENTS.md

legacy-lands-library AGENTS.md is an instructions file for Codex, OpenCode from LegacyLands/legacy-lands-library. It costs 5,163 tokens per session, scanned A, original, MIT.

A project instruction file that tells a coding agent how to work in the LegacyLands library, including coding style, planning, testing, and dependency rules.

In plain words
What is it for?
Use it when adding features, classes, documentation, dependencies, or tests to this Java project. It also guides naming, task lists, builds, and test handoff.
Why use it?
It gives the agent a shared set of project rules, reducing inconsistent code and missed development steps.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

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

Reuse

Borrowing it

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

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 legacy-lands-library AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/legacylands/legacy-lands-library/agents-md/github.svg)](https://agentmods.dev/instructions/legacylands/legacy-lands-library/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/legacylands/legacy-lands-library/agents-md"><img src="https://agentmods.dev/badge/instructions/legacylands/legacy-lands-library/agents-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 legacy-lands-library AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/legacylands/legacy-lands-library/agents-md"><img src="https://agentmods.dev/badge/instructions/legacylands/legacy-lands-library/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5,163 This file is loaded in full into every session.
When invoked 5,163 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.05163 $0.05163
Opus 5 $0.02582 $0.02582
Sonnet 5 $0.01033 $0.01033
Haiku 4.5 $0.00516 $0.00516

Measured 9d ago against content hash 505e4a4d15e0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

legacy-lands-library 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 9d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

AGENTS.md · 341 lines

How it starts

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

✅ 开发与协作规范(学习与编程行为指南)

本规范适用于你参与的全部开发任务,条款为强制性,除非用户显式豁免,任何条目都不得忽视或删减。

  • 每次输出前必须深度理解项目背景、用户意图和技术栈特征;
  • 当回答依赖外部知识或信息不确定时,先查询至少一份权威资料(官方文档、标准或源码)再作结论;
  • 引用外部资料须在回复中注明来源;可使用链接或版本号,保证可追溯;
  • 若用户需求含糊,先用一句话复述已知信息,并列出关键澄清问题,待用户确认后再继续;
  • 同一次回复中的术语、变量名、逻辑描述保持一致;发现冲突必须立即修正;
  • 仅回答与问题直接相关内容,避免冗余、无关扩展或教程式铺陈;
  • 面对复杂需求,先拆分为若干可管理子任务,在输出中按子任务顺序呈现,便于用户跟进;

所有技术输出必须建立在准确、思考过的基础之上,拒绝机械生成与无脑填充。 如果你已经了解所有的规范,你需要在用户第一次进行对话时先说明 "我已充分了解开发与写作规范。",随后再执行用户需求。

1. 当你尝试编写一个新功能、添加新类或书写 Javadoc 时

  1. 你需要先查看其他类的实现,尤其是相同模块中的类;
  2. 主动学习、模仿现有代码的结构与风格,包括:
    • 缩进与换行格式;
    • 命名习惯;
    • Javadoc 注释风格。
  3. 多使用 serena MCP 完成可能的操作。

2. 你必须制定清晰的 ToDo 任务清单,并在开发完成后遵循以下规则:

  1. 使用 Gradle 的 shadowJar Task 尝试打包;
  2. 若出现编译错误,必须修复后重新编译,直至编译通过;
  3. 编写测试前,先熟悉 foundation 模块以及 net.legacy.library.annotation.test 包中已提供的测试示例;
  4. 编写基于功能的集成测试,测试内容不得流于无意义断言,需覆盖核心业务逻辑与边界条件;
  5. 测试通过后,在当前模块的 Launcher 中注册新测试入口,参考 net.legacy.library.annotation.AnnotationLauncher 的实现方式;
  6. 若需要为当前模块引入其他模块作为依赖:
    • 先检查是否会造成循环依赖;
    • 若无循环依赖,则使用 compileOnly 方式声明;
  7. 编译全部通过后,将完整测试流程交由用户执行,由用户反馈日志进行进一步调整,你不能自己执行任何的测试,包括 javap 等指令;
  8. 除非用户有明确说明,否则你不应撰写任何示例(example)或额外文档。

3. 命名规范(类、字段、变量、方法)

  1. 命名应清晰、准确、语义明确:
    • ✅ 正确示例:Exception exceptionThrowable throwableIOException exception
    • ❌ 错误示例(过于简单化):Exception eThrowable t
    • ❌ 错误示例(过于复杂化):Exception exceptionWhenFailedToInitializeXxx
    • ❌ 错误示例(无意义):Cache whatIsThis = ...
  2. 出现命名重复时,应提升语义层级,而非简单加数字:
    • ✅ 正确示例:Cache cache; Cache redisCache
    • ❌ 错误示例:Cache cache; Cache cache2

4. 数据处理优先使用 Stream API(尤其是过滤、映射、聚合等操作)

  • 避免使用传统 for 循环完成可以用 stream 完成的链式操作;
  • 确保代码简洁、函数式、可读性强。

5. Lambda 表达式需保持简洁,避免冗余语法

  1. ✅ 正确用法(单行时省略 {}return,可使用方法引用):
    • () -> "something"
    • list.forEach(CustomExecutor::shutdown)
  2. ❌ 错误用法(冗余、过度包装):
    • (x) -> { doSomething(x); } → 简化为 x -> doSomething(x)
    • () -> { return "something"; } → 简化为 () -> "something"
    • list.forEach(x -> { CustomExecutor.shutdown(x); }); → 应使用方法引用

Read the full file on GitHub · 341 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. 9d ago First seen · 341 lines · 5,163 tokens per session scan A 505e4a4d15e0

Subscribe to this mod's changes

legacy-lands-library AGENTS.md is an instructions file published in the GitHub repository LegacyLands/legacy-lands-library (860 stars, last pushed 20d ago), licensed MIT. It adds 5,163 tokens to every session, about $0.0258 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

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

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,153 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

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

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

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