Skip to content

Commit a0c367c

Browse files
xr843claude
andcommitted
fix(lint): exempt meta-skills from lineage/source checks
The compare-masters skill is an aggregate meta-skill that borrows from other masters and has no single lineage, dates, sources, or own corpus directories. Treating it as a regular master made --strict CI fail on all branches since 2026-04-08. Introduce a kind field (default master) and skip the lineage/dates/ sources/citation_format and references/sources directory checks when kind == meta-skill. compare/SKILL.md gains kind: meta-skill. Required fields (name, description) and version/license are still enforced for all skills. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 38e7eb0 commit a0c367c

2 files changed

Lines changed: 22 additions & 14 deletions

File tree

prebuilt/compare/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: compare-masters
33
description: Use when user asks to compare masters, compare schools, compare perspectives, 对比, 各宗怎么看, 不同宗派, 禅净之争, 性相之辩, 空有之争, or wants multiple masters to answer the same question. Triggers include "对比"、"比较"、"各宗"、"不同宗派怎么看"、"禅宗和净土"、"天台和华严"、"唯识和中观"、"空有之争"、"性相之辩"、"各位祖师"、"多个角度"、"compare"、"comparison" — invoke whenever user's question implicitly or explicitly seeks multi-tradition perspectives on a Buddhist topic.
44
version: 0.3.0
55
license: MIT
6+
kind: meta-skill
67
verified_by: xr843
78
verified_at: 2026-04-06
89
---

scripts/validate.py

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424

2525
REQUIRED_FIELDS = {"name", "description"}
2626
RECOMMENDED_FIELDS = {"version", "license", "lineage", "dates", "sources", "citation_format"}
27+
# Fields not applicable to meta-skills (aggregate/comparison skills with no single lineage)
28+
META_SKILL_EXCLUDED = {"lineage", "dates", "sources", "citation_format"}
2729
MAX_DESCRIPTION_CHARS = 500
2830
MAX_SKILL_LINES = 500
2931

@@ -104,7 +106,10 @@ def lint_master(master_dir: Path, strict: bool = False) -> list[str]:
104106
issues.append(f"[ERROR] {name}: missing required field '{field}'")
105107

106108
# --- Recommended fields ---
109+
kind = fm.get("kind", "master")
107110
for field in RECOMMENDED_FIELDS:
111+
if kind == "meta-skill" and field in META_SKILL_EXCLUDED:
112+
continue
108113
if field not in fm:
109114
issues.append(f"[WARN] {name}: missing recommended field '{field}'")
110115

@@ -126,21 +131,23 @@ def lint_master(master_dir: Path, strict: bool = False) -> list[str]:
126131
issues.append(f"[WARN] {name}: sources[{i}] missing 'title' or 'cbeta_id'")
127132

128133
# --- Directory structure checks ---
129-
refs_dir = master_dir / "references"
130-
sources_dir = master_dir / "sources"
134+
# Meta-skills (e.g. compare-masters) borrow from other masters and have no own corpus
135+
if kind != "meta-skill":
136+
refs_dir = master_dir / "references"
137+
sources_dir = master_dir / "sources"
131138

132-
if not refs_dir.exists():
133-
issues.append(f"[WARN] {name}: missing references/ directory")
134-
else:
135-
if not (refs_dir / "voice.md").exists():
136-
issues.append(f"[WARN] {name}: missing references/voice.md")
137-
if not (refs_dir / "teaching.md").exists():
138-
issues.append(f"[WARN] {name}: missing references/teaching.md")
139-
140-
if not sources_dir.exists():
141-
issues.append(f"[WARN] {name}: missing sources/ directory")
142-
elif not list(sources_dir.glob("*.md")):
143-
issues.append(f"[WARN] {name}: sources/ directory is empty")
139+
if not refs_dir.exists():
140+
issues.append(f"[WARN] {name}: missing references/ directory")
141+
else:
142+
if not (refs_dir / "voice.md").exists():
143+
issues.append(f"[WARN] {name}: missing references/voice.md")
144+
if not (refs_dir / "teaching.md").exists():
145+
issues.append(f"[WARN] {name}: missing references/teaching.md")
146+
147+
if not sources_dir.exists():
148+
issues.append(f"[WARN] {name}: missing sources/ directory")
149+
elif not list(sources_dir.glob("*.md")):
150+
issues.append(f"[WARN] {name}: sources/ directory is empty")
144151

145152
# --- Check for tests ---
146153
tests_dir = master_dir / "tests"

0 commit comments

Comments
 (0)