KimiCodeBar AGENTS.md

KimiCodeBar AGENTS.md is an instructions file for Codex, OpenCode from xifandev/KimiCodeBar. It costs 1,812 tokens per session, scanned A, original, MIT.

A project rule file for KimiCodeBar, a macOS app, that tells a coding agent how to follow platform guidance, use the Kimi command-line tool, handle commits, and verify builds.

In plain words
What is it for?
Use it when changing KimiCodeBar’s SwiftUI interface, Kimi CLI integration, or build configuration. It also sets rules for commits, pushes, and mouse feedback on clickable controls.
Why use it?
It records project-specific decisions so the agent does not guess at system behavior, command options, or the required development workflow.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/xifandev/kimicodebar/agents-md
Clone the repo
git clone --depth 1 https://github.com/xifandev/KimiCodeBar

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/xifandev/kimicodebar/agents-md.svg)](https://agentmods.dev/instructions/xifandev/kimicodebar/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/xifandev/kimicodebar/agents-md"><img src="https://agentmods.dev/badge/instructions/xifandev/kimicodebar/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,812 This file is loaded in full into every session.
When invoked 1,812 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
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 $0.01812 $0.01812
Opus 5 $0.00906 $0.00906
Sonnet 5 $0.00362 $0.00362
Haiku 4.5 $0.00181 $0.00181

Measured 4d ago against content hash 44c19c0a5fce, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 4d 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 · 97 lines

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 commitgit 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 命令的改动前,必须先查阅官方文档确认命令的真实行为与参数,不要凭猜测实现:

构建验证规范

  • 写完代码后只做临时编译验证(xcodebuild build 确认编译通过)。
  • Debug/Release 已分叉(独立 Bundle ID、Debug 带 DEV 角标),本地产物与正式安装版完全隔离,不需要清理临时构建产物
  • 不需要运行测试、也不需要启动 App 验证——维护者会自己用 Xcode 构建运行。

可点击元素反馈规范

所有可点击的 UI 元素必须同时满足:

  1. 鼠标悬停时显示手型光标(pointingHand)

    • 使用自定义 .cursor(.pointingHand) 扩展实现。
    • 即使是系统原生按钮(如 .borderedProminent)也需要显式添加。
  2. 鼠标悬停时提供高亮反馈

    • 改变背景色或前景色,让用户明确感知元素可点击。
    • 推荐:背景从 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 标注不做本地化。

Read the full file on GitHub · 97 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. 4d ago First seen · 97 lines · 1,812 tokens per session scan A 44c19c0a5fce

Subscribe to this mod's changes

KimiCodeBar AGENTS.md is an instructions file published in the GitHub repository xifandev/KimiCodeBar (41 stars, last pushed 10d ago), licensed MIT. It adds 1,812 tokens to every session, about $0.0091 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.