CLAUDE.md@packages/context-cliA

CLAUDE.md@packages/context-cli from context4ai/context is a CLAUDE.md file: the standing instructions Claude Code reads in that repo.

Install it, pinned
mdr add context4ai/context/packages/context-cli/CLAUDE.md@git:20261015.c3a1eab

Pins git:20261015.c3a1eab in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
context4ai/context
Path
packages/context-cli/CLAUDE.md
Versions recorded
6
Latest version
git:20261015.c3a1eab, committed Oct 15, 2026
First version recorded
Sep 13, 2026
Size
37,406 bytes
Repository stars
8
License
MIT

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# @c4a/context-cli

`@c4a/context-cli` 同时提供本地 `context` CLI 和 `context` plugin。本文件是包级开发准则;通用规则见仓库根 `CLAUDE.md`,开发与发布步骤见 `DEVELOPMENT.md`。

## 设计原则(一切决策的最高优先级)

原则分两层、同等优先级、任何 PR 同时过:

- **编码原则**讲“代码该怎么写” — 命名、抽象、fallback、协议收口、心智复杂度。
- **工作流与协议原则**讲“协议该长成什么样” — CLI vs Agent 职责、自愈、错误恢复、view 预算、序锁。

### 编码原则

- **不拟合数据**:不要把 fixture / 单条 case / 当前实测样本的形态当成 API 协议。决策依据是“长期类型 / 类别上的合理性”,不是“这次跑出来什么字段就把字段固化”。
- **长期合理**:选择能在未来 6-12 个月内仍然成立的设计,哪怕实现成本更高。今天省的 1 小时往往换 3 个版本之后的 1 周返工。
- **只维护当前协议**:移除明确退场的字段和流程;已发布接口的变更须评估消费者和迁移路径,不假定没有外部使用者。
- **一步到位**:发现问题就找根因改根因;不要“先打补丁、回头再说”。补丁会变成下一次审查的债务,且 99% 不会“回头”。
- **不要苟且于低成本方案**:低成本方案 ≠ 正确方案。“加一行 if 绕过这个 case”、“在 helper 外面再包一层兜底”、“先 grep 切一下” 都是典型反例。**真正的低成本是不重复修同一个问题**。
- **面向 Agent DX 友好**:默认输出 / 错误信息 / hint / 命令命名 / 参数语义,第一受众是 LLM agent,第二才是人类开发者。判断标准:**一个全新 agent 拿到这个输出,能不能在零外部上下文下做出正确的下一步动作**?做不到就回去改设计。
- **心智低是第一要务**:
  - 同义字段不要起多个名字(`sourceId` / `source_id` / `sourceID` 三选一,全仓一致)。
  - 同类命令不要有两个入口(`workspace write` 和 `compile draft --input` 干同一件事就废一个)。
  - 同一个概念不要在两个 view 里换形态。
  - 错误必须**显式说怎么修**,不能只说“出错了”。
  - 默认值是 agent 最常需要的形态,不是实现最简单的形态。

### 工作流与协议原则
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add context4ai/context/packages/context-cli/CLAUDE.md@sha256:491d6e0d106b8c06

The line at the top of this page pins the label git:20261015.c3a1eab, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_uhjcyd4d6gnz6csh.svg)](https://markdownregistry.com/a/art_uhjcyd4d6gnz6csh)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 6 versions of this file, between Sep 13, 2026 and Oct 15, 2026, about one every 6 days.

versioncommittedcommitsizeaudit
git:20261015.c3a1eab latest2026-10-15 c3a1eab 37,406 BA view · diff
git:20261003.51657062026-10-03 5165706 37,370 BA view · diff
git:20260922.971700a2026-09-22 971700a 37,264 BA view · diff
git:20260914.98efef92026-09-14 98efef9 36,613 BA view · diff
git:20260913.75579c52026-09-13 75579c5 37,518 BA view · diff
git:20260913.a425dec2026-09-13 a425dec 37,512 BA view

Audit of the latest version

A  14 of 14 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • pass: Size between 200 bytes and 200 KB (37406 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Source

GitHub

context4ai/context · 8 stars · license MIT · pushed 2026-10-19 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_uhjcyd4d6gnz6csh
GET https://markdownregistry.com/api/v1/resolve?ref=context4ai/context/packages/context-cli/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/491d6e0d106b8c06679e5041943ef6e69fe1d74de4f4d2c5bd4a2bdef39cee9c

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: what a CLAUDE.md file is · keeping AGENTS.md and CLAUDE.md in sync · which agent file does what.

More from context4ai/context

AGENTS.md AGENTS.md file
context4ai/context · AGENTS.md
git:20260817.7056cd2 · audit B · 8 stars
CLAUDE.md CLAUDE.md file
context4ai/context · CLAUDE.md
git:20261012.3673212 · audit A · 8 stars
AGENTS.md@packages/context-cli AGENTS.md file
context4ai/context · packages/context-cli/AGENTS.md
git:20260817.7056cd2 · audit B · 8 stars
record-workspace-version SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/record-workspace-version/SKILL.md · Record the completed Context knowledge iteration when the workspace Route selects this action.
git:20261012.dce6c6c · audit A · 8 stars
context-recover-workspace SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/recover-workspace/SKILL.md · Recover a stuck existing Context task through the independent diagnostic and scoped recovery commands. Internal entry…
git:20260910.86a3d74 · audit A · 8 stars
context-resolve-current-indexer-gate SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/resolve-current-indexer-gate/SKILL.md · Present and resolve a source-update article structure proposal when selected by the current Context Gate.
git:20260920.5ff41f0 · audit A · 8 stars
context-run-indexer-agent-step SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/run-indexer-agent-step/SKILL.md · Revise approved Context articles or assess an explicit source update when selected by the current Route.
git:20260913.75579c5 · audit A · 8 stars
context-run-indexer-lifecycle SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/run-indexer-lifecycle/SKILL.md · Continue Context investigation and article production only when selected by the workspace Route.
git:20260920.5ff41f0 · audit A · 8 stars
translate-site-locales SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/translate-site-locales/SKILL.md · Translate approved knowledge for the website locales declared in site.locales when the workspace Route selects this…
git:20261015.c3a1eab · audit A · 8 stars
work-production-stage SKILL.md skill
context4ai/context · packages/context-cli/context-workflow/skills/work-production-stage/SKILL.md · Investigate or write within the current Context production directory, or present its work-start report, when selected…
git:20260921.c506207 · audit A · 8 stars
AGENTS.md@packages/context/templates/package-templates.zh-CN/kb AGENTS.md file
context4ai/context · packages/context/templates/package-templates.zh-CN/kb/AGENTS.md
git:20260826.35eaefd · audit A · 8 stars
knowledge-query SKILL.md skill
context4ai/context · packages/context/templates/package-templates.zh-CN/kb/skills/knowledge-query/SKILL.md · 查询 {{displayName}} 中经过审核、可追溯来源的知识。用于查找包内实体、API、行为、流程、约束、决策、排障信息、关系和覆盖范围。
git:20261004.512593e · audit B · 8 stars

Every file in context4ai/context

Browse by kind, by grade A, or by owner.