Index of every page on this site: llms.txt
All skills
steelan9199 avatar

/skill-on-demand-architect-yashu

@9e01957
Run it yourself

用控制论思想优化指定技能以节约 token 的抽象方法论(按需加载架构师)。当用户要求优化/瘦身某个技能、减少 AI 多轮问答的 token 消耗、把大文档拆成按需读取的小文档、为技能设计分层加载结构时使用。本技能不针对具体技能,提供通用「诊断-拆分-验证」方法,由 AI 应用到目标技能。

  • 2 files
  • 8 KB
  • Updated 2 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/steelan9199/wechat-publisher/skill-on-demand-architect-yashu

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈105 tokens for metadata: the name and description. ≈1.1k when used: this file. ≈840 more on demand in 1 file.

Description uses 2.2% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈179 characters, or 2.2%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

按需加载架构师 Skill On-Demand Architect

1. 定位

本技能是方法论参考,不是执行器:不直接改目标技能,而是指导 AI 如何优化一个指定的技能以节约 token。

适用对象:SKILL.md 体积过大、每次会话全量加载、或执行时反复读取大文档/大脚本的技能。

不适用:目标技能已足够精简(SKILL.md < 150 行且无重复读取)时,不做无谓重构。

2. 核心模型(动手前先建立)

2.1 token 消耗公式

单轮问答成本 ≈ 历史上下文累积 + 本轮新读入 + 本轮输出
  • 历史累积随轮次滚雪球:轮次越多,后面每轮越重;
  • 本轮新读入 = 本轮 Read 进上下文的内容(最大可控头);
  • 本轮输出 = AI 回复长度(可控)。

2.2 压缩-重读循环(隐藏大头)

上下文超限 → 系统压缩丢细节 → AI 记不住 → 被迫重读文档 → 再次占用上下文 → 再次压缩。

优化目标不是减少轮次,而是减少每轮携带的冗余信息、切断重读循环。

2.3 三层加载(技能的标准结构)

层 内容 加载时机 体积目标
L1 元信息 name + description 常驻 ~100 词
L2 核心卡 SKILL.md 正文 技能触发时 < 200 行
L3 按需资源 references/ scripts/ 用到才读 不限(scripts 执行不读入)

3. 五步工作流

Step 1 定边界(诊断)

  • 画出目标技能的 token 消耗链路:哪些内容每次必读?哪些本应按需却仍被全量读?哪些被重复读?
  • 量化基线:统计 SKILL.md 行数、各 references 行数、scripts 体积。
  • 产出:链路图 + 必读体积清单。

Step 2 展开可能性空间

  • 列出优化方向:读侧瘦身 / 执行侧减负 / 结构重构 / 机制改造。
  • 选控制方式:优先负反馈调节(小步改、每轮验证),不用随机试错。

Step 3 定目标差

  • 定义可量化目标,如「SKILL.md 从 340 行降到 ≤120 行,且能力 100% 保留」。
  • 定义容差:列出不可删内容(触发词、铁律、模板表),可删内容(过程细节、示例、旧日志)。

Step 4 建反馈回路

  • 回路:改一版 → 模拟一次典型任务 → 统计必读 token → 比对目标差 → 再改。
  • 判稳:每轮只动一个结构点,防止振荡;改完必须验证「任务仍能完成」。

Step 5 收敛与容错

  • 记录每轮目标差,确认单调下降,不振荡。
  • 加容错:改前保留备份;路由表写清「某份文档缺失时怎么办」。

4. 核心手法

手法 做法 收益
分层加载 SKILL.md 只留核心卡,细节拆到 references/ 必读体积直降
路由表 SKILL.md 末尾列「什么场景读哪份文档」 防止拆了后全读/漏读
压薄必读 铁律/模板表精简,过程文档移出 每轮都省
切断重读 关键信息固化成薄接口卡,不藏在长文档 防止压缩-重读循环
数据代码分离 坐标/数据进存储或脚本,文档零数值 文档不再膨胀
引用复用 已有技能(如 cybernetic-thinking-yashu)不重复写理论 避免重复

4.1 控制论底座(需要时先读)

本技能的方法论内核来自 cybernetic-thinking-yashu。当 AI 对「控制论是什么、如何拆解任务」缺乏把握时,先读取 cybernetic-thinking-yashu 的 SKILL.md 获取完整框架(系统边界 / 可能性空间 / 目标差 / 反馈回路 / 判稳 / 容错)。

引用方只需遵守该技能的三条原则:

  1. 先定义目标差指标,再动手;
  2. 每一轮都要测量,不允许无反馈执行;
  3. 先判稳再寻优。

本技能不重复控制论理论,避免双份占用上下文。

5. 路由表(本技能自身的按需加载)

场景 读什么
需要诊断清单 / 手法详表 / 案例 references/诊断与手法.md
需要控制论理论 引用 cybernetic-thinking-yashu 技能

6. 验证与交付

  • 优化后回读目标技能,确认:触发词保留、能力不降级、路由表清晰、必读体积达标。
  • 向用户交付:改了什么、每项收益(行数/比例)、验证结果、仍存在的缺口。
  • 用控制论收尾模板汇报:系统边界 / 目标差 / 反馈回路 / 收敛状态。

Source: SKILL.md on GitHub

No rule matched.

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at 9e01957. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for steelan9199/wechat-publisher/skill-on-demand-architect-yashu