[PR #9295] docs: clarify skill naming is convention, not enforced #13057

Open
opened 2026-02-16 18:17:56 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/9295

State: open
Merged: No


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
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9295 **State:** open **Merged:** No --- ### 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: ```typescript 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`
yindo added the pull-request label 2026-02-16 18:17:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13057