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.
npx skills add echoVic/blade-code --skill runtime-state-bootstrap-and-observabilitygit clone --depth 1 https://github.com/echoVic/blade-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/echovic/blade-code/runtime-state-bootstrap-and-observability)<a href="https://agentmods.dev/skills/echovic/blade-code/runtime-state-bootstrap-and-observability"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/runtime-state-bootstrap-and-observability/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/echovic/blade-code/runtime-state-bootstrap-and-observability"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/runtime-state-bootstrap-and-observability.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00198 | $0.03741 |
| Opus 5.5 | $0.00079 | $0.01496 |
| Sonnet 5.5 | $0.00040 | $0.00748 |
| Haiku 4.5 | $0.00020 | $0.00374 |
Grade A, and why
knowledge-runtime-state-bootstrap-and-observability scanned grade A with 0 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 1mo 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
89% identical to knowledge-session-state-and-context — 146 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 129 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
该组件提供各运行表面共享的进程级基础状态与观测入口;它区分启动目录、当前工作区和稳定项目根,并把 UI 状态、日志、环境探测及项目发现收敛到可被 Agent、CLI、Server、工具和扩展复用的 API。
Directory Layout
packages/cli/src/bootstrap/state.ts— 惰性初始化的 cwd、originalCwd 与 projectRoot 三态packages/cli/src/store/— React 与非 React 共用的 Zustand Store、切片、类型和细粒度选择器packages/cli/src/logging/— 分类 JSONL 日志与独立流式调试日志packages/cli/src/utils/cwd.ts— 基于 AsyncLocalStorage 的并发 cwd 覆写packages/cli/src/utils/environment.ts— 项目根发现、环境提示和目录概览packages/cli/src/utils/packageInfo.ts— 源码与打包布局兼容的运行时包信息packages/cli/src/utils/sessionId.ts— 可安全用于存储路径的 Session IDpackages/cli/src/services/DirectoryPicker.ts— macOS、Windows 与 Linux 原生目录选择packages/cli/src/services/ProjectRegistry.ts— 规范化项目路径的持久绑定注册表
Key Entry Points
getCwd()/runWithCwdOverride()— 获取当前执行上下文的 workspace,或为异步调用链临时覆写vanillaStore/useBladeStore()/ensureStoreInitialized()— 共享状态实例、React 订阅与幂等配置初始化createLogger()/setLoggerSessionId()/streamDebug()— 分类日志、会话日志路由与流式专项诊断getEnvironmentContext()/getVersion()/createSessionId()— 构造环境上下文、读取运行版本和生成存储安全标识NativeDirectoryPicker.pick()/ProjectRegistry.list()— 选择本机目录并读取规范化项目集合
API Surface
Workspace Location
getCwd()— 优先返回当前 AsyncLocalStorage 覆写,否则返回进程级 cwdrunWithCwdOverride(cwd, fn)— 在同步及后续异步调用链内隔离 workspacegetOriginalCwd()— 返回 CLI 被调用时的原始目录,用于解析用户传入的相对路径getProjectRoot()— 返回启动后保持稳定的项目标识根findProjectRoot(startDir)/setCwd(newPath, relativeTo?)— 发现工作区根并更新规范化的全局 cwd
Shared Store
useBladeStore(selector)— React 对共享 Vanilla Store 的细粒度订阅入口getState()— Agent、服务与命令读取当前 Store 快照sessionActions()/appActions()/configActions()— 面向不同状态域的动作入口ensureStoreInitialized()— 以共享 Promise 合并并发配置初始化useCurrentStreamingBuffer()— 以浅比较订阅流式行缓冲、尾部、计数和版本
Observability
createLogger(category, options?)— 创建分类日志器,文件输出与终端调试过滤相互独立Logger.setGlobalDebug(config)— 动态设置全局终端日志开关或分类过滤setLoggerSessionId(sessionId)— 切换后续 JSONL 日志的文件名streamDebug(source, message, data?)— 向独立流式诊断文件追加记录且不向调用方抛错getEnvironmentContext(options?)— 组装系统、Git、脚本和目录信息供系统提示使用
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.
- 1mo ago First seen · 129 lines · 198 tokens per session scan A 24c01d1a1eb3
knowledge-runtime-state-bootstrap-and-observability is a skill published in the GitHub repository echoVic/blade-code (180 stars, last pushed 10d ago), licensed MIT. It adds 198 tokens to every session and 3,741 once invoked, about $0.0008 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 89% identical to knowledge-session-state-and-context, differing in 146 lines, and is treated as a copy.
Other skills, from other repositories
smiles-validation
Strict SMILES validation, structural comparison, and modification verification. Catches invalid LLM-generated molecules.
delegation
Delegates independent work to worker agents through the Task tool, choosing between the explore scout and the ml, biology, physics, chemistry and data specialists, writing a self-contained brief for a worker that cannot see the conversation, setting boundaries on files and compute, using two independent annotators…
tricorder-cli
Full CLI reference for the tricorder daemon (build diagnostics, test results, source lookup, eval comments, logs). This is the fallback invoked by the tricorder skill when the tricorder-mcp MCP tools aren't available or aren't working — invoke tricorder first; it decides whether this is needed.
Manage emails via Himalaya CLI. Use when the user wants to read, send, search, or organize emails. Triggers on "email", "inbox", "send email", "check mail", "reply to", "forward", or mentions of Gmail, Outlook, iCloud, Proton Mail.
install-jazz-github-action
Set up Jazz as a GitHub Action for automated PR code review and on-demand /jazz PR assistance. Use when the user asks to add Jazz to CI, create a GitHub Action workflow, set up PR review automation, enable /jazz commands on PRs, or integrate Jazz with GitHub.
create-workflow
Create Jazz workflow automation files (WORKFLOW.md). Use this for scheduling Jazz agents to run recurring tasks. For OS-level scripts/commands, use create-system-routine.