Borrowing it
Nothing to install: this file belongs to klboke/kkRepo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/klboke/kkRepo/main/AGENTS.mdgit clone --depth 1 https://github.com/klboke/kkRepoWrote 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/klboke/kkrepo/agents-md)<a href="https://agentmods.dev/instructions/klboke/kkrepo/agents-md"><img src="https://agentmods.dev/badge/instructions/klboke/kkrepo/agents-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.01909 | $0.01909 |
| Opus 5 | $0.00955 | $0.00955 |
| Sonnet 5 | $0.00382 | $0.00382 |
| Haiku 4.5 | $0.00191 | $0.00191 |
Grade A, and why
kkRepo 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 7d 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 — 84 lines — stays where its author put it; the contents beside it link to each section on GitHub.
kkrepo Agent 指南
本项目由 Infra 在 AI 辅助下实现。必须把 Nexus 当作兼容性参考,而不是凭记忆重新发明行为。
产品目标
构建一个兼容 Nexus 的自托管制品仓库,包含:
- Maven、npm、PyPI、Go、Helm、Cargo/Rust、Dart/Pub、Composer/PHP、Terraform、Swift Package Registry、Docker/OCI、NuGet、RubyGems、Yum 和 Raw 制品支持;具体 hosted/proxy/group 边界以兼容性矩阵为准。
- 面向用户、用户组、角色、仓库权限和 CI token 的完整权限管理。
- 兼容 Nexus 的客户端协议行为和
/repository/<repo>/...URL 布局。 - 使用 MySQL 存储元数据、用户数据、权限数据、token 数据、审计数据和迁移状态。
- 使用 MySQL 承载跨副本 session、短生命周期协同状态和版本水位;使用进程内 TTL cache 作为可重建的节点本地热缓存。
- 使用 OSS/S3 存储所有制品 blob。
- 运行时不依赖 OrientDB、内嵌 Elasticsearch,也不要求本地持久化 blob 文件系统。
- 用于迁移现有 Nexus 仓库、元数据、权限和 blob 的迁移工具。
- 用户侧迁移尽可能接近无感。
强制开发规则
任何功能在设计和实现时都必须考虑分布式多副本部署。涉及状态、缓存、锁、后台任务、session、上传/删除、索引重建、metadata、negative cache 或权限判定的逻辑,默认不能依赖单个 JVM 进程内状态作为唯一真相;应使用 MySQL、OSS/S3、共享 TTL cache、分布式锁、marker 队列或其它可协调机制。允许使用进程内缓存作为节点本地热缓存,但必须满足:丢失后可自动恢复、不影响正确性、有明确 TTL 或失效条件,并在代码或文档中说明多副本语义。
所有业务模块的进程内缓存必须通过 cache 模块提供的统一抽象创建:强类型、可重建的节点本地热缓存使用 LocalCacheFactory,跨业务复用的字符串/JSON TTL、negative cache 和 per-pod 计数使用 SharedCache。业务模块禁止直接依赖或配置 Caffeine 等具体缓存库,也禁止用裸 Map 自行实现长期缓存。新增缓存策略时必须在 cache 模块实现,并同步补充 Native runtime hints 与对应测试;CacheAbstractionBoundaryTest 必须保持无业务模块例外。
实现任何类型仓库功能前,必须先检查该仓库的官方协议,保持和官方仓库协议对齐 ,不要自行发明协议行为。
兼容性工作流
对每个协议功能:
- 新增或更新面向 Nexus 参考实例运行的兼容性测试。
- 在
kkrepo中实现最小兼容行为。 - 对比 HTTP 状态、相关 header、响应体语义、生成的元数据、checksum 和真实客户端行为。
- 只有在协议允许时,才规范化 host、timestamp、排序或生成 ID 等非确定性值。
构建与测试注意事项
- 跑
server模块的编译或测试时,默认带上-am,例如mvn -pl server -am test或mvn -pl server -am -Dtest=RepositorySecurityFilterTest -Dsurefire.failIfNoSpecifiedTests=false test。不要单独跑mvn -pl server ...,否则 Maven 可能命中本地仓库里过期或缺失的0.1.0模块缓存,误报类似kkrepo-storage-file缺失的依赖解析错误。 - 指定单个 server 测试并使用
-am时,加上-Dsurefire.failIfNoSpecifiedTests=false,避免上游依赖模块因为没有匹配测试类而让 reactor 提前失败。 - 覆盖本地 38090 运行容器的
/app/kkrepo.jar前,必须先生成 Spring Boot 可执行 jar,例如mvn -pl server -am -DskipTests package spring-boot:repackage。普通server模块 jar 没有可执行入口,复制进容器后会报no main manifest attribute, in /app/kkrepo.jar并导致服务启动失败。
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.
- 7d ago First seen · 84 lines · 1,909 tokens per session scan A 28efb9b6de00
kkRepo AGENTS.md is an instructions file published in the GitHub repository klboke/kkRepo (260 stars, last pushed 6d ago), licensed Apache-2.0. It adds 1,909 tokens to every session, about $0.0095 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
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.
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.
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).
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).
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.
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.