GitIM AGENTS.md

Project instructions for GitIM, a messaging system that stores plain-text conversations in Git. They describe its Rust service and command-line tool, React interface, communication methods, and repository layout.

In plain words
What is it for?
Use them when working on GitIM's message format, daemon, command-line tool, web interface, Git synchronization, agent integrations, or Rust crates.
Why use it?
They explain how messages, users, synchronization, validation, and the main code modules fit together before you change the system.

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/ciferateam/gitim/agents-md
Clone the repo
git clone --depth 1 https://github.com/CiferaTeam/GitIM

Made for: Codex, OpenCode.

Per session 11,484 This file is loaded in full into every session.
When invoked 11,484 The same file — it is already loaded in full.
Security scan D 3 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.11484 $0.11484
Opus 5 $0.05742 $0.05742
Sonnet 5 $0.02297 $0.02297
Haiku 4.5 $0.01148 $0.01148

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

Security

Grade D, and why

GitIM AGENTS.md scanned grade D with 3 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 2d 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.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

`$workspace/.gitim-runtime/config.json`(chmod 0600,unix 唯一权限模型):

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- **local → github 迁移**:需 rm -rf workspace 重建

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Daemon 走 `AuthData::GitHub` 分支自己推断身份(curl `/user`)
AGENTS.md · 286 lines

How it starts

The opening of the file, as written. The whole thing — 286 lines — stays where its author put it; the contents beside it link to each section on GitHub.

GitIM

面向 Agent 团队的 AI 原生 IM 协议。纯文本文件 + Git。

架构

  • 消息是 .thread 文件中的行,前缀格式:[L<行号>][P<父行号>][@<handler>][<时间戳>] <正文>
  • 通过 P 字段实现线程链 — 无需 thread_id
  • 续行:下一行没有 [L...] 开头即为当前消息的续行
  • 用户:users/<handler>.meta.yaml,handler = GitHub handle(小写)
  • 技术栈:Rust daemon(核心引擎)+ Rust CLI + React WebUI
  • 通信:Unix socket(默认)+ HTTP(调试模式 & WebUI)
  • Git 负责持久化、同步和审计追踪
  • 合规性:daemon 写入验证(主防线)+ 读取检测(第二防线)

Crate 地图

gitim-cli ──→ gitim-client ──→ [Unix socket IPC] ──→ gitim-daemon
                                                        ├── gitim-core(类型 + 解析)
                                                        └── gitim-sync(git 同步)

gitim-runtime ──→ gitim-client
               ──→ gitim-agent-provider
                     ├── claude / codex(原生 CLI 集成)
                     ├── hermes / kimi(ACP 集成)
                     ├── opencode / pi / cursor / gemini / openclaw
                     └── mock(测试用)

核心 crate

Crate 职责 关键模块
gitim-core 数据类型、消息解析、格式化、校验 types, parser, formatter, validator, dm, mention, link
gitim-daemon 主服务进程,处理所有 IM 操作 handlers(消息/频道), board_handlers(看板), onboard(用户注册), identity(身份推断), http(SSE 推送), state(共享状态)
gitim-sync Git 同步循环、冲突解决、行号重编 git(GitStorage 封装), sync_loop, conflict, renumber, watcher
gitim-client IPC 客户端库,封装 daemon 通信 GitimClient(所有 API 方法), daemon(进程管理)
gitim-cli 命令行工具(clap) send, read, channels, create-channel, join-channel, status
gitim-wasm core/sync 纯逻辑的 wasm-bindgen 绑定,daemon-web 的协议逻辑单源 单文件 lib.rs;产物 pkg/ 提交进 git,改 core/sync 协议逻辑后跑 npm run build:wasm(frontend)重建并 commit
gitim-updater self-update 共享核心(CLI 和 runtime 共用) 版本解析、平台检测、fetch_latest_taginstall_update、原子替换 replace_binaries

Agent 运行时

Crate 职责 关键模块
gitim-runtime Agent 生命周期管理、polling、HTTP API、CLI 子命令 agent(provision), agent_loop(消息检测 → AI 处理 → 回复), poller, preflight, http(WebUI API), cli(agent-facing 命令工具 → HTTP thin wrapper)
gitim-agent-provider AI 提供商抽象层 claude, codex, hermes, kimi, opencode, pi, cursor, gemini, openclaw, mock

Read the full file on GitHub · 286 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. 2d ago First seen · 286 lines · 11,484 tokens per session scan D a556c4add46e

Subscribe to this mod's changes

GitIM AGENTS.md is an instructions file published in the GitHub repository CiferaTeam/GitIM (24 stars, last pushed 4d ago), licensed Apache-2.0. It adds 11,484 tokens to every session, about $0.0574 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, recursive force delete, makes network calls). 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

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

buildNext

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

next.js 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

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

spec-kit 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,040 tokens

langchain 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,345 tokens