clhoria-template: Instructions file for Codex

AGENTS.md

clhoria-template AGENTS.md is an instructions file for Codex, OpenCode from zhe-qi/clhoria-template. It costs 1,238 tokens per session, scanned A, original, MIT.

A set of project instructions for zhe-qi/clhoria-template. It documents the commands, technology stack, route organization, database conventions, logging rules, and other coding requirements.

In plain words
What is it for?
Use it as the project-specific reference when developing, testing, migrating, or reviewing this Hono and Node.js application.
Why use it?
It gives an agent the repository's local rules before it changes code. This reduces mistakes such as using the wrong response format, status codes, timestamps, or logging style.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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 clhoria-template AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/zhe-qi/clhoria-template/agents-md"><img src="https://agentmods.dev/badge/instructions/zhe-qi/clhoria-template/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,238 This file is loaded in full into every session.
When invoked 1,238 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.01238 $0.01238
Opus 5 $0.00619 $0.00619
Sonnet 5 $0.00248 $0.00248
Haiku 4.5 $0.00124 $0.00124

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

Security

Grade A, and why

clhoria-template 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 · 117 lines

How it starts

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

AGENTS.md

Commands

pnpm install/dev/build/start/typecheck/lint/lint:fix/test
pnpm generate/push/migrate/studio/seed  # Database

Stack

Hono + Node.js 25 + PostgreSQL(Drizzle snake_case) + Redis(ioredis) + BullMQ + JWT(admin/client) + Casbin RBAC + Zod(Chinese errors) + OpenAPI 3.1.0(Scalar) + Vitest + vite

Architecture

Route Tiers: /api/public/* (no auth) | /api/client/* (JWT) | /api/admin/* (JWT+RBAC+audit)

Auto-load: import.meta.glob from routes/{tier}/**/*.index.ts

CRUD 模块开发详见 /crud skill

数据库 Schema 开发详见 /db-schema skill

Critical Rules

Response & Logging (MANDATORY)

return c.json(Resp.ok(data), HttpStatusCodes.OK);
return c.json(Resp.fail("error"), HttpStatusCodes.BAD_REQUEST);
logger.info({ userId }, "[Module]: message"); // data object FIRST
// NEVER: console.log/warn/error (except: env validation, singleton, tests, scripts)

Other Rules

  • Status codes: HttpStatusCodes constants
  • Dates: date-fns library
  • Timestamps: timestamp({ mode: "string", precision: 0 })(秒级精度,匹配 yyyy-MM-dd HH:mm:ss 写入格式)
  • 时区:DB 写入时间一律用 format(new Date(), "yyyy-MM-dd HH:mm:ss")(date-fns,跟随系统时区,服务器默认 +8);禁止用 new Date().toISOString() 写 DB(永远 UTC,会差 8 小时)。API 响应里给前端的时间戳不受此限制
  • UUID params: IdUUIDParamsSchema
  • Naming: PascalCase (classes/types), UPPER_SNAKE_CASE (enum values), kebab-case (files)
  • Folder grouping: When multiple files of same type exist (e.g., *.helpers.ts), create a folder (e.g., helpers/)
  • Queries: Use enums eq(table.status, Status.ENABLED) not magic values
  • Helpers: Route-level ({feature}.helpers.ts) for complex business logic or reuse within module; simple DB operations stay inline in handlers; global (src/services/) for cross-tier shared logic
  • Types: Prefer inferring from Zod schemas (z.infer<typeof schema>) over manual definitions
  • Simple guard clauses: if (!x) return null; 单行无花括号(适用于 return 单个值、单个变量、单个函数调用等简短表达式,如 return fallbackPath;return Promise.resolve();

Read the full file on GitHub · 117 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 · 117 lines · 1,238 tokens per session scan A db183e7866d2

Subscribe to this mod's changes

clhoria-template AGENTS.md is an instructions file published in the GitHub repository zhe-qi/clhoria-template (191 stars, last pushed 1mo ago), licensed MIT. It adds 1,238 tokens to every session, about $0.0062 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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 3,737 tokens