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 workspace-policy-and-shared-foundationsgit 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/workspace-policy-and-shared-foundations)<a href="https://agentmods.dev/skills/echovic/blade-code/workspace-policy-and-shared-foundations"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/workspace-policy-and-shared-foundations.svg" alt="Measured on agentmods" 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.00152 | $0.02505 |
| Opus 5 | $0.00076 | $0.01252 |
| Sonnet 5 | $0.00030 | $0.00501 |
| Haiku 4.5 | $0.00015 | $0.00250 |
Grade A, and why
knowledge-workspace-policy-and-shared-foundations 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 3d 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
80% identical to knowledge-session-state-and-context — 103 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 — 86 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
该域集中描述会跨越 CLI、Web、ACP、Agent Runtime、工具和扩展系统的基础策略;其共同约束是以 source project 建立身份,在进入 Session 前完成信任过滤和配置解析,再把可变进程资源冻结为 Session 私有视图。
Directory Layout
packages/cli/src/config/— 配置加载、归一化、字段持久化路由和权限规则packages/cli/src/security/— canonical workspace identity 与 Folder Trust 决策packages/cli/src/agent/resources/— workspace registry、模型资源和 Session 快照packages/cli/src/api/— Server/Web 共用的请求、响应和事件合约packages/cli/src/schema/— TypeBox runtime 解析与错误归一化packages/cli/src/tools/execution/— 权限、批内 gate 和进程级工具准入packages/cli/src/utils/BoundedSerialEgress.ts— 多表面共用的有界串行输出packages/cli/src/services/GracefulShutdown.ts— 进程级关闭编排
Decision Entry
ConfigManager.initialize()inpackages/cli/src/config/ConfigManager.ts— 启动配置、信任过滤和显式运行时覆盖入口WorkspaceTrustService.getStatus()inpackages/cli/src/security/WorkspaceTrustService.ts— 项目资源是否可见的身份决策入口SessionRuntime.create()inpackages/cli/src/agent/runtime/SessionRuntime.ts— 将 source project 配置与资源冻结到 SessionRuntime()inpackages/cli/src/schema/index.ts— 共享 schema 的运行时解析入口ConcurrencyScheduler.schedule()inpackages/cli/src/tools/execution/ConcurrencyScheduler.ts— 工具进程级公平准入入口BoundedSerialEgress.offer()inpackages/cli/src/utils/BoundedSerialEgress.ts— Web、ACP 与 Headless 输出背压入口
Branching Table
| 决策维度 | 主路径 | 受限或替代路径 |
|---|---|---|
| 配置身份 | 启动 workspace 可复用 Store 投影 | 其他 workspace 必须从用户层和目标项目层重建,不能继承启动项目私有层 |
| 项目来源 | trusted 项目可加载配置、插件、规则和可执行资源 |
untrusted 或 trust store 错误时忽略可放宽执行面的项目来源 |
| 资源时点 | workspace registry 可刷新并参与后续 Session 创建 | 活动 Session 使用深复制快照,不接受 registry 热更新 |
| 边界数据 | schema 解析成功后应用默认值并清理未知字段 | 输入验证失败映射为 4xx,输出投影失败则阻止泄漏内部字段 |
| 容量状态 | 有空位时直接取得 permit 或 lease | 等待时受数量、字节和超时约束;满载时返回 typed capacity failure |
| 输出状态 | 单写者按接纳顺序排空并支持 high-water-mark flush | overflow、写超时或 committed seq 回退会关闭对应输出通道 |
| 生命周期 | owner 活跃时持有 Session、Browser、进程和排队项 | cancel/dispose/shutdown 逐层撤销等待者并等待实际资源回收 |
Affected Scope
packages/cli/src/agent/runtime/— Session 创建、资源快照、任务准入和驻留生命周期packages/cli/src/tools/— 工具 schema、权限决策、并发 gate 和外部副作用边界packages/cli/src/server/— Hono API 校验、SSE 顺序、容量错误映射和关闭清理packages/cli/src/acp/— 多 cwd Session 隔离、不可驱逐驻留与有界更新输出packages/cli/src/commands/— CLI 覆盖、Headless 输出背压和进程级启动/关闭packages/cli/src/plugins/— 可信项目来源、配置收紧和 workspace registry 刷新packages/cli/src/browser/— HTTP(S) 来源安全、Context 容量和串行页面操作packages/cli/web/src/— 共享 API schema 消费、workspace 模型投影和容量状态展示
What ships with it
6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- capacity-lifecycle-and-egress/SKILL.md 12 KB
- layered-configuration-and-runtime-settings/SKILL.md 9.7 KB
- permissions-and-workspace-trust/SKILL.md 9.9 KB
- runtime-state-bootstrap-and-observability/SKILL.md 14 KB
- shared-api-and-runtime-schemas/SKILL.md 8.5 KB
- workspace-resource-snapshots-and-project-instructions/SKILL.md 10 KB
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.
- 3d ago First seen · 86 lines · 152 tokens per session scan A bd13f69d887e
knowledge-workspace-policy-and-shared-foundations is a skill published in the GitHub repository echoVic/blade-code (178 stars, last pushed yesterday), licensed MIT. It adds 152 tokens to every session and 2,505 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. It is 80% identical to knowledge-session-state-and-context, differing in 103 lines, and is treated as a copy.
Other skills, from other repositories
clinical-reports
Write comprehensive clinical reports including case reports (CARE guidelines), diagnostic reports (radiology/pathology/lab), clinical trial reports (ICH-E3, SAE, CSR), and patient documentation (SOAP, H&P, discharge summaries). Full support with templates, regulatory compliance (HIPAA, FDA, ICH-GCP), and validation…
clinical-decision-support
Generate professional clinical decision support (CDS) documents for pharmaceutical and clinical research settings, including patient cohort analyses (biomarker-stratified with outcomes) and treatment recommendation reports (evidence-based guidelines with decision algorithms). Supports GRADE evidence grading…
gget
Fast CLI/Python queries to 20+ bioinformatics databases. Use for quick lookups: gene info, BLAST searches, AlphaFold structures, enrichment analysis. Best for interactive exploration, simple queries. For batch processing or advanced BLAST use biopython; for multi-database Python workflows use bioservices.
histolab
Lightweight WSI tile extraction and preprocessing. Use for basic slide processing tissue detection, tile extraction, stain normalization for H&E images. Best for simple pipelines, dataset preparation, quick tile-based analysis. For advanced spatial proteomics, multiplexed imaging, or deep learning pipelines use pathml.
immunology-assays
Computational analysis of immunology experimental data. ATAC-seq differential accessibility, immune cell tracking from microscopy, ELISA data processing with 4-parameter logistic fitting, immunohistochemistry quantification, antibody titer analysis, and cell cycle phase duration estimation. For flow cytometry use…
molecular-cloning
Molecular cloning simulation and design. PCR amplicon prediction, restriction enzyme digestion, Golden Gate and Gibson assembly simulation, primer design, CRISPR sgRNA design, and plasmid annotation. For protein-level sequence analysis use biopython or esm; for database lookups use gene-database or ensembl-database.