diff options
| author | Kenshiro Nakagawa <kenshiro@anthropic.com> | 2026-02-18 10:01:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-18 10:01:38 -0800 |
| commit | ff736a6da8b6060ba94228f168f4a62636cb120a (patch) | |
| tree | 2338bdef677965e97c97f387559b07c6d68bd64d /.github/scripts | |
| parent | 261ce4fba4f2c314c490302158909a32e5889c88 (diff) | |
| parent | d7d9ed200648ff60a14644ee2d15722f916ecf40 (diff) | |
Merge pull request #408 from anthropics/kenshiro/add-skill-creator-20260217
Add skill-creator plugin
Diffstat (limited to '.github/scripts')
| -rw-r--r-- | .github/scripts/validate-frontmatter.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/.github/scripts/validate-frontmatter.ts b/.github/scripts/validate-frontmatter.ts index c4069857..2aafe8f1 100644 --- a/.github/scripts/validate-frontmatter.ts +++ b/.github/scripts/validate-frontmatter.ts @@ -159,10 +159,14 @@ function validateCommand( // --- File type detection --- function detectFileType(filePath: string): FileType | null { - if (filePath.includes("/agents/")) return "agent"; + // Only match agents/ and commands/ at the plugin root level, not nested + // inside skill content (e.g. plugins/foo/skills/bar/agents/ is skill content, + // not an agent definition). + const inSkillContent = /\/skills\/[^/]+\//.test(filePath); + if (filePath.includes("/agents/") && !inSkillContent) return "agent"; if (filePath.includes("/skills/") && basename(filePath) === "SKILL.md") return "skill"; - if (filePath.includes("/commands/")) return "command"; + if (filePath.includes("/commands/") && !inSkillContent) return "command"; return null; } |
