Artifact yylo

From findscripter/everything-skills · View interactive version

Artifact yylo is an AI agent skill from the GitHub repository findscripter/everything-skills. 当编码智能体需要把测试报告、模型输出、操作回执等运行证据固化为可验证的不可变 artifact Record 时使用;驱动 yy ledger 完成证据画像与载荷模式分类、显式创建、溯源与保留选择,以及按摘要与历史回读的检索核验;不适用于任务状态、持久知识或工作流定义;触发词:artifact、证据、回执、receipt、digest、不可变、yy ledger

How to use this skill

Skill file

YYLO Ledger 证据归档库

采编自 yylo-dev/yylo-skills(MIT),由 YYLO 团队自荐并适配为本库格式。

何时使用

当智能体要把「运行证据」放进比日志文件更可靠、可被审查与复验的载体时使用:

步骤 / 指令

  1. 预检:yy ledger artifact --help(命令 help 为当前运行时的权威说明);命名空间缺失时禁止发明命令或手写存储文件。
  2. 先分类:按证据选画像——stdout 有界输出 / model-output 模型响应 / report 生成结果 / receipt 操作与结果绑定;按后续核验需求选载荷模式:需要字节级证明时选不可变模式(inline / local / external),link 只是 URI 引用,不是内容寻址证明。
  3. 显式创建(文件/stdin 传输 + 媒体类型):

```bash

yy ledger artifact create --title "Focused test report" --profile report \

--mode local --media-type application/json --file report.json

```

绝不在 URI 里嵌凭据;只附受支持的非秘密溯源(actor / agent / model / session / run / task / workflow,任务与工作流溯源用不可变 Record ID);保留策略(temporary / standard / permanent)显式选择,保留元数据本身不授权删除。

  1. 检索与核验:先检查 yy ledger get --help;已知 ID 优先 yy ledger get RECORD_ID -f json(不猜类型)。若当前 get 仅支持 Task,检查 yy ledger record get --help 后使用 yy ledger record get RECORD_ID -f json;仍不支持通用 Record 时停止并请求升级,不改猜其他类型。无 ID 先有界检索:

```bash

yy ledger artifact search --profile report --projection summary --limit 20 -f json

```

元数据回读 yy ledger artifact get RECORD_ID -f json,修订历史 yy ledger artifact history RECORD_ID -f ndjson;仅在当前 help 确认支持内容读取参数时,用 yy ledger get RECORD_ID --content --max-content-bytes 1048576 核验字节(选新的外部输出文件并检查退出码,上限 16 MiB);不支持则请求升级,不以元数据回读代替字节核验。

  1. 不可变纪律:载荷字节绝不覆写;替代 = 显式 predecessor/successor 关系 + 修订安全契约;归档是生命周期迁移不是删除;新 ID 用 artifact_ 前缀,不给既有 ID 加前缀。
  2. 结果上报:上报 Record kind / profile、真实不可变 ID 与真实 slug(来自返回 Record 或原生 get 回读),绝不凭标题编造 slug。

示例

yy ledger artifact create --title "Focused test report" --profile report --mode local --media-type application/json --file report.json
yy ledger artifact search --profile report --projection summary --limit 20 -f json
yy ledger get artifact_ab12cd34 -f json
yy ledger artifact history artifact_ab12cd34 -f ndjson
yy ledger get artifact_ab12cd34 --content --max-content-bytes 1048576 > evidence.out

注意事项

互见

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.