Borrowing it
Nothing to install: this file belongs to xifandev/KimiCodeBar. 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/xifandev/KimiCodeBar/main/AGENTS.mdgit clone --depth 1 https://github.com/xifandev/KimiCodeBarWrote 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/xifandev/kimicodebar/agents-md)<a href="https://agentmods.dev/instructions/xifandev/kimicodebar/agents-md"><img src="https://agentmods.dev/badge/instructions/xifandev/kimicodebar/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.
<a href="https://agentmods.dev/instructions/xifandev/kimicodebar/agents-md"><img src="https://agentmods.dev/badge/instructions/xifandev/kimicodebar/agents-md.svg" alt="Reviewed on agentmods" width="80" 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.01816 | $0.01816 |
| Opus 5.5 | $0.00726 | $0.00726 |
| Sonnet 5.5 | $0.00363 | $0.00363 |
| Haiku 4.5 | $0.00182 | $0.00182 |
Grade A, and why
KimiCodeBar 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 29d 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 — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.
KimiCodeBar 交互规范
代码提交规范
- 完成修改后,尤其是改动较多、涉及关键功能 / UI 重构 / bug 修复时,Agent 应直接执行
git commit并git push推送到 GitHub,无需询问用户确认。 - 推送前只暂存与本次修改相关的改动,不要把工作区中无关的未提交改动一并提交。
- Commit message 使用中文,标题和正文都用中文,避免中英文混用。
平台规范优先
实现任何涉及系统组件、框架 API 或平台特定行为的功能前,先阅读对应系统的官方文档 / Human Interface Guidelines / API Reference,确认推荐用法。
案例:主题切换不要对
MenuBarExtra内容视图使用.preferredColorScheme(),这会触发 SwiftUI 运行时警告Publishing changes from within view updates is not allowed。应通过NSApplication.shared.appearance控制应用整体外观,让NSColor动态配色自动适配。
Kimi CLI 命令参考
涉及 kimi 命令的改动前,必须先查阅官方文档确认命令的真实行为与参数,不要凭猜测实现:
- 命令参考:https://moonshotai.github.io/kimi-code/zh/reference/kimi-command.html
- 本地服务还会挂载
GET /openapi.json(REST 路由文档)与GET /asyncapi.json(WebSocket 协议文档),需要接口细节时优先从运行中的实例拉取。
构建验证规范
- 写完代码后只做临时编译验证(
xcodebuild build确认编译通过)。 - Debug/Release 已分叉(独立 Bundle ID、Debug 带 DEV 角标),本地产物与正式安装版完全隔离,不需要清理临时构建产物。
- 不需要运行测试、也不需要启动 App 验证——维护者会自己用 Xcode 构建运行。
可点击元素反馈规范
所有可点击的 UI 元素必须同时满足:
-
鼠标悬停时显示手型光标(pointingHand)
- 使用自定义
.cursor(.pointingHand)扩展实现。 - 即使是系统原生按钮(如
.borderedProminent)也需要显式添加。
- 使用自定义
-
鼠标悬停时提供高亮反馈
- 改变背景色或前景色,让用户明确感知元素可点击。
- 推荐:背景从
Color.white.opacity(0.08)提升到Color.white.opacity(0.14),前景从.kimiTextSecondary提升到.kimiTextPrimary。 - 使用
@State private var isHoveredXXX配合.onHover { isHoveredXXX = $0 }实现。
新增可点击元素时检查:
- 是否添加了
.cursor(.pointingHand)? - 是否添加了
@State isHovered状态? - 是否在
.onHover中改变背景/前景色? - 禁用状态下是否移除了手型光标并降低视觉权重?
本地化规范(中 / 英双语)
App 支持应用内语言切换(跟随系统 / 中文 / English),机制见 macOS/KimiCodeBar/LanguageManager.swift:
- 中文字面量即本地化 key,英文翻译维护在
macOS/KimiCodeBar/Localizable.xcstrings(String Catalog,编译进en.lproj)。查不到译文时回退中文,界面不会出空白。 - 新增用户可见文案时:
Text("中文")一律写成LText("中文")(自观察包装,语言切换自动重渲染)。- String 类型场景(组件 title 参数、枚举 displayName 等)用
languageManager.tr("中文")(View 内需有@StateObject private var languageManager = LanguageManager.shared)或静态LanguageManager.tr("中文")。 - 插值用
%@(多个用%1$@/%2$@),字面量%写%%。 - 同时在
Localizable.xcstrings补上en翻译,术语与已有条目保持一致(如 加油包 Booster Pack、归档 Archive)。
- 品牌名(Kimi / KimiCodeBar / Kimi Web)、菜单栏图形样式的
7D/5H/月标注不做本地化。
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.
- 29d ago Changed · +4 tokens per session 24f7d3d4c755
- 2mo ago First seen · 97 lines · 1,812 tokens per session scan A 44c19c0a5fce
KimiCodeBar AGENTS.md is an instructions file published in the GitHub repository xifandev/KimiCodeBar (47 stars, last pushed 9d ago), licensed MIT. It adds 1,816 tokens to every session, about $0.0073 per session on Opus 5.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.
KimiCodeBar AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| KimiCodeBar AGENTS.mdxifandev/KimiCodeBar | Instructions file | 47 | 9d ago | MIT | A | 1,816 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |