apply-tweaks

将 pending.yaml 中的缓冲调整应用到源 HTML 文件。当用户说“保存调整”、“应用调整”、“持久化面板更改”或运行 /apply-tweaks 时调用。

仓库最近推送
GitHub Stars
112
Forks
11
Issues / PRs
1

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "apply-tweaks":https://skillpi.com/zh/skills/deepskill-e3315456f520ccc8429e230449d05373897caa895107eabf4e063d1797dc1226。安装前核对上游来源和版本:https://github.com/bluzir/claude-code-design。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

将 pending.yaml 中的缓冲调整应用到源 HTML 文件。当用户说“保存调整”、“应用调整”、“持久化面板更改”或运行 /apply-tweaks 时调用。

0 下载

介绍来源: third_party · bluzir · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
适合谁
来源文档未说明。
输入和输出
来源文档未说明。
软件、账号及付费要求
来源文档未说明。
限制与区别
来源文档未说明。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: apply-tweaks
description: Apply buffered tweaks from pending.yaml to the source HTML file. Invoked when user says "save tweaks", "apply tweaks", "persist panel changes", or runs /apply-tweaks.
argument-hint: <html-path>
allowed-tools: Read Write Edit Bash(ls:*) Bash(cat:*) Bash(mkdir:*) Bash(date:*) Bash(mv:*)

Apply Tweaks

Persist queued tweak changes (in pending.yaml) back to the source HTML via Edit. Pattern from claude-pipe: files are state, Claude is the writer.

Session lookup

session-id for <html-path> = tweaks-{slugify(basename html-path without ext)}-{today YYYYMMDD}. Session dir: artifacts/tweaks/<session-id>/.

If skipping date match (e.g. resume from yesterday), Bash(ls artifacts/tweaks/) and find the most recent matching prefix.

Pipeline

  1. Read session state:

    Read artifacts/tweaks/<session-id>/state.yaml
    Read artifacts/tweaks/<session-id>/pending.yaml

    If pending.yaml is missing or empty — report "no pending tweaks" and stop.

  2. Read HTML + schema:

    • Read the target HTML (path from state.yaml or $0)
    • Extract the __tweak_schema block (JSON inside <script id="__tweak_schema">)
  3. Validate each pending key:

    • Every key in pending.yaml must exist in schema
    • Value type must match schema (color = hex, number = in [min..max], boolean)
    • If any key invalid: report which + stop (do not partially apply)
  4. Apply: for each key → value in pending:

    • Primary pattern — CSS var on :root: find --tweak-<key>: <old>; and Edit to new value
    • Secondary pattern — marker block: find <!-- tweak:<key> -->...<!-- /tweak:<key> --> and Edit the content inside
    • If neither marker found → fail loudly (HTML didn't use /make-tweakable pattern)
  5. Atomic write via Edit: each Edit is already atomic in Claude Code, so no tmp-rename dance needed.

  6. Append to log:

    ts=$(date -u +%Y%m%dT%H%M%SZ)
    Write artifacts/tweaks/<session-id>/applied/$ts.yaml:
      applied_at: $ts
      changes:
        <copy of pending.yaml>
  7. Clear pending: Write artifacts/tweaks/<session-id>/pending.yaml with empty content (or {})

  8. Update state:

    Edit artifacts/tweaks/<session-id>/state.yaml:
      phase: idle → idle (no-op but bump timestamp)
      last_applied_at: <ts>
  9. Verify: /done <html-path> — confirms file still renders, new values visible in preview.

  10. Report: "Applied N tweaks. Logged to artifacts/tweaks/<session-id>/applied/<ts>.yaml. Pending cleared."

Revert path

If user says "revert last tweaks":

  1. Bash(ls -t artifacts/tweaks/<session-id>/applied/) — get most recent
  2. Read that file — get the delta
  3. Reverse each change (find current value in HTML, restore previous)
  4. Append a new applied entry with type: revert and reference to reverted file
  5. /done

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值78/100

亮点

  • 提供将缓冲调整持久化到 HTML 文件的实用功能,适用于网页样式批量修改场景
  • 具备完整的正向应用和反向回滚机制,形成闭环体验
触发精准92/100

亮点

  • 触发词覆盖全面,包含自然语言指令和命令形式,边界清晰
结构规范95/100

待提升项

  • 缺少 When to Use 显式章节 原报告严重程度:轻微

    文档未设置显式的 When to Use 章节,但 Pipeline 部分已隐含使用场景说明

    改进建议:建议增加显式的 When to Use 章节以提升可读性

亮点

  • Pipeline 步骤划分清晰,包含完整的 10 步执行流程和出口条件
  • 文档结构完整,frontmatter 规范,逻辑连贯
执行可靠88/100

亮点

  • 工具来源明确,参数使用规范,覆盖主要异常场景
  • 具备原子性写入、日志记录和回滚机制,可靠性高
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

来源文档未说明。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。