CLAUDE.md@packages/tuiA

CLAUDE.md@packages/tui 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/tui/CLAUDE.md@git:20260817.7056cd2

Pins git:20260817.7056cd2 in mdr.lock. Pin the fingerprint instead.

Audit grade
A, 14 of 14 checks passed
Kind
CLAUDE.md file
Repository
context4ai/context
Path
packages/tui/CLAUDE.md
Versions recorded
1
Latest version
git:20260817.7056cd2, committed Aug 17, 2026
Size
2,752 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/tui

基于 Ink 5.x 的终端 UI 共享组件库,供 `dev-cli` 使用。

## Ink stdin 生命周期陷阱(必须遵守)

Ink 在 unmount 时会对 `process.stdin` 执行以下操作:

1. `stdin.setRawMode(false)` — 关闭 raw mode
2. `stdin.removeListener("readable", ...)` — 移除数据监听
3. **`stdin.unref()`** — 取消事件循环引用

第 3 步会导致:Ink 退出后如果立即使用 `readline.createInterface` 读取用户输入,Node.js 事件循环因无活跃 ref handle 而**直接退出进程**,readline 来不及等待输入。

**任何在 Ink render/unmount 之后需要读取 stdin 的场景,都必须先恢复 stdin 状态:**

```typescript
function resetStdin(): void {
  const { stdin } = process;
  if (stdin.isTTY) {
    try {
      stdin.setRawMode(false);
    } catch {
      // ignore
    }
  }
  if (typeof stdin.ref === "function") {
    stdin.ref();       // 重新引用,防止事件循环退出
  }
  if (stdin.isPaused()) {
    stdin.resume();    // 恢复流
  }
  // 清理 Ink 遗留的 listener
  stdin.removeAllListeners("readable");
  stdin.removeAllListeners("data");
}
```

**调用时机**:在 `inkRender` 返回的 `waitUntilExit()` resolve 之后、执行任何 readline 操作之前。

典型模式:

```typescript
const selection = await showMenu();  // 内部 inkRender + waitUntilExit
resetStdin();                        // 必须在此恢复
await executeCommand(selection);     // 内部可安全使用 readline
```

## Unicode 宽字符与 Ink 布局(必须遵守)
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add context4ai/context/packages/tui/CLAUDE.md@sha256:e4649ce838ac241b

The line at the top of this page pins the label git:20260817.7056cd2, 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_67vpceagzejtxvur.svg)](https://markdownregistry.com/a/art_67vpceagzejtxvur)

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

Versions

The registry has recorded 1 version of this file, committed on Aug 17, 2026.

versioncommittedcommitsizeaudit
git:20260817.7056cd2 latest2026-08-17 7056cd2 2,752 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 (2752 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_67vpceagzejtxvur
GET https://markdownregistry.com/api/v1/resolve?ref=context4ai/context/packages/tui/CLAUDE.md
GET https://markdownregistry.com/api/v1/blob/e4649ce838ac241bbd4598eadbb349226cf3203983bd8418733085c66a8c6a84

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
CLAUDE.md@packages/context-cli CLAUDE.md file
context4ai/context · packages/context-cli/CLAUDE.md
git:20261015.c3a1eab · audit A · 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

Every file in context4ai/context

Other files named CLAUDE.md@packages/tui

CLAUDE.md@packages/tui CLAUDE.md file
roasbeef/loom · packages/tui/CLAUDE.md
git:20261020.865f4bd · audit B · 11 stars

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