knowledge-tool-execution-pipeline

knowledge-tool-execution-pipeline is a skill for Claude Code from echoVic/blade-code. It costs 165 tokens per session (3,121 once invoked), scanned A, a copy of knowledge-tool-and-automation-platform, MIT.

The controlled path that turns a tool request into an actual side effect, such as editing files or running a command. It coordinates validation, permissions, hooks, approvals, concurrency, file locks, safe retries, verification, and result delivery.

In plain words
What is it for?
Use it when changing tool execution order, diagnosing permission or hook behavior, handling retries and cancellation, preventing same-file conflicts, or adding automatic verification after edits.
Why use it?
It reduces duplicate side effects, conflicting writes, unauthorized actions, stuck queues, and inconsistent results when tools run or are cancelled.

Skill for Claude Code

Written for Claude Code: PreToolUse hook event.

Good fit Use it when changing tool execution order, diagnosing permission or hook behavior, handling retries and cancellation, preventing same-file conflicts, or adding automatic verification after edits.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/echovic/blade-code/tool-execution-pipeline
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 tool-execution-pipeline
Clone the repo
git clone --depth 1 https://github.com/echoVic/blade-code

Made for: Claude Code.

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-tool-execution-pipeline

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/echovic/blade-code/tool-execution-pipeline"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/tool-execution-pipeline.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 165 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,121 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.
Origin 88% copy Near-identical to another mod 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.00165 $0.03121
Opus 5.5 $0.00066 $0.01248
Sonnet 5.5 $0.00033 $0.00624
Haiku 4.5 $0.00016 $0.00312

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

Security

Grade A, and why

knowledge-tool-execution-pipeline 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.

Origin

This is a copy

88% identical to knowledge-tool-and-automation-platform — 133 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.

.trae/knowledges/tool-and-automation-platform/tool-execution-pipeline/SKILL.md · 111 lines

How it starts

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

Module Structure

该组件把已注册工具调用变成受控副作用。执行器本身无 Session 持久状态,但通过 ExecutionContext 接收 Session 身份、工作区、权限、取消和交互处理器,并协调多个 进程级与 Session 级资源门。

Directory Layout

  • packages/cli/src/tools/execution/ToolExecutor.ts — 当前平铺执行流程与历史记录
  • packages/cli/src/tools/execution/ToolInvocationRunner.ts — 调用计时与显式安全重试
  • packages/cli/src/tools/execution/PermissionResolver.ts — 规则、模式、Session 批准与敏感路径合并
  • packages/cli/src/tools/execution/ToolExecutionHooks.ts — Pre/Post Hook 适配及参数重建
  • packages/cli/src/tools/execution/ToolConcurrencyGate.ts — 单执行器 shared/exclusive FIFO 屏障
  • packages/cli/src/tools/execution/ConcurrencyScheduler.ts — 全局、Session、ToolKind 多维容量调度
  • packages/cli/src/tools/execution/FileLockManager.ts — canonical 路径锁与稳定顺序多锁
  • packages/cli/src/tools/execution/AutoVerify.ts — 受信任本地编辑后的 Session-owned 类型诊断
  • packages/cli/src/agent/loop/StreamingToolExecutor.ts — 流式预启动、持久化和结果有序交付
  • packages/cli/src/tools/display/ToolResultProjector.ts — durable 结果恢复与表面裁剪

Key Entry Points

  • ToolExecutor.execute() in packages/cli/src/tools/execution/ToolExecutor.ts — 创建 execution identity 并运行完整流程
  • executeToolInvocation() in packages/cli/src/tools/execution/ToolInvocationRunner.ts — 执行 invocation、记录耗时并实施重试策略
  • StreamingToolExecutor.addTool() in packages/cli/src/agent/loop/StreamingToolExecutor.ts — 决定预启动、排队或拒绝一次流式调用
  • AutoVerifyRuntime.verify() in packages/cli/src/tools/execution/AutoVerify.ts — 对成功文件写入追加相关类型错误

API Surface

ToolExecutor

  • execute(toolName, params, context) — 合并默认上下文并执行一次完整受控调用
  • executeAll() / executeParallel() — 保序收集批量结果,底层仍通过相同 gate 与 scheduler
  • getExecutionHistory() / getStats() — 读取有界内存执行历史与聚合统计
  • dispose() — 关闭本执行器 gate、取消该 owner 的排队任务并释放注入资源

Execution Coordination

  • ToolConcurrencyGate.run() — 在一个 executor 内提供 shared 并行和 exclusive FIFO 屏障
  • ConcurrencyScheduler.schedule() — 在进程与 Session 两级按 ToolKind 公平准入
  • FileLockManager.acquireLock() / acquireLocks() — 按 canonical 路径串行写入并避免多锁死锁
  • ToolTurnAdmission.admit() — 将单轮 tool call 数限制为 64

Read the full file on GitHub · 111 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 · 111 lines · 165 tokens per session scan A 24e4549be9c9

Subscribe to this mod's changes

knowledge-tool-execution-pipeline is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d ago), licensed MIT. It adds 165 tokens to every session and 3,121 once invoked, about $0.0007 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 88% identical to knowledge-tool-and-automation-platform, differing in 133 lines, and is treated as a copy.