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 shared-api-and-runtime-schemasgit 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/shared-api-and-runtime-schemas)<a href="https://agentmods.dev/skills/echovic/blade-code/shared-api-and-runtime-schemas"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/shared-api-and-runtime-schemas/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/shared-api-and-runtime-schemas"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/shared-api-and-runtime-schemas.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00149 | $0.02214 |
| Opus 5.5 | $0.00060 | $0.00886 |
| Sonnet 5.5 | $0.00030 | $0.00443 |
| Haiku 4.5 | $0.00015 | $0.00221 |
Grade A, and why
knowledge-shared-api-and-runtime-schemas 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 96 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
该组件以 TypeBox schema 同时提供 TypeScript 静态类型、运行时输入验证和公开输出投影;Web 构建直接别名到 CLI 的 browser-safe API 源码,避免复制 DTO。
Directory Layout
packages/cli/src/schema/index.ts—Runtime、Default、StringEnum和 TypeBox 导出packages/cli/src/schema/validation.ts— clone、default、validate、clean 和结构化错误packages/cli/src/api/schemas.ts— Session、Task、消息、权限、模型和设置公共合约packages/cli/src/api/browserSchemas.ts— Browser 导航与交互的封闭输入 unionpackages/cli/src/api/teamSchemas.ts— Team 快照和写请求合约packages/cli/src/api/attachmentLimits.ts— 多表面共享的消息与附件上限packages/cli/src/api/promptCacheMetrics.ts— Provider cache 指标的安全派生与展示packages/cli/src/tools/validation/schemaToJson.ts— Provider function schema 清理packages/cli/web/vite.config.ts— Web@api到 CLI API 源码的构建别名
Key Entry Points
Runtime(schema)— 给 TypeBox schema 增加不可枚举的parse/safeParsesafeParseSchema(schema, value)— 返回 discriminated result,不抛异常parseSchema(schema, value)— 校验失败时抛SchemaValidationErrorschemaToFunctionSchema(schema)— 生成不含 TypeBox runtime 注解的封闭 JSON SchemaSessionSchema/CreateTaskRequestSchema/PermissionResponseSchema— 跨 Server/Web 高频公共合约
API Surface
Runtime Schema Helpers
Runtime(schema)— 保留标准 JSON Schema 可序列化形状,并附加非枚举解析方法Default(schema, value)— 输入字段可省略,解析结果应用默认值StringEnum(values, options?)— 生成所有 pi-ai Provider 都能接受的字符串 enum JSON SchemasafeParseSchema(schema, value)— 适合 HTTP 入口映射 4xxparseSchema(schema, value)— 适合可信内部边界和输出投影SchemaValidationError.issues— 提供解码后的字段路径、keyword、消息和原值
Shared Contracts
SessionSchema— 公开 Session 身份、lineage、任务状态和资源选择,不包含内部 lease 对象CreateTaskRequestSchema/CreateTaskResponseSchema— Task 默认隔离、权限模式和准入状态SendMessageRequestSchema— 消息、模型、附件与 structured output 输入边界BrowserActionSchema— Browser 交互 discriminated union,显式禁止额外属性TeamSnapshotSchema— Team 成员和任务图的跨表面只读投影
Usage Examples
Hono 路由验证请求
const parsed = safeParseSchema(CreateTaskRequestSchema, body);
if (!parsed.success) {
throw new BadRequestError('Invalid task request');
}
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.
- 2mo ago First seen · 96 lines · 149 tokens per session scan A 4b0436d99e2b
knowledge-shared-api-and-runtime-schemas is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 24d ago), licensed MIT. It adds 149 tokens to every session and 2,214 once invoked, about $0.0006 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
knowledge-shared-api-and-runtime-schemas compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| knowledge-shared-api-and-runtime-schemasechoVic/blade-code | Skill | 181 | 24d ago | MIT | A | 149 | Claude Code, Codex |
| groq-inferencesynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | A | 77 | Claude Code, Codex |
| bun-file-iosynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | A | 49 | Claude Code, Codex |
| protocolsio-integrationsynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | B | 85 | Claude Code, Codex |
| langbot-devlangbot-app/LangBot | Skill | 19k | yesterday | Apache-2.0 | A | 136 | Claude Code, Codex |
| clinical-decision-supportsynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | A | 97 | Claude Code |
| geo-databasesynthetic-sciences/openscience | Skill | 4.3k | 2d ago | Apache-2.0 | A | 47 | Claude Code, Codex |