Getting it into your agent
There is no command for this one: it runs only inside a plugin, and the catalogue could not identify which plugin ships it. The source is linked below.
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.
[](https://agentmods.dev/instructions/050602/karlcat/claude-md)<a href="https://agentmods.dev/instructions/050602/karlcat/claude-md"><img src="https://agentmods.dev/badge/instructions/050602/karlcat/claude-md.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.03960 | $0.03960 |
| Opus 5 | $0.01980 | $0.01980 |
| Sonnet 5 | $0.00792 | $0.00792 |
| Haiku 4.5 | $0.00396 | $0.00396 |
Grade A, and why
KarlCat CLAUDE.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 6d 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.
How it starts
The opening of the file, as written. The whole thing — 384 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CLAUDE.md
本文件用于指导 Claude Code(claude.ai/code)在本仓库内进行开发与维护。
项目定位
KarlCat(卡尔猫)是基于 TypeScript + Node.js 的分布式多人游戏服务端框架。
- 技术栈:Node.js、TypeScript、MongoDB(Mongoose)、protobufjs
- 传输层:TCP / WebSocket / KCP
- 架构来源:pomelo → pinus → mydog → karlcat
- 当前原则:仓库保持“纯框架”,不内置具体业务表/业务模块
纯框架约束(重要)
- 允许保留框架级扩展点,但默认不注入业务表。
server/src/database/中若出现业务表代码,可作为示例;不要默认视为“必须启用”。- 评审时不要把“未启用业务表”当作缺陷,除非用户明确要求跑业务功能。
最小业务接入模板
在保持“纯框架”主干不变的前提下,推荐按以下最小步骤接入业务:
- 定义 Table(数据库服)
- 新建
XxxTable,继承BaseOneKeyTable或Base2Table(或直接BaseTable)。 - 写操作统一走 WAL 包装:
insert/update/deleteRecoverOne -> MarkedXxxFinish。 - 在
init(db)中完成 schema/model 初始化,并调用BaseTable.initDataLog(this)。
- 定义 Model(逻辑服)
- 新建
XxxModel继承BaseModel。 - 通过
app.rpcDB()调用 DB 事件,不直接访问 Mongo。 - 按需开启缓存(覆盖
enableCache()和 TTL 配置)。
- 定义 ModelLogic(业务入口)
- 新建
XxxModelLogic继承BaseModelLogic。 - 在此组织业务读写、缓存刷新、登出清理等流程。
- 注册协议处理入口
- 在
servers/<type>/下新增处理类,继承BaseServerLogic。 - 使用
bindCmd/bindAwait绑定协议处理函数。 - 协议主键需落入
route.ts对应服务器区间。
- 业务模块启用方式(建议)
- 不改框架主干默认行为。
- 在业务分支或部署层显式启用:实例化
XxxTable/XxxModel/XxxModelLogic,并在启动流程中注册。 - 未启用时,框架可运行但业务事件不可用,这属于预期行为。
最小代码骨架(可复制)
server/src/database/XxxTable.ts
import mongoose from "mongoose";
import { allTables } from "../app";
import { BaseTable } from "./BaseTable";
export class XxxTable extends BaseTable {
public static get Instance(): XxxTable {
return this.getInstance();
}
public async init(db: mongoose.Mongoose) {
const schema = new mongoose.Schema({
roleUid: { type: Number, required: true, index: true },
value: { type: Number, default: 0 },
});
this.table = db.model(this.tableName, schema);
allTables.push(this);
BaseTable.initDataLog(this);
}
public async insertOne(data: any): Promise<any> {
this.insertRecoverOne(data, { roleUid: data.roleUid });
const ret = await super.insertOne(data);
if (ret) {
this.MarkedInsertFinish(data);
this.dataLog?.updateLastWriteTime();
}
return ret;
}
}
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.
- 6d ago First seen · 384 lines · 3,960 tokens per session scan A 53c5b7901d56
KarlCat CLAUDE.md is an instructions file published in the GitHub repository 050602/KarlCat (22 stars, last pushed 5mo ago), licensed MIT. It adds 3,960 tokens to every session, about $0.0198 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.
Other instructions, from other repositories
minestom-mcp AGENTS.md
Instructions for RonaldBunk/minestom-mcp, a project described as: A stdio MCP server for Minestom, implemented with the Model Context Protocol SDK and TanStack AI tool definitions.
Silex AGENTS.md
AGENTS.md instructions for silexlabs/Silex, covering agents.md, tech stack, run it locally, building the desktop app and when writing code for silex (editing source).
unity-code-style-guide AGENTS.md
Instructions for krogh-jacobsen/unity-code-style-guide, covering agents.md — unity 6 c, project setup — edit this block, never do these — they corrupt the project, deprecated in unity 6 and if you read nothing else.
game-and-watch-retro-go-sd CLAUDE.md
Claude Code instructions for sylverb/game-and-watch-retro-go-sd, covering claude.md, what this project is, build / flash workflow, architecture and three storage tiers, one elf.
base-building-trap-defense-design-agent-skill CLAUDE.md
Instructions for dungnotnull/base-building-trap-defense-design-agent-skill, covering claude.md — skill 250: base-building-trap-defense-design, skill identity, problem this skill solves, harness flow summary and sub-skills.
trident-mcp AGENTS.md
Instructions for mordor-forge/trident-mcp, covering agents.md, what this is, build and test, single-file verification and e2e tests.