kkRepo: Instructions file for Codex

AGENTS.md

kkRepo AGENTS.md is an instructions file for Codex, OpenCode from klboke/kkRepo. It costs 1,909 tokens per session, scanned A, original, Apache-2.0.

A set of project instructions for building a self-hosted software package repository compatible with Nexus, a popular tool for storing and distributing packages. It covers supported package types, storage, permissions, migration, compatibility, and development rules.

In plain words
What is it for?
Use it when developing, testing, or reviewing the kkrepo package repository, especially its package protocols, caching, permissions, storage, migrations, and compatibility with Nexus.
Why use it?
It gives coding agents the project’s required behavior and constraints, reducing guesswork and preventing changes that work on one server but fail in a multi-server setup.

Instructions file for CodexOpenCode

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

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

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/klboke/kkRepo/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/klboke/kkRepo

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/klboke/kkrepo/agents-md.svg)](https://agentmods.dev/instructions/klboke/kkrepo/agents-md)
Your own site
<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>
Per session 1,909 This file is loaded in full into every session.
When invoked 1,909 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.01909 $0.01909
Opus 5 $0.00955 $0.00955
Sonnet 5 $0.00382 $0.00382
Haiku 4.5 $0.00191 $0.00191

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

Security

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.

AGENTS.md · 84 lines

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 必须保持无业务模块例外。

实现任何类型仓库功能前,必须先检查该仓库的官方协议,保持和官方仓库协议对齐 ,不要自行发明协议行为。

兼容性工作流

对每个协议功能:

  1. 新增或更新面向 Nexus 参考实例运行的兼容性测试。
  2. kkrepo 中实现最小兼容行为。
  3. 对比 HTTP 状态、相关 header、响应体语义、生成的元数据、checksum 和真实客户端行为。
  4. 只有在协议允许时,才规范化 host、timestamp、排序或生成 ID 等非确定性值。

构建与测试注意事项

  • server 模块的编译或测试时,默认带上 -am,例如 mvn -pl server -am testmvn -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 并导致服务启动失败。

Read the full file on GitHub · 84 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. 7d ago First seen · 84 lines · 1,909 tokens per session scan A 28efb9b6de00

Subscribe to this mod's changes

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.

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

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