knowledge-interaction-surfaces-acp-host-integration

knowledge-interaction-surfaces-acp-host-integration is a skill for Claude Code, Codex from echoVic/blade-code. It costs 164 tokens per session (2,356 once invoked), scanned A, original, MIT.

A guide to ACP, a protocol that lets an IDE or other host communicate with an agent through sessions, files, terminals, permissions, and streamed updates.

In plain words
What is it for?
Use it when integrating an IDE such as Zed, changing protocol capabilities, debugging remote files or terminals, or fixing session replacement and output handling.
Why use it?
It explains how host sessions are created, restored, displayed, and cleaned up, including limits around remote access and event flow.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when integrating an IDE such as Zed, changing protocol capabilities, debugging remote files or terminals, or fixing session replacement and output handling.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/echovic/blade-code/acp-host-integration
Install

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.

Any agent
npx skills add echoVic/blade-code --skill acp-host-integration
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for knowledge-interaction-surfaces-acp-host-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/echovic/blade-code/acp-host-integration/github.svg)](https://agentmods.dev/skills/echovic/blade-code/acp-host-integration)
Your own site
<a href="https://agentmods.dev/skills/echovic/blade-code/acp-host-integration"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/acp-host-integration/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.

agentmods 80×15 button for knowledge-interaction-surfaces-acp-host-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/echovic/blade-code/acp-host-integration"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/acp-host-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 164 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,356 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00164 $0.02356
Opus 5.5 $0.00066 $0.00942
Sonnet 5.5 $0.00033 $0.00471
Haiku 4.5 $0.00016 $0.00236

Measured 1mo ago against content hash 8050b3dae924, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

knowledge-interaction-surfaces-acp-host-integration 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.

.trae/knowledges/interaction-surfaces/acp-host-integration/SKILL.md · 73 lines

How it starts

The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Module Structure

ACP 层把每个宿主 Session 映射为独占的 Agent、SessionRuntime、文件系统/终端服务和 有界更新队列,通过 stdio NDJSON 与 IDE 通信。

Directory Layout

  • packages/cli/src/acp/index.ts — stdio Web Streams 与 ACP connection 生命周期
  • packages/cli/src/acp/BladeAgent.ts — 协议方法、Session residency 和配置能力
  • packages/cli/src/acp/Session.ts — prompt、历史、权限、LoopEvent 与 update 投影
  • packages/cli/src/acp/AcpServiceContext.ts — 按 Session 隔离的 FS/Terminal 后端
  • packages/cli/src/acp/AcpFileSystemService.ts — ACP 文本文件能力适配
  • packages/cli/src/services/FileSystemService.ts — 本地/远程文件系统公共接口
  • packages/cli/src/tools/display/ToolResultProjector.ts — ACP 工具详情裁剪

Key Entry Points

  • runAcpIntegration() in packages/cli/src/acp/index.ts — 建立 AgentSideConnection 并绑定关闭清理
  • BladeAgent.initialize() in packages/cli/src/acp/BladeAgent.ts — 协商协议和 Agent 能力
  • BladeAgent.newSession() and BladeAgent.loadSession() — 创建或原子替换宿主 Session
  • AcpSession.initialize() in packages/cli/src/acp/Session.ts — 创建服务上下文、恢复交互和 Runtime
  • AcpSession.prompt() in packages/cli/src/acp/Session.ts — 处理 prompt 并串行投影事件

Gotchas

  • session/load 必须在返回响应前按协议回放所有用户可见历史;system、tool 和内部消息留在模型上下文但不发送给宿主 (packages/cli/src/acp/BladeAgent.ts, packages/cli/src/acp/Session.ts, git:6d712a03)
  • 同一个 Session 的并发 load/close 通过 sessionLoadQueues 串行,旧 owner 完全销毁后才能提交新 owner;否则两个 Runtime 会同时消费同一 durable inbox (packages/cli/src/acp/BladeAgent.ts, git:804a5c64)
  • ACP Runtime residency 的 allowEviction 为 false;容量满时新 Session 直接返回结构化 internal error,不能静默逐出宿主仍持有的 Session (packages/cli/src/acp/BladeAgent.ts)
  • 宿主声明 fs.readTextFile/writeTextFile 后,远端调用失败必须 fail closed,不能读取或写入 Agent 主机上的同名路径;只有未声明能力时才选择本地 FS (packages/cli/src/acp/AcpFileSystemService.ts)
  • Terminal 后端在 Session 初始化时按 capability 选择:声明 terminal 后远端创建失败不自动本地执行,未声明 terminal 才使用绑定 Session cwd 的本地后端 (packages/cli/src/acp/AcpServiceContext.ts, docs/testing/acp-terminal-capability-routing-evidence.md, git:4991291e)
  • ACP terminal 的 currentOutput() 是累计快照而非增量;轮询必须按已观察长度切 delta,输出回退或 truncated 时重建 capture 并标记 accounting incomplete (packages/cli/src/acp/AcpServiceContext.ts)
  • terminal timeout/abort 的完成顺序是 kill → 停止轮询 → 最终读取 → release;提前返回会丢尾部输出并泄漏宿主 terminal (packages/cli/src/acp/AcpServiceContext.ts)
  • 所有 sessionUpdate() 共用一个 BoundedSerialEgress;任何 overflow、超时或 connection abort 会中止当前 prompt、user shell 和 side conversation,而不是继续生成未送达内容 (packages/cli/src/acp/Session.ts, git:1af43232)
  • closeSession 会以 discardPendingInput: true 销毁,连接级 shutdown 默认保留 durable inbox 供下次恢复;这两个关闭语义不能合并 (packages/cli/src/acp/BladeAgent.ts, packages/cli/src/acp/Session.ts, git:e260f4bc)
  • available_commands_update 必须延迟到 session/new 或 session/load 响应之后;立即发送会命中尚未准备好的宿主 (packages/cli/src/acp/Session.ts)
  • ACP 的 auto-edit 与 Blade 内部 autoEdit 名称不同,模式变更必须先持久化 Session 权限,再发送 current_mode_update (packages/cli/src/acp/BladeAgent.ts, packages/cli/src/acp/Session.ts)
  • 模型、reasoning、tier、verbosity 和 communication style 在 prompt 活动期间不可切换;持久化 metadata 失败时模型切换会回滚 Runtime (packages/cli/src/acp/Session.ts)
  • ACP ! 命令始终要求 Session terminal 后端,allowLocalFallback 为 false;远程宿主 terminal 失败不能偷偷在 Blade 主机执行 (packages/cli/src/acp/Session.ts, packages/cli/src/acp/AcpServiceContext.ts)

Read the full file on GitHub · 73 lines

Changes

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.

  1. 1mo ago First seen · 73 lines · 164 tokens per session scan A 8050b3dae924

Subscribe to this mod's changes

knowledge-interaction-surfaces-acp-host-integration is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d ago), licensed MIT. It adds 164 tokens to every session and 2,356 once invoked, about $0.0007 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.

Related

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…

synthetic-sciences/openscience · 71 tokens

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…

synthetic-sciences/openscience · 97 tokens

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.

synthetic-sciences/openscience · 66 tokens

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…

synthetic-sciences/openscience · 79 tokens

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.

synthetic-sciences/openscience · 70 tokens

geo-database

Access NCBI GEO for gene expression/genomics data. Search/download microarray and RNA-seq datasets (GSE, GSM, GPL), retrieve SOFT/Matrix files, for transcriptomics and expression analysis.

synthetic-sciences/openscience · 47 tokens