文档测试
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 文档
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- WSL
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: documentation-guardian
description: Proactively suggests ADRs when architectural changes happen in this Lovelace card repo, and chec…
category: 文档
runtime: 无特殊运行时
---
# documentation-guardian 输出预览
## PART A: 任务判断
- 适用问题:PRD、RFC、README、项目说明或知识库整理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Activation triggers (this repo's architecture) / Skip — do not trigger on / Out of scope (deliberately)”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于PRD、RFC、README、项目说明或知识库整理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Activation triggers (this repo's architecture) / Skip — do not trigger on / Out of scope (deliberately)”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文没有稳定的斜杠命令要求。安装验证后通常全局生效,直接在对话里点名这个 Skill 并描述任务即可。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Activation triggers (this repo's architecture) / Skip — do not trigger on / Out of scope (deliberately)”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: documentation-guardian
description: Proactively suggests ADRs when architectural changes happen in this Lovelace card repo, and chec…
category: 文档
source: tomevault-io/skills-registry
---
# documentation-guardian
## 什么时候使用
- 把项目文档方向的常用动作沉淀成 Agent 可调用的技能 适合处理README、PRD、RFC、教程和知识库文档,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的…
- 面向PRD、RFC、README、项目说明或知识库整理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Activation triggers (this repo's architecture) / Skip — do not trigger on / Out of scope (deliberately)」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "documentation-guardian" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Activation triggers (this repo's architecture) / Skip — do not trigger on / Out of scope (deliberately)
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} Documentation Guardian
Keeps docs/adr/ in sync with the code. Two jobs:
- Detect ADR-worthy changes as they happen and propose drafting an ADR.
- Check planned and in-progress changes against existing ADRs before they land.
The ADR conventions referenced here live in docs/adr/README.md. When the two disagree, docs/adr/README.md wins — update this skill to match.
Activation triggers (this repo's architecture)
Activate when you observe any of these in a planned or in-progress change:
- A new chart plugin under
src/chart/plugins/, or a new entry registered insrc/chart/plugins.ts. - A new data source under
src/data-source/, or a new tier added to the sunshine-source resolution chain (existing tiers are governed by an accepted ADR — re-readdocs/adr/to find which). - A new render mode or layout (a fourth top-level mode beside Combination / Station / Forecast), or a new
forecast.stylevariant beyond style1/style2. - A new top-level card-config option that the user can set in their YAML — these become public API and are notoriously hard to remove.
- A build / quality gate change: ESLint rule promoted warn→error, vitest coverage threshold moved, dependency-cruiser rule added or relaxed, new CI workflow under
.github/workflows/, change to theRequired status checksset on master. - A bundler or major-dependency bump: Rollup, vitest, lit, chart.js, playwright, eslint majors. The decision to take a major and the migration shape is ADR-worthy; patch/minor bumps are not.
- A boundary break: a new uplevel
importinsrc/chart/,src/editor/, orsrc/utils/. Either it needs to be removed, or the boundary itself needs an ADR change. - A change to the e2e baseline regeneration flow (the
update-baselines.ymlworkflow, the playwright tolerance, the WSL fallback policy — pinning is governed by an accepted ADR; re-readdocs/adr/before changing the flow). - A release-flow change — the steps listed in
CLAUDE.mdfor cuttingvX.Y.Z. - A pattern deviation from an accepted ADR — code that contradicts an existing decision.
Skip — do not trigger on
- Bug fixes that don't change a contract (no new public option, no new module-boundary, no new dependency).
- Refactors within an existing module that keep the public surface identical.
- Adding test coverage to existing code (including v1.5 #10 work on
teardown-registry.ts). - Style fixes, lint-warning cleanup, type-narrowing inside an already-strict file.
- E2E baseline regenerations done by the
update-baselines.ymlGHA bot. - Single-file documentation edits (typo, link, prose tweak) that do not change a convention.
- Patch/minor dependency bumps via Dependabot.
- Lovelace dashboard / Bubble Card / user-side YAML examples in docs (those describe usage, not internal architecture).
Out of scope (deliberately)
The skill stays narrow. It does not:
- Fire on conversational mentions of "bug" or "idea". Filing a GitHub issue is a deliberate user act, not a documentation event.
- Run
gh issue createor manage labels. - Police uncommitted working-tree state outside
docs/and the ADR check. - Verify cross-links in issue bodies on GitHub.
Documentation locations
When suggesting where information should live, use these targets:
| Target | Purpose |
|---|---|
docs/adr/NNNN-*.md |
Architecture decisions: tech choice, build-gate change, public-API surface, module-boundary, release-flow change |
ARCHITECTURE.md |
Module map, lifecycle, data flow — descriptive, derived from code |
docs/CONFIGURATION.md |
User-facing card config reference (every new option must land here too) |
docs/CONDITIONS.md, docs/SENSORS.md, docs/TROUBLESHOOTING.md |
User reference docs by domain |
docs/STYLE-GUIDE.md |
Documentation conventions themselves |
CHANGELOG.md |
Release-by-release log (every user-visible change is mentioned here) |
CLAUDE.md |
Local-only context (gitignored). Do not propose ADR rationale to live here. |
Gating test — apply before proposing
The activation triggers above are detection signals, not auto-suggestions. After a trigger fires, gate the proposal by the restrictive AND-of-three filter:
- Hard to reverse — the cost of changing the decision later is meaningful.
- Surprising without context — a future reader will look at the code and wonder "why on earth did they do it this way?"
- Result of a real trade-off — there were genuine alternatives and you picked one for specific reasons.
All three must be true. If any one is missing, skip the ADR — the rationale belongs in a commit message, a code comment, the CHANGELOG.md, or simply in the diff itself.
- Easy to reverse → just reverse it later.
- Not surprising → nobody will wonder why.
- No real alternative → "we did the obvious thing" isn't worth recording.
This filter mirrors the one in the user-level grill-with-docs skill, so both stay aligned on what counts as ADR-worthy.
Proactive prompting
When a trigger fires and the AND-of-three gate passes, surface it before implementation, not after:
This change introduces / modifies / adds X. That's a deliberate architectural choice with genuine alternatives and meaningful reversal cost — should I draft an ADR for it before continuing?
Suggested:
docs/adr/NNNN-descriptive-title.md.
If the user agrees, draft the ADR using docs/adr/template.md in the same PR as the code change. If the user defers ("not now, later"), respect that — do not nag in the same session.
For architecture suggestions in general (per CLAUDE.md): list pros/cons, then a recommendation, then act only after OK.
Compliance check
Before implementation
- List
docs/adr/fresh — never assume a snapshot of the in-force set; new ADRs land regularly and a hardcoded list in this skill would silently drift. - Read each accepted ADR whose title or
Decisionsection overlaps the staged paths or the planned change's surface area. Skiptemplate.mdandREADME.md. - Verify the planned change does not contradict any of them.
- If the planned change contradicts an accepted ADR, raise it explicitly:
This approach differs from ADR 000N (
<title>) which decided X. Two options: (a) adjust the implementation to match the ADR, (b) write a superseding ADR. Which one?
After implementation
- Note any significant undocumented decisions made during the change.
- Suggest an ADR for each, naming the file path.
ADR mechanics
Required structure
Mirrors docs/adr/template.md:
# NNNN: Title
**Status:** Proposed | Accepted | Deprecated | Superseded by NNNN
**Date:** YYYY-MM-DD
## Context
## Decision
## Consequences
- Pros / Cons / Tradeoffs
## Related
Numbering
- Sequential four-digit numbers: 0001, 0002, …
- Find the current highest number with
ls docs/adr/. - Never reuse a number, even for deprecated or superseded ADRs.
Superseding
When a new decision overrides an old one:
- The old ADR's status becomes
Superseded by NNNN. - The old ADR file is not deleted — history is preserved.
- The new ADR's status is
Acceptedand itsRelatedsection links back to the superseded one.
Behavioural guidelines
- Lightweight, not bureaucratic. Suggest ADRs only when the change is genuinely a decision, not when the answer is obvious from the code or already documented.
- "Should I draft an ADR?" pattern, not auto-generation. Wait for a yes.
- Respect deferrals. If the user says "later" or "no", drop it.
- Pro/contra first. When recommending an architecture or tool choice, list alternatives, then a recommendation, then wait for OK before implementing.
- Connect the dots. Link new ADRs to related ones; reference the ADR from the relevant code section in
ARCHITECTURE.mdor the corresponding user doc. - English only in any file written to disk. Conversation can stay German.
Source: chriguschneider/weather-station-card — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核