ink — for Claude Code termcn, community, for Claude Code, ide skills, shadcn, <Text>, display: flex, <div style="display: flex">, useApp().exit(), process.exit()

v1.0.0

关于此技能

适用场景: Ideal for AI agents that need ink platform skill. 本地化技能摘要: Beautiful terminal UI components, built on Ink. It covers cli, ink, react workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

功能特性

Ink Platform Skill
Follow these rules in all Ink code:
All text must be wrapped in <Text . Raw strings outside <Text will throw an error.
<Text only allows text nodes and nested <Text . You cannot nest <Box inside <Text .
<Box is always display: flex. Think of every <Box as <div style="display: flex" .

# 核心主题

shadcn-labs shadcn-labs
[343]
[14]
更新于: 4/23/2026

Killer-Skills Review

Decision support comes first. Repository text comes second.

Reference-Only Page Review Score: 10/11

This page remains useful for teams, but Killer-Skills treats it as reference material instead of a primary organic landing page.

Original recommendation layer Concrete use-case guidance Explicit limitations and caution Quality floor passed for review
Review Score
10/11
Quality Score
59
Canonical Locale
en
Detected Body Locale
en

适用场景: Ideal for AI agents that need ink platform skill. 本地化技能摘要: Beautiful terminal UI components, built on Ink. It covers cli, ink, react workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

核心价值

推荐说明: ink helps agents ink platform skill. Beautiful terminal UI components, built on Ink. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

适用 Agent 类型

适用场景: Ideal for AI agents that need ink platform skill.

赋予的主要能力 · ink

适用任务: Applying Ink Platform Skill
适用任务: Applying Follow these rules in all Ink code:
适用任务: Applying All text must be wrapped in <Text . Raw strings outside <Text will throw an error

! 使用限制与门槛

  • 限制说明: All text must be wrapped in <Text . Raw strings outside <Text will throw an error.
  • 限制说明: <Text only allows text nodes and nested <Text . You cannot nest <Box inside <Text .
  • 限制说明: <Static only renders new items. Changes to previously rendered items are ignored.

Why this page is reference-only

  • - Current locale does not satisfy the locale-governance contract.

Source Boundary

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

评审后的下一步

先决定动作,再继续看上游仓库材料

Killer-Skills 的主价值不应该停在“帮你打开仓库说明”,而是先帮你判断这项技能是否值得安装、是否应该回到可信集合复核,以及是否已经进入工作流落地阶段。

实验室 Demo

Browser Sandbox Environment

⚡️ Ready to unleash?

Experience this Agent in a zero-setup browser environment powered by WebContainers. No installation required.

Boot Container Sandbox

常见问题与安装步骤

以下问题与步骤与页面结构化数据保持一致,便于搜索引擎理解页面内容。

? FAQ

ink 是什么?

适用场景: Ideal for AI agents that need ink platform skill. 本地化技能摘要: Beautiful terminal UI components, built on Ink. It covers cli, ink, react workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

如何安装 ink?

运行命令:npx killer-skills add shadcn-labs/termcn/ink。支持 Cursor、Windsurf、VS Code、Claude Code 等 19+ IDE/Agent。

ink 适用于哪些场景?

典型场景包括:适用任务: Applying Ink Platform Skill、适用任务: Applying Follow these rules in all Ink code:、适用任务: Applying All text must be wrapped in <Text . Raw strings outside <Text will throw an error。

ink 支持哪些 IDE 或 Agent?

该技能兼容 Cursor, Windsurf, VS Code, Trae, Claude Code, OpenClaw, Aider, Codex, OpenCode, Goose, Cline, Roo Code, Kiro, Augment Code, Continue, GitHub Copilot, Sourcegraph Cody, and Amazon Q Developer。可使用 Killer-Skills CLI 一条命令通用安装。

ink 有哪些限制?

限制说明: All text must be wrapped in <Text . Raw strings outside <Text will throw an error.;限制说明: <Text only allows text nodes and nested <Text . You cannot nest <Box inside <Text .;限制说明: <Static only renders new items. Changes to previously rendered items are ignored.。

安装步骤

  1. 1. 打开终端

    在你的项目目录中打开终端或命令行。

  2. 2. 执行安装命令

    运行:npx killer-skills add shadcn-labs/termcn/ink。CLI 会自动识别 IDE 或 AI Agent 并完成配置。

  3. 3. 开始使用技能

    ink 已启用,可立即在当前项目中调用。

! 参考页模式

此页面仍可作为安装与查阅参考,但 Killer-Skills 不再把它视为主要可索引落地页。请优先阅读上方评审结论,再决定是否继续查看上游仓库说明。

Upstream Repository Material

The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.

Upstream Source

ink

Beautiful terminal UI components, built on Ink. It covers cli, ink, react workflows. This AI agent skill supports Claude Code, Cursor, and Windsurf workflows.

SKILL.md
Readonly
Upstream Repository Material
The section below is imported from the upstream repository and should be treated as secondary evidence. Use the Killer-Skills review above as the primary layer for fit, risk, and installation decisions.
Supporting Evidence

Ink Platform Skill

Consolidated skill for building CLI applications with Ink (React for CLIs). Use decision trees below to find the right components and patterns, then load detailed references.

Critical Rules

Follow these rules in all Ink code:

  1. All text must be wrapped in <Text>. Raw strings outside <Text> will throw an error.
  2. <Text> only allows text nodes and nested <Text>. You cannot nest <Box> inside <Text>.
  3. <Box> is always display: flex. Think of every <Box> as <div style="display: flex">.
  4. Use useApp().exit() to exit. Never call process.exit() directly from within components.
  5. Install both ink and react. They are peer dependencies: npm install ink react.
  6. <Static> only renders new items. Changes to previously rendered items are ignored.

How to Use This Skill

Reference File Structure

Core references follow a 5-file pattern. Cross-cutting concepts are single-file guides.

./references/core/ contains:

FilePurposeWhen to Read
REFERENCE.mdOverview, when to use, quick startAlways read first
api.mdrender(), renderToString(), Instance, measureElementWriting code
configuration.mdRender options, environment varsConfiguring an app
patterns.mdCommon patterns, best practicesImplementation guidance
gotchas.mdPitfalls, limitations, debuggingTroubleshooting

Component, hook, and concept references in ./references/<area>/ have REFERENCE.md as the entry point.

Reading Order

  1. Start with core/REFERENCE.md for project overview
  2. Then read additional files relevant to your task:
    • Building UI -> components/REFERENCE.md + specific component files
    • Handling input -> hooks/input.md
    • Layout/positioning -> layout/REFERENCE.md
    • App lifecycle -> hooks/app-lifecycle.md
    • Focus management -> hooks/focus.md
    • Testing -> testing/REFERENCE.md
    • Accessibility -> accessibility/REFERENCE.md
    • Troubleshooting -> core/gotchas.md
    • Best practices / rules -> rules/RULES.md + specific rule files

Example Paths

./references/core/REFERENCE.md             # Start here
./references/core/api.md                   # render(), renderToString()
./references/components/text.md            # <Text> component
./references/components/box.md             # <Box> component (layout, borders)
./references/hooks/input.md                # useInput hook
./references/layout/patterns.md            # Common layout recipes
./references/testing/REFERENCE.md          # ink-testing-library
./rules/RULES.md                           # Best practices entry point
./rules/performance.md                     # FPS, Static, memoization
./rules/components.md                      # Per-component rules
./rules/hooks.md                           # Per-hook rules
./rules/core.md                            # render(), errors, environment

Quick Decision Trees

"I need to display content"

Display content?
├─ Plain or styled text -> components/text.md
├─ Container with layout -> components/box.md
├─ Container with borders -> components/box.md (borderStyle)
├─ Container with background color -> components/box.md (backgroundColor)
├─ Line breaks within text -> components/utilities.md (Newline)
├─ Flexible spacer -> components/utilities.md (Spacer)
├─ Permanent log output (completed items) -> components/utilities.md (Static)
└─ Transform text output (uppercase, gradient) -> components/utilities.md (Transform)

"I need user input"

User input?
├─ Keyboard shortcuts/arrow keys -> hooks/input.md (useInput)
├─ Raw stdin access -> hooks/stdio.md (useStdin)
├─ Tab/Shift+Tab focus cycling -> hooks/focus.md (useFocus)
├─ Programmatic focus control -> hooks/focus.md (useFocusManager)
└─ Cursor positioning (IME) -> hooks/focus.md (useCursor)

"I need layout/positioning"

Layout?
├─ Horizontal row of elements -> layout/REFERENCE.md (flexDirection: row)
├─ Vertical stack of elements -> layout/REFERENCE.md (flexDirection: column)
├─ Centering content -> layout/patterns.md
├─ Spacing between elements -> layout/REFERENCE.md (gap, margin, padding)
├─ Fixed width/height -> components/box.md (width, height)
├─ Percentage sizing -> components/box.md (width: "50%")
├─ Min/max constraints -> components/box.md (minWidth, maxWidth, maxHeight)
├─ Push elements apart -> components/utilities.md (Spacer)
├─ Flex grow/shrink -> layout/REFERENCE.md (flexGrow, flexShrink)
├─ Wrapping content -> layout/REFERENCE.md (flexWrap)
├─ Overflow control -> components/box.md (overflow)
└─ Complex nested layouts -> layout/patterns.md

"I need to manage app lifecycle"

App lifecycle?
├─ Mount and render -> core/api.md (render)
├─ Render to string (no terminal) -> core/api.md (renderToString)
├─ Exit the app programmatically -> hooks/app-lifecycle.md (useApp, exit)
├─ Wait for app to finish -> core/api.md (waitUntilExit)
├─ Re-render with new props -> core/api.md (rerender)
├─ Unmount the app -> core/api.md (unmount)
└─ Write to stdout/stderr outside Ink -> hooks/stdio.md

"I need to test my CLI"

Testing?
├─ Render and check output -> testing/REFERENCE.md
├─ Simulate user input -> testing/REFERENCE.md (stdin.write)
├─ Snapshot testing -> testing/REFERENCE.md
└─ Check last rendered frame -> testing/REFERENCE.md (lastFrame)

"I need accessibility"

Accessibility?
├─ Screen reader support -> accessibility/REFERENCE.md
├─ ARIA roles (checkbox, button, etc.) -> accessibility/REFERENCE.md
├─ ARIA state (checked, disabled, etc.) -> accessibility/REFERENCE.md
├─ Custom screen reader labels -> accessibility/REFERENCE.md (aria-label)
└─ Hide from screen readers -> accessibility/REFERENCE.md (aria-hidden)

"I need to debug/troubleshoot"

Troubleshooting?
├─ Text rendering issues -> core/gotchas.md
├─ Layout problems -> core/gotchas.md + layout/REFERENCE.md
├─ Input not working -> core/gotchas.md + hooks/input.md
├─ Process not exiting -> core/gotchas.md
├─ CI rendering issues -> core/configuration.md (CI mode)
├─ Console output mixing -> core/configuration.md (patchConsole)
└─ Performance/flickering -> core/configuration.md + rules/performance.md

"I want best practices / production-ready code"

Best practices?
├─ General rules (critical) -> rules/RULES.md
├─ Performance (FPS, Static, memoization) -> rules/performance.md
├─ Per-component patterns & anti-patterns -> rules/components.md
├─ Per-hook patterns & gotchas -> rules/hooks.md
└─ render() / errors / environment behavior -> rules/core.md

Troubleshooting Index

  • Text outside <Text> -> core/gotchas.md
  • <Box> inside <Text> -> core/gotchas.md
  • Process hanging/not exiting -> core/gotchas.md
  • Console.log mixing with output -> core/configuration.md
  • Layout misalignment -> layout/REFERENCE.md
  • Input not received -> hooks/input.md + rules/hooks.md
  • Focus not cycling -> hooks/focus.md + rules/hooks.md
  • CI output issues -> core/configuration.md + rules/core.md
  • Flickering/performance -> core/configuration.md + rules/performance.md
  • Anti-patterns / pitfalls -> rules/components.md, rules/hooks.md, rules/core.md

Product Index

Core

AreaEntry FileDescription
Core./references/core/REFERENCE.mdOverview, quick start, project setup
API./references/core/api.mdrender, renderToString, Instance
Config./references/core/configuration.mdRender options, environment variables
Patterns./references/core/patterns.mdCommon patterns and recipes
Gotchas./references/core/gotchas.mdPitfalls and debugging

Components

ComponentEntry FileDescription
Overview./references/components/REFERENCE.mdAll components at a glance
Text./references/components/text.mdText display and styling
Box./references/components/box.mdLayout, borders, backgrounds
Utilities./references/components/utilities.mdNewline, Spacer, Static, Transform

Hooks

HookEntry FileDescription
Overview./references/hooks/REFERENCE.mdAll hooks at a glance
Input./references/hooks/input.mduseInput for keyboard handling
App Lifecycle./references/hooks/app-lifecycle.mduseApp for exit control
Stdio./references/hooks/stdio.mduseStdin, useStdout, useStderr
Focus./references/hooks/focus.mduseFocus, useFocusManager, useCursor

Cross-Cutting Concepts

ConceptEntry FileDescription
Layout./references/layout/REFERENCE.mdYoga/Flexbox layout system
Layout Patterns./references/layout/patterns.mdCommon layout recipes
Testing./references/testing/REFERENCE.mdink-testing-library
Accessibility./references/accessibility/REFERENCE.mdScreen reader & ARIA support

Best Practices (Rules)

Rule FileEntry FileDescription
Overview./rules/RULES.mdEntry point + 10 critical rules
Performance./rules/performance.mdFPS tuning, Static, memoization, incremental rendering
Components./rules/components.mdBox, Text, Static, Transform, Newline, Spacer rules
Hooks./rules/hooks.mduseInput, useApp, useFocus, useCursor, useStdin rules
Core./rules/core.mdrender(), renderToString(), errors, CI, Kitty protocol

Resources

Repository: https://github.com/vadimdemedes/ink npm: https://www.npmjs.com/package/ink Testing Library: https://github.com/vadimdemedes/ink-testing-library Create Ink App: https://github.com/vadimdemedes/create-ink-app

相关技能

寻找 ink 的替代方案 (Alternative) 或可搭配使用的同类 community Skill?探索以下相关开源技能。

查看全部

openclaw-release-maintainer

Logo of openclaw
openclaw

Your own personal AI assistant. Any OS. Any Platform. The lobster way. 🦞

333.8k
0
AI

widget-generator

Logo of f
f

为prompts.chat的信息反馈系统生成可定制的插件小部件

149.6k
0
AI

flags

Logo of vercel
vercel

React 框架

138.4k
0
浏览器

pr-review

Logo of pytorch
pytorch

Python中具有强大GPU加速的张量和动态神经网络

98.6k
0
开发者工具