opencode
opencode copied to clipboard
docs: clarify skill naming is convention, not enforced
What does this PR do?
Fixes the Agent Skills documentation which incorrectly states that skill names must follow strict validation rules (regex ^[a-z0-9]+(-[a-z0-9]+)*$, directory name matching, etc).
The actual code in packages/opencode/src/skill/skill.ts shows no such validation:
export const Info = z.object({
name: z.string(), // No regex validation
description: z.string(),
location: z.string(),
})
How this happened:
The documentation (PR #5931) and code (PR #5930) were created together but merged in different order:
- PR #5931 (docs) merged first at
2025-12-22T05:49:28Z - Maintainer simplified PR #5930 in commit
9a5dd18, removingNAME_REGEXvalidation - PR #5930 (code) merged at
2025-12-22T23:24:07Zwithout the validation
The docs were accurate when written, but became incorrect when the code was simplified before merging.
Changes:
- Renamed "Validate names" → "Naming conventions"
- Changed strict requirements to recommended conventions
- Clarified that the
namefield accepts any non-empty string - Simplified the description length section
Fixes #9294
How did you verify your code works?
- Traced git history to confirm timeline:
-
git log --all --oneline -- "packages/web/src/content/docs/skills.mdx"shows PR #5931 added the docs -
git show 9a5dd18shows maintainer removedNAME_REGEXfrom skill.ts
-
- Reviewed current
packages/opencode/src/skill/skill.tsconfirmingname: z.string()with no validation - Verified PR merge timestamps via
gh pr view --json mergedAt
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found