reverse-skills-max: initial public release (restored, redacted, hardened)

This commit is contained in:
baradok609hecl1pq6qi
2026-10-20 02:17:15 +03:00
commit da24c2bd20
2227 changed files with 443931 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
# DSH 检查夹具
这些目录是 `bin/dsh.mjs check` 的输入,不属于 `.claude/skills`(`validate.mjs` 不扫这里)。
- `check-errors/` 每个子目录只违反一条规则,用来确认每个错误类都能被点名;`re-ok/` 是合法对照。
- `flat-root/` 覆盖平铺形态(`<root>/<name>.md`)与平铺名文法检查。
- `long/` 是一个超过工具结果裁剪阈值的合法技能,用来确认「超阈值只告警不报错」。
放在 `tests/fixtures-dsh/` 而不是 `tests/fixtures/dsh-*/`:`tests/validate.test.mjs` 里
`collectSkills` 断言了 `tests/fixtures/` 一级目录的完整名单,往里加任何目录都会让那条断言变红,
而那个文件不在本任务的改动范围内。
夹具里的 `re-tabs/SKILL.md` 含一个真实的 TAB 字符(YAML 不允许用 TAB 缩进),
测试会先断言该文件确实含 TAB,再断言检查器报 `tab-in-frontmatter`。

View File

@@ -0,0 +1,9 @@
---
name: re-hidden
description: 夹具:位于隐藏目录下,发现阶段就应跳过。Hidden entry, skipped by discovery.
type: atomic
---
## 什么时候用
夹具:DSH 只扫技能根的一级目录,而本目录以点开头,属于应跳过的项。

View File

@@ -0,0 +1 @@
夹具:技能根一级的非 .md 文件。DSH 不认,检查器应把它计入 skipped 而不是技能。

View File

@@ -0,0 +1,9 @@
---
name: re-Bad_Name
description: 夹具:名字不符合 kebab-case 文法。Invalid kebab-case name.
type: atomic
---
## 什么时候用
下划线与大写都不在 DSH 的 `^[a-z0-9]+(?:-[a-z0-9]+)*$` 之内。

View File

@@ -0,0 +1,10 @@
---
name: re-bad-bool
description: 夹具:布尔字段写了非法值。Invalid boolean spelling.
type: atomic
user-invocable: maybe
---
## 什么时候用
DSH 的布尔文法只接受 true/false、yes/no、on/off、1/0,`maybe` 会让该技能被丢弃。

View File

@@ -0,0 +1,5 @@
---
name: re-empty-body
description: 夹具:闭合分界行之后没有正文。Empty body after the closing delimiter.
type: atomic
---

View File

@@ -0,0 +1,6 @@
---
---
## 什么时候用
夹具:两条分界行之间没有任何内容。此时 YAML 解析结果是 null 而不是映射,DSH 不认。

View File

@@ -0,0 +1,12 @@
---
name: re-hyphen-keys
description: 夹具:带连字符的可选键。Hyphenated optional keys, valid for DSH.
type: atomic
disable-model-invocation: false
user-invocable: true
---
## 什么时候用
夹具:`disable-model-invocation` 与 `user-invocable` 是 DSH 的合法可选键(都是合法 YAML)。
仓库的 `lib/frontmatter.mjs` 键文法只认 `\w+`,会把它们判成游离行——本夹具就是那条误报的回归。

View File

@@ -0,0 +1,10 @@
---
name: re-legacy-key
description: 夹具:用了驼峰 legacy 键。Legacy camelCase invocation key.
type: atomic
disableModelInvocation: true
---
## 什么时候用
DSH 只认 `disable-model-invocation`,驼峰写法会让整个技能被丢弃。

View File

@@ -0,0 +1,9 @@
---
name: re-other
description: 夹具:name 与目录名不一致。Name does not match the directory.
type: atomic
---
## 什么时候用
目录是 `re-name-mismatch`,frontmatter 里写的是 `re-other`。

View File

@@ -0,0 +1,7 @@
---
name: re-no-close
description: 夹具:缺少闭合的分界行。Missing closing delimiter.
## 什么时候用
下面这段本该是正文,但因为没有闭合的 `---`,整个文件都不是合法技能。

View File

@@ -0,0 +1,7 @@
---
name: re-no-desc
---
## 什么时候用
夹具:只有 name,没有 description(DSH 要求 description 非空)。

View File

@@ -0,0 +1,3 @@
# 没有 frontmatter 的技能
夹具:首行不是裸 `---`,DSH 直接忽略该文件(记 warning,不报错)。

View File

@@ -0,0 +1,5 @@
# re-no-skill-md
夹具:目录存在但没有 SKILL.md(DSH 只认 `<name>/SKILL.md`,这个目录会被忽略)。
用 git 无法提交空目录,所以放这个说明文件占位。

View File

@@ -0,0 +1,8 @@
---
- 顶层是序列,不是映射
- top level is a sequence, not a mapping
---
## 什么时候用
夹具:frontmatter 顶层是列表。DSH 要求解析结果是映射,列表会被忽略。

View File

@@ -0,0 +1,9 @@
---
name: re-ok
description: 夹具:一切合法。Valid skill fixture, no rule may fire.
type: atomic
---
## 什么时候用
夹具:合法技能。检查器对它不应报任何错误或告警。

View File

@@ -0,0 +1,10 @@
---
name: re-tabs
description: 夹具:frontmatter 里出现 TAB 字符。TAB inside frontmatter.
type: atomic
这一行的缩进是 TAB,YAML 不允许用 TAB 做缩进
---
## 什么时候用
夹具:frontmatter 块内出现 TAB 即报 `tab-in-frontmatter`(DSH 的 YAML 解析器会拒绝这种缩进)。

View File

@@ -0,0 +1,9 @@
---
name: Not-Kebab
description: 夹具:平铺文件名不符合 kebab-case。Invalid flat-file name.
type: atomic
---
## 什么时候用
平铺技能的名字取自文件名,大写与下划线都不在 DSH 的文法内。

View File

@@ -0,0 +1,9 @@
---
name: re-flat
description: 夹具:平铺形态的合法技能。Valid flat-file skill.
type: atomic
---
## 什么时候用
DSH 认两种形态:`<root>/<name>/SKILL.md` 与 `<root>/<name>.md`,本夹具是后者。

View File

@@ -0,0 +1,130 @@
---
name: re-long
description: Fixture: a valid skill whose file exceeds the 8192-character tool-result prune threshold.
type: atomic
---
## Body
Fixture: valid frontmatter and a body long enough to trigger the prune-threshold warning (warning only, never an error).
- filler 0001: this line only pushes the file past the 8192-character threshold.
- filler 0002: this line only pushes the file past the 8192-character threshold.
- filler 0003: this line only pushes the file past the 8192-character threshold.
- filler 0004: this line only pushes the file past the 8192-character threshold.
- filler 0005: this line only pushes the file past the 8192-character threshold.
- filler 0006: this line only pushes the file past the 8192-character threshold.
- filler 0007: this line only pushes the file past the 8192-character threshold.
- filler 0008: this line only pushes the file past the 8192-character threshold.
- filler 0009: this line only pushes the file past the 8192-character threshold.
- filler 0010: this line only pushes the file past the 8192-character threshold.
- filler 0011: this line only pushes the file past the 8192-character threshold.
- filler 0012: this line only pushes the file past the 8192-character threshold.
- filler 0013: this line only pushes the file past the 8192-character threshold.
- filler 0014: this line only pushes the file past the 8192-character threshold.
- filler 0015: this line only pushes the file past the 8192-character threshold.
- filler 0016: this line only pushes the file past the 8192-character threshold.
- filler 0017: this line only pushes the file past the 8192-character threshold.
- filler 0018: this line only pushes the file past the 8192-character threshold.
- filler 0019: this line only pushes the file past the 8192-character threshold.
- filler 0020: this line only pushes the file past the 8192-character threshold.
- filler 0021: this line only pushes the file past the 8192-character threshold.
- filler 0022: this line only pushes the file past the 8192-character threshold.
- filler 0023: this line only pushes the file past the 8192-character threshold.
- filler 0024: this line only pushes the file past the 8192-character threshold.
- filler 0025: this line only pushes the file past the 8192-character threshold.
- filler 0026: this line only pushes the file past the 8192-character threshold.
- filler 0027: this line only pushes the file past the 8192-character threshold.
- filler 0028: this line only pushes the file past the 8192-character threshold.
- filler 0029: this line only pushes the file past the 8192-character threshold.
- filler 0030: this line only pushes the file past the 8192-character threshold.
- filler 0031: this line only pushes the file past the 8192-character threshold.
- filler 0032: this line only pushes the file past the 8192-character threshold.
- filler 0033: this line only pushes the file past the 8192-character threshold.
- filler 0034: this line only pushes the file past the 8192-character threshold.
- filler 0035: this line only pushes the file past the 8192-character threshold.
- filler 0036: this line only pushes the file past the 8192-character threshold.
- filler 0037: this line only pushes the file past the 8192-character threshold.
- filler 0038: this line only pushes the file past the 8192-character threshold.
- filler 0039: this line only pushes the file past the 8192-character threshold.
- filler 0040: this line only pushes the file past the 8192-character threshold.
- filler 0041: this line only pushes the file past the 8192-character threshold.
- filler 0042: this line only pushes the file past the 8192-character threshold.
- filler 0043: this line only pushes the file past the 8192-character threshold.
- filler 0044: this line only pushes the file past the 8192-character threshold.
- filler 0045: this line only pushes the file past the 8192-character threshold.
- filler 0046: this line only pushes the file past the 8192-character threshold.
- filler 0047: this line only pushes the file past the 8192-character threshold.
- filler 0048: this line only pushes the file past the 8192-character threshold.
- filler 0049: this line only pushes the file past the 8192-character threshold.
- filler 0050: this line only pushes the file past the 8192-character threshold.
- filler 0051: this line only pushes the file past the 8192-character threshold.
- filler 0052: this line only pushes the file past the 8192-character threshold.
- filler 0053: this line only pushes the file past the 8192-character threshold.
- filler 0054: this line only pushes the file past the 8192-character threshold.
- filler 0055: this line only pushes the file past the 8192-character threshold.
- filler 0056: this line only pushes the file past the 8192-character threshold.
- filler 0057: this line only pushes the file past the 8192-character threshold.
- filler 0058: this line only pushes the file past the 8192-character threshold.
- filler 0059: this line only pushes the file past the 8192-character threshold.
- filler 0060: this line only pushes the file past the 8192-character threshold.
- filler 0061: this line only pushes the file past the 8192-character threshold.
- filler 0062: this line only pushes the file past the 8192-character threshold.
- filler 0063: this line only pushes the file past the 8192-character threshold.
- filler 0064: this line only pushes the file past the 8192-character threshold.
- filler 0065: this line only pushes the file past the 8192-character threshold.
- filler 0066: this line only pushes the file past the 8192-character threshold.
- filler 0067: this line only pushes the file past the 8192-character threshold.
- filler 0068: this line only pushes the file past the 8192-character threshold.
- filler 0069: this line only pushes the file past the 8192-character threshold.
- filler 0070: this line only pushes the file past the 8192-character threshold.
- filler 0071: this line only pushes the file past the 8192-character threshold.
- filler 0072: this line only pushes the file past the 8192-character threshold.
- filler 0073: this line only pushes the file past the 8192-character threshold.
- filler 0074: this line only pushes the file past the 8192-character threshold.
- filler 0075: this line only pushes the file past the 8192-character threshold.
- filler 0076: this line only pushes the file past the 8192-character threshold.
- filler 0077: this line only pushes the file past the 8192-character threshold.
- filler 0078: this line only pushes the file past the 8192-character threshold.
- filler 0079: this line only pushes the file past the 8192-character threshold.
- filler 0080: this line only pushes the file past the 8192-character threshold.
- filler 0081: this line only pushes the file past the 8192-character threshold.
- filler 0082: this line only pushes the file past the 8192-character threshold.
- filler 0083: this line only pushes the file past the 8192-character threshold.
- filler 0084: this line only pushes the file past the 8192-character threshold.
- filler 0085: this line only pushes the file past the 8192-character threshold.
- filler 0086: this line only pushes the file past the 8192-character threshold.
- filler 0087: this line only pushes the file past the 8192-character threshold.
- filler 0088: this line only pushes the file past the 8192-character threshold.
- filler 0089: this line only pushes the file past the 8192-character threshold.
- filler 0090: this line only pushes the file past the 8192-character threshold.
- filler 0091: this line only pushes the file past the 8192-character threshold.
- filler 0092: this line only pushes the file past the 8192-character threshold.
- filler 0093: this line only pushes the file past the 8192-character threshold.
- filler 0094: this line only pushes the file past the 8192-character threshold.
- filler 0095: this line only pushes the file past the 8192-character threshold.
- filler 0096: this line only pushes the file past the 8192-character threshold.
- filler 0097: this line only pushes the file past the 8192-character threshold.
- filler 0098: this line only pushes the file past the 8192-character threshold.
- filler 0099: this line only pushes the file past the 8192-character threshold.
- filler 0100: this line only pushes the file past the 8192-character threshold.
- filler 0101: this line only pushes the file past the 8192-character threshold.
- filler 0102: this line only pushes the file past the 8192-character threshold.
- filler 0103: this line only pushes the file past the 8192-character threshold.
- filler 0104: this line only pushes the file past the 8192-character threshold.
- filler 0105: this line only pushes the file past the 8192-character threshold.
- filler 0106: this line only pushes the file past the 8192-character threshold.
- filler 0107: this line only pushes the file past the 8192-character threshold.
- filler 0108: this line only pushes the file past the 8192-character threshold.
- filler 0109: this line only pushes the file past the 8192-character threshold.
- filler 0110: this line only pushes the file past the 8192-character threshold.
- filler 0111: this line only pushes the file past the 8192-character threshold.
- filler 0112: this line only pushes the file past the 8192-character threshold.
- filler 0113: this line only pushes the file past the 8192-character threshold.
- filler 0114: this line only pushes the file past the 8192-character threshold.
- filler 0115: this line only pushes the file past the 8192-character threshold.
- filler 0116: this line only pushes the file past the 8192-character threshold.
- filler 0117: this line only pushes the file past the 8192-character threshold.
- filler 0118: this line only pushes the file past the 8192-character threshold.
- filler 0119: this line only pushes the file past the 8192-character threshold.
- filler 0120: this line only pushes the file past the 8192-character threshold.