Agent skill

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print

by echoVic in echoVic/blade-code

覆盖 Blade CLI 启动分流、yargs 参数覆盖、Headless/Print 模式、stdin、Session resume/fork、稳定 JSONL 输出与进程信号语义。进入时机:新增 CLI 选项或子命令、修改 非交互执行、结构化输出、管道输入、退出码或 Headless 事件。

MITAuto-check passed

Install Knowledge Interaction Surfaces CLI Bootstrap Headless And Print

skills CLI
$ npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-cli-bootstrap-headless-and-print -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install echoVic/blade-code knowledge-interaction-surfaces-cli-bootstrap-headless-and-print --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/echoVic/blade-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.trae/knowledges/interaction-surfaces/cli-bootstrap-headless-and-print .claude/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
knowledge-interaction-surfaces-cli-bootstrap-headless-and-print
GitHub stars
180
Token cost
~1.4k tokens
SKILL.md length
355 words
Files
1
Skills in repo
38
Repo updated
First seen
Licence
MIT

At a glance

覆盖 Blade CLI 启动分流、yargs 参数覆盖、Headless/Print 模式、stdin、Session resume/fork、稳定 JSONL 输出与进程信号语义。进入时机:新增 CLI 选项或子命令、修改 非交互执行、结构化输出、管道输入、退出码或 Headless 事件。

  • SKILL.md covers Module Structure, Gotchas, Architecture and Decisions, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print is an agent skill from echoVic/blade-code. 覆盖 Blade CLI 启动分流、yargs 参数覆盖、Headless/Print 模式、stdin、Session resume/fork、稳定 JSONL 输出与进程信号语义。进入时机:新增 CLI 选项或子命令、修改 非交互执行、结构化输出、管道输入、退出码或 Headless 事件。 不包含:Ink 交互细节 (见 ../terminal-ui/)、Hono 服务生命周期(见 ../hono-server-api-and-streaming/)。 关键词:main, globalOptions, runHeadless, runPrint, HeadlessJsonlEvent, HeadlessOutputEgress, resolveNonInteractiveSession, --resume, --task-isolation。

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It works with Hono. The repository describes itself as: AI-powered CLI coding agent with 20+ built-in tools, MCP support, and multi-model providers. The licence is MIT.

Example prompts

  • “/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print”

What it can do on your machine

Read from SKILL.md and the folder at commit 30f8684. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print loads about 1.4k tokens when it runs. Until then it costs about 111 tokens; SKILL.md has 355 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~111
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from echoVic/blade-code at commit 30f8684, republished under its MIT licence (© echoVic). 355 words, ~1,379 tokens.

Download SKILL.mdSave it as .claude/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print/SKILL.md (or your agent's skills folder).
name
knowledge-interaction-surfaces-cli-bootstrap-headless-and-print
description
覆盖 Blade CLI 启动分流、yargs 参数覆盖、Headless/Print 模式、stdin、Session resume/fork、稳定 JSONL 输出与进程信号语义。进入时机:新增 CLI 选项或子命令、修改 非交互执行、结构化输出、管道输入、退出码或 Headless 事件。 不包含:Ink 交互细节 (见 ../terminal-ui/)、Hono 服务生命周期(见 ../hono-server-api-and-streaming/)。 关键词:main, globalOptions, runHeadless, runPrint, HeadlessJsonlEvent, HeadlessOutputEgress, resolveNonInteractiveSession, --resume, --task-isolation。

Module Structure

CLI 层先建立进程级 cwd、日志和可信资源覆盖,再按参数选择专用运行器;Headless 与 Print 都直接拥有 SessionRuntime,但面向不同的机器消费与一次性文本消费场景。

Directory Layout
  • packages/cli/src/blade.tsx — 进程预解析、工作区初始化、模式分流和默认 Ink 启动
  • packages/cli/src/cli/ — 全局选项、设置文件校验、运行时配置合并和中间件
  • packages/cli/src/commands/headless.ts — 完整 Agent loop 的非交互运行器
  • packages/cli/src/commands/headlessEvents.ts — 版本化 snake_case JSONL wire schema
  • packages/cli/src/commands/HeadlessOutputEgress.ts — stdout/stderr 有界串行写入
  • packages/cli/src/commands/print.ts — 单一最终响应运行器
  • packages/cli/src/commands/shared/ — 输入规范化、输出 schema 和非交互 Session 解析
  • packages/cli/src/commands/ — Serve、Web、Browser、Doctor、MCP、Projects、Schedule 等管理命令
Key Entry Points
  • main() in packages/cli/src/blade.tsx — 选择 Headless、Print、ACP、yargs 子命令或 TUI
  • loadConfiguration() in packages/cli/src/cli/middleware.ts — 合并 settings、CLI 和持久配置
  • runHeadless() in packages/cli/src/commands/headless.ts — 执行完整事件化 Agent loop
  • runPrint() in packages/cli/src/commands/print.ts — 聚合一次最终响应并退出
  • resolveNonInteractiveSession() in packages/cli/src/commands/shared/sessionContext.ts — 统一 resume、continue 与 fork

Gotchas

  • --debug 必须在导入 yargs 和创建其他 logger 前从原始 argv 预解析,否则早期模块日志不会继承过滤设置 (packages/cli/src/blade.tsx)
  • 工作区根与命令调用目录不是同一概念:项目探测会更新全局 cwd,但 --plugin-dir 和 --settings 的相对路径仍按原始 invocation cwd 解析 (packages/cli/src/blade.tsx, packages/cli/src/cli/settings.ts)
  • --headless 在全局 GracefulShutdown 初始化前分流并独占 SIGINT/SIGTERM;把它移到普通 yargs 路径会让活动 turn 来不及 settle 就退出 (packages/cli/src/blade.tsx, packages/cli/src/commands/headless.ts, git:3d7ec137)
  • Headless 新 Session 默认 yolo,Print 则回退到 Runtime 配置的权限模式;resume 时两者都优先采用显式参数,再采用 Session 持久模式 (packages/cli/src/commands/headless.ts, packages/cli/src/commands/print.ts)
  • 无参数 --resume 只在 TUI 中打开选择器,Print/Headless 必须获得具体 Session ID;--session-id 与 resume/continue 同用时还必须显式 fork (packages/cli/src/cli/middleware.ts, packages/cli/src/commands/shared/sessionContext.ts)
  • Headless 的 jsonl 是版本化、snake_case 且经 TypeBox 定义的外部契约,不应直接序列化内部 camelCase LoopEvent (packages/cli/src/commands/headlessEvents.ts)
  • Print 的 stream-json 名称不表示逐 delta 输出;实现会先 drainLoop(),最后只写一个 response 或 structured_output 对象 (packages/cli/src/commands/print.ts)
  • ! <command> 不能与 output schema 组合,Headless 中还不能与 --task-isolation 组合;这些路径跳过模型并使用 Shell 自己的退出码 (packages/cli/src/commands/headless.ts, packages/cli/src/commands/print.ts)
  • Headless 的 stdout 与 stderr 是两个独立容量队列;任一 writer 的 EPIPE、超时、overflow 或无法观察的 drain 都会中止当前运行并返回失败 (packages/cli/src/commands/HeadlessOutputEgress.ts, git:1af43232)
  • Headless 对 MCP Elicitation 和 Sampling 默认拒绝,但普通工具确认默认 Session 级批准;这不是 TUI 的交互权限行为 (packages/cli/src/commands/headless.ts)
  • globalOptions 的 yargs 总体为 strict: false 以保留兼容性,Headless 仍在内部用 HeadlessOptionsSchema fail closed;新增选项必须同步这两层,否则可能被 yargs 接收后在运行器拒绝 (packages/cli/src/cli/config.ts, packages/cli/src/commands/headless.ts)
Show full SKILL.md (143 more words)Show less

Architecture

  • 启动优先级固定为纯版本请求 → 工作区/信任预处理 → Headless → 全局关闭处理器 → Print → ACP → yargs 管理命令或 TUI,前面的专用模式不会加载后面的重型 UI 路径 (packages/cli/src/blade.tsx)
  • --settings 先通过封闭字段集合与 TypeBox schema 校验,再只填补 argv 中未显式提供的值,最后由 mergeRuntimeConfig() 与持久配置合并 (packages/cli/src/cli/settings.ts, packages/cli/src/cli/middleware.ts)
  • Print 与 Headless 共用输入规范化、插件资源加载、输出 schema 和非交互 Session 解析;Slash command 可直接产生输出,也可转换为 Skill/自定义命令提示后继续走 Agent (packages/cli/src/commands/shared/commandInput.ts)
  • Headless 的事件 writer 显式映射每一种 LoopEvent,并在每个事件后 flush;结构化输出工具本身从普通 tool 事件中隐藏,只暴露专用 structured_output (packages/cli/src/commands/headless.ts, packages/cli/src/commands/headlessEvents.ts)
  • --task-isolation 不是普通 Session 标志,它先通过 SessionTaskService 创建 durable Task 与可选 worktree,再禁止 Agent 重复调用 Enter/ExitWorktree (packages/cli/src/commands/headless.ts)

Decisions

  • Headless 与 Print 分成两个运行器:前者为自动化保留完整事件、阶段和工具状态,后者为 shell pipeline 保留单个最终值与简单退出码 (packages/cli/src/commands/headless.ts, packages/cli/src/commands/print.ts)
  • JSONL 使用固定 event_version 和运行时 schema,是为了允许外部消费者独立于内部 LoopEvent 演进;新增事件必须先扩充 union 再从 writer 发出 (packages/cli/src/commands/headlessEvents.ts)
  • TUI、yargs 和版本检查采用动态导入,避免 --help、--version 与非交互命令承担 Ink/React 启动成本 (packages/cli/src/blade.tsx)

Patterns

  • 非交互 resume 可以无新输入地继续 pending steering 或 active Goal;两者都不存在时只允许返回已恢复的最终响应,否则报“无未完成 turn” (packages/cli/src/commands/headless.ts, packages/cli/src/commands/print.ts)
  • Session 权限模式在 Runtime 创建和 input preparation 前持久化,避免 UI/输出已宣称新模式但崩溃恢复仍使用旧模式 (packages/cli/src/commands/headless.ts, packages/cli/src/commands/print.ts)
  • Headless 清理顺序是停止 Bus 订阅、flush 已接纳输出、dispose Runtime、关闭 egress、移除信号监听;新增早退路径必须仍经过统一 finally (packages/cli/src/commands/headless.ts)
  • serve 与 web 都注册同一幂等 server stop 清理,区别仅是 Web 命令打开浏览器并展示地址;不要在两个命令中复制服务端资源所有权 (packages/cli/src/commands/serve.ts, packages/cli/src/commands/web.ts)

Dependencies

  • CLI 参数解析依赖 yargs,运行时校验依赖项目 TypeBox wrapper,TUI 启动依赖 Ink/React;这些依赖均在对应分支按需加载 (packages/cli/src/blade.tsx, packages/cli/src/commands/headless.ts)

© echoVic, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .trae/knowledges/interaction-surfaces/cli-bootstrap-headless-and-print of echoVic/blade-code.

Open the folder on GitHubat commit 30f8684

Compare with similar skills

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Knowledge Interaction Surfaces CLI Bootstrap Headless And Print this skillechoVic/blade-code180—~1.4kAutomated safety check: PassMIT
Create Platform Adaptertsedio/tsed3.1k—~2.7kAutomated safety check: PassMIT
Upstash Workflow Patternslobehub/lobehub83k—~1.7kAutomated safety check: PassCustom licence
Sync Templatetsu-moe/tsu-stack126—~2kAutomated safety check: PassMIT
Add Backendahpxex/open-dashboard146—~3.6kAutomated safety check: PassMIT
Publish To Mdpagemaypaz/md.page116—~610Automated safety check: NotesMIT

Similar skills

  • Create a production-ready Ts.ED platform adapter for a new HTTP framework or runtime, such as Hono, Elysia, Bun.serve, or a Node framework.

    3.1k GitHub stars~2.7k tokensUpdated 2 days ago
    Backend & APIsAuto-check passed
  • Implementation patterns for Upstash Workflow and QStash handlers in the LobeHub codebase: dry runs, fan-out chunking and single-item execution.

    83k GitHub stars~1.7k tokensUpdated today
    Backend & APIsAuto-check passed
  • Sync Template

    tsu-moe/tsu-stack

    Compare or update a project derived from tsu-moe/tsu-stack while preserving application features, identity, configuration, and deployment behavior.

    126 GitHub stars~2k tokensUpdated 5 days ago
    DevelopmentAuto-check passed
  • Add Backend

    ahpxex/open-dashboard

    Everything about the data layer — pick one of six ready-to-run backend templates (TanStack Start + Drizzle + better-auth, Hono + Drizzle + better-auth, Hono + Prisma + better-auth, Hono + Drizzle +…

    146 GitHub stars~3.6k tokensUpdated 3 mo ago
    DatabasesAuto-check passed
  • Publish To Mdpage

    maypaz/md.page

    Turn any markdown into a shareable web page via md.page. An agent skill from maypaz/md.page.

    116 GitHub stars~610 tokensUpdated 28 days ago
    Documents & OfficeAuto-check: notes
  • Security Audit

    theopenco/llmgateway

    Security best practices, vulnerability review, and full security audits for LLM Gateway.

    1.7k GitHub stars~1.8k tokensUpdated today
    SecurityAuto-check passed

More from echoVic/blade-code

All 38 skills in this repo
  • Base64 Parser

    echoVic/blade-code

    Base64 编解码工具,支持编码/解码文本、JSON、二进制文件,自动检测格式,支持批量处理. An agent skill from echoVic/blade-code.

    180 GitHub stars~545 tokensUpdated 10 days ago
    Auto-check: notes
  • Code Review

    echoVic/blade-code

    Review frontend code for best practices, bugs, and improvements.

    180 GitHub stars~377 tokensUpdated 10 days ago
    Auto-check: notes
  • GitHub Explorer

    echoVic/blade-code

    Explore and summarize popular GitHub projects. An agent skill from echoVic/blade-code.

    180 GitHub stars~434 tokensUpdated 10 days ago
    Auto-check passed
  • 覆盖 Session 级 LSP 配置快照、stdio 进程、文档同步、语义查询、诊断回注、崩溃恢复 和子 Session 继承。进入条件:新增语言服务器、修改 LSP 工具、排查诊断缺失/重复、 处理 worktree 或 ACP 差异、修复进程泄漏或 transport 代际问题。不包含:VS Code 扩展桥接(见…

    180 GitHub stars~1.9k tokensUpdated 10 days ago
    Auto-check passed
  • 覆盖 SkillRegistry、SKILL.md 延迟加载、自定义命令 Markdown 解析、来源覆盖、插件 命名空间、Session 快照和模型/用户调用入口。进入条件:新增 Skill 或命令字段、调整 发现优先级、调试 /command 或 Skill 工具、修改 Prompt 元数据或消费者集成。不包含: 插件安装生命周期(见…

    180 GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed
  • Covers 领域能力如何包装成内置工具、getBuiltinTools 的 Session 依赖注入、ToolSearch 延迟激活,以及 Goal/Task/Team/Plan/Skill/LSP/MCP/Web/Config/Worktree 适配边界。

    180 GitHub stars~2.1k tokensUpdated 10 days ago
    Auto-check passed

Works with

Questions about Knowledge Interaction Surfaces CLI Bootstrap Headless And Print

What does Knowledge Interaction Surfaces CLI Bootstrap Headless And Print do?

覆盖 Blade CLI 启动分流、yargs 参数覆盖、Headless/Print 模式、stdin、Session resume/fork、稳定 JSONL 输出与进程信号语义。进入时机:新增 CLI 选项或子命令、修改 非交互执行、结构化输出、管道输入、退出码或 Headless 事件。. Knowledge Interaction Surfaces CLI Bootstrap Headless And Print is an agent skill from echoVic/blade-code.

How do I install Knowledge Interaction Surfaces CLI Bootstrap Headless And Print in Claude Code?

Run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-cli-bootstrap-headless-and-print -a claude-code`. Or copy the skill folder (.trae/knowledges/interaction-surfaces/cli-bootstrap-headless-and-print in echoVic/blade-code) into .claude/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print in your project. Claude Code loads it when a task matches its description.

How do I install Knowledge Interaction Surfaces CLI Bootstrap Headless And Print in Codex?

Run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-cli-bootstrap-headless-and-print -a codex`. Or copy the skill folder (.trae/knowledges/interaction-surfaces/cli-bootstrap-headless-and-print in echoVic/blade-code) into .agents/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print in your project. Codex loads it when a task matches its description.

Can I use Knowledge Interaction Surfaces CLI Bootstrap Headless And Print in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add echoVic/blade-code --skill knowledge-interaction-surfaces-cli-bootstrap-headless-and-print -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print, .gemini/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print, .github/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print and .opencode/skills/knowledge-interaction-surfaces-cli-bootstrap-headless-and-print in your project.

What does Knowledge Interaction Surfaces CLI Bootstrap Headless And Print need to run?

SKILL.md names no scripts, command-line tools or credentials: Knowledge Interaction Surfaces CLI Bootstrap Headless And Print is instructions for the agent only.

Does Knowledge Interaction Surfaces CLI Bootstrap Headless And Print access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Knowledge Interaction Surfaces CLI Bootstrap Headless And Print safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Knowledge Interaction Surfaces CLI Bootstrap Headless And Print use?

Knowledge Interaction Surfaces CLI Bootstrap Headless And Print is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Knowledge Interaction Surfaces CLI Bootstrap Headless And Print use?

About 1.4k tokens (SKILL.md is roughly 5.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Knowledge Interaction Surfaces CLI Bootstrap Headless And Print?

Skills that share tags, products or a category with Knowledge Interaction Surfaces CLI Bootstrap Headless And Print: Create Platform Adapter (tsedio/tsed, 3.1k stars), Upstash Workflow Patterns (lobehub/lobehub, 83k stars), Sync Template (tsu-moe/tsu-stack, 126 stars) and Add Backend (ahpxex/open-dashboard, 146 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Knowledge Interaction Surfaces CLI Bootstrap Headless And Print?

echoVic (a GitHub user) maintains it in echoVic/blade-code, which has 180 GitHub stars. The repository holds 38 skills in this directory. The repository was last updated on September 27, 2026.

Source: echoVic/blade-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.