knowledge-loading-order

A set of instructions for agents-cli that controls which project knowledge files an agent reads first.

In plain words
What is it for?
It is for organizing access to workflow examples, reusable prompt patterns, analysis files, and original case data when an agent studies or builds creative workflows.
Why use it?
It helps the agent start with short indexes and structured analyses instead of loading large collections of raw JSON files into its context.

Agent

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.

agentmods
npx agentmods add agents/anymouschina/tapcanvas/knowledge-loading-order
Clone the repo
git clone --depth 1 https://github.com/anymouschina/TapCanvas
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00892
Opus 5 $0.00000 $0.00446
Sonnet 5 $0.00000 $0.00178
Haiku 4.5 $0.00000 $0.00089

Measured 3d ago against content hash 2bb9ab94708f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

knowledge-loading-order 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.

docs/agents/knowledge-loading-order.md · 130 lines

What it actually says

Agents Knowledge Loading Order

目标

让 agents-cli 在处理创作工作流知识时,优先读取提纯资产,而不是直接吞原始大 JSON。

这份规范对应的知识来源包括:

  • assets/demo/index.json
  • ai-metadata/workflow-patterns/index.json
  • ai-metadata/workflow-patterns/*.analysis.json
  • docs/agents/prompt-patterns/*.md
  • assets/demo/*.json

一、推荐读取顺序

第 1 层:案例索引层

先读:

  • assets/demo/index.json
  • ai-metadata/workflow-patterns/index.json

目的:

  • 找到有哪些案例
  • 判断哪个案例与当前任务最相关
  • 决定后续应该打开哪份分析文件

这一层只负责“定位”,不负责深入推理。

第 2 层:结构化分析层

第二步读:

  • ai-metadata/workflow-patterns/<case>.analysis.json

目的:

  • 提取可复用方法
  • 获取工作流结构、连续性模式、prompt 模板和失败信号
  • 用最小上下文理解一个成功案例的有效规律

默认情况下,这一层应该是 agents 的主要知识来源。

第 3 层:提示词模式层

只有在需要写 prompt 或拆工作流时,再读:

  • docs/agents/prompt-patterns/*.md

目的:

  • 获取可直接复用的中文模板
  • 获取 prompt 句式库
  • 获取工作流拆解建议

这一层偏“表达与执行”,不是证据层。

第 4 层:原始案例层

只有在前面三层仍然证据不足时,才读:

  • assets/demo/*.json

用途:

  • 核对真实节点结构
  • 回看具体链路
  • 提取尚未进入分析文件的细节

注意:原始 JSON 是证据源,不应作为默认上下文入口。

二、禁止做法

以下做法应避免:

  • 一开始就把整份 assets/demo/001.json 塞进上下文
  • 同时读取大量原始案例 JSON
  • 把案例里的具体名词(例如地铁、书、本地角色设定)误当成通用创作规则
  • 跳过分析层,直接从原始 JSON 推理 prompt 方法

三、适用于 agents-cli 的执行规则

当任务属于以下场景时,建议遵守本顺序:

  • 让 agent 总结成功工作流经验
  • 让 agent 帮忙写连续性强的图生图 prompt
  • 让 agent 设计 image -> image -> video 的分镜链路
  • 让 agent 从既有案例中提炼方法论

推荐操作顺序:

  1. 先读 assets/demo/index.json
  2. 再读 ai-metadata/workflow-patterns/index.json
  3. 根据匹配结果读取相关 *.analysis.json
  4. 若需要 prompt 模板,再读 docs/agents/prompt-patterns/*.md
  5. 如果还有证据缺口,再回源到 assets/demo/*.json

四、为什么这样设计

原因很简单:

  • 索引层负责“找”
  • 分析层负责“懂”
  • 模板层负责“写”
  • 原始层负责“证据兜底”

这样可以避免:

  • 上下文过载
  • 从噪声里现猜规律
  • 案例细节污染通用方法
  • agent 在大 JSON 里浪费 token

五、后续扩展建议

如果以后新增更多成功案例,建议每个案例都补齐:

  • assets/demo/<id>.json
  • ai-metadata/workflow-patterns/<id>.analysis.json
  • 必要时补对应的 prompt pattern 文档

同时维护两个索引:

  • assets/demo/index.json:偏案例目录
  • ai-metadata/workflow-patterns/index.json:偏 agent 检索入口

这样以后不需要改系统提示,也能逐步扩展工作流知识库。

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. 3d ago First seen · 130 lines · 0 tokens per session scan A 2bb9ab94708f

Subscribe to this mod's changes

knowledge-loading-order is an agent published in the GitHub repository anymouschina/TapCanvas (579 stars, last pushed 14d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 892 tokens. 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-08-30.

Related

Other agents, from other repositories

d3-expert

Expert in D3.js for creating custom, interactive data visualizations with SVG, Canvas, and HTML. Specializes in D3 v7+ with ES modules, selections, data binding, scales, transitions, force simulations, hierarchical layouts, geographic projections, and performance optimization for large datasets. Use for any data…

andisab/swe-marketplace · 448 tokens

lattice-builder

The developer. Implements exactly one Lattice package to its RFC — source, tests, benchmarks and README — and leaves the repo green. Owns only the paths its task names.

plausibleventures/lattice · 40 tokens

lattice-architect

The visionary. Designs the public API of a Lattice package before a line of it is implemented, and says what the kit is missing. Use before any builder starts, and whenever two packages disagree about a shape.

plausibleventures/lattice · 48 tokens

external.anthropic

You are an External Integration agent - a specialized assistant for executing actions across connected external services. Your purpose is to interact with any connected Composio toolkit (900+ platform-wide) and return structured results to the main agent.

kanwas-ai/kanwas · 0 tokens

external.openai

You are an External Integration agent - a specialized assistant for executing actions across connected external services. Your purpose is to interact with any connected Composio toolkit (900+ platform-wide) and return structured results to the main agent.

kanwas-ai/kanwas · 0 tokens

explorer.openai

You are an Explorer agent - a specialized workspace investigation assistant. Your purpose is to efficiently gather context from the workspace and return structured findings to the main agent.

kanwas-ai/kanwas · 0 tokens