docs: clarify skill naming is convention, not enforced#9295
Open
yacinehmito wants to merge 1 commit intoanomalyco:devfrom
Open
docs: clarify skill naming is convention, not enforced#9295yacinehmito wants to merge 1 commit intoanomalyco:devfrom
yacinehmito wants to merge 1 commit intoanomalyco:devfrom
Conversation
The documentation incorrectly stated that skill names must follow strict validation rules (lowercase alphanumeric with hyphens, regex pattern, etc). Looking at the actual code in skill.ts, there is no such validation - the name field accepts any string. This validation was proposed in PR anomalyco#5930 but removed before merging because it broke backward compatibility (see issue anomalyco#6432). Updated the docs to present these as recommended conventions rather than enforced requirements. Fixes anomalyco#9294
Contributor
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsshows no such validation:How this happened:
The documentation (PR #5931) and code (PR #5930) were created together but merged in different order:
2025-12-22T05:49:28Z9a5dd18, removingNAME_REGEXvalidation2025-12-22T23:24:07Zwithout the validationThe docs were accurate when written, but became incorrect when the code was simplified before merging.
Changes:
namefield accepts any non-empty stringFixes #9294
How did you verify your code works?
git log --all --oneline -- "packages/web/src/content/docs/skills.mdx"shows PR docs: Agent Skills #5931 added the docsgit show 9a5dd18shows maintainer removedNAME_REGEXfrom skill.tspackages/opencode/src/skill/skill.tsconfirmingname: z.string()with no validationgh pr view --json mergedAt