opencode icon indicating copy to clipboard operation
opencode copied to clipboard

docs: clarify skill naming is convention, not enforced

Open yacinehmito opened this issue 1 day ago • 1 comments

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:

  1. PR #5931 (docs) merged first at 2025-12-22T05:49:28Z
  2. Maintainer simplified PR #5930 in commit 9a5dd18, removing NAME_REGEX validation
  3. PR #5930 (code) merged at 2025-12-22T23:24:07Z without 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 name field accepts any non-empty string
  • Simplified the description length section

Fixes #9294

How did you verify your code works?

  1. 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 9a5dd18 shows maintainer removed NAME_REGEX from skill.ts
  2. Reviewed current packages/opencode/src/skill/skill.ts confirming name: z.string() with no validation
  3. Verified PR merge timestamps via gh pr view --json mergedAt

yacinehmito avatar Jan 18 '26 21:01 yacinehmito

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

github-actions[bot] avatar Jan 18 '26 21:01 github-actions[bot]