{"record":{"id":"939601514d3e9f81","repo":"Tencent/WeKnora","slug":"skill-name-cannot-contain-reserved-word-s","errorCode":null,"errorMessage":"skill name cannot contain reserved word: %s","messagePattern":"skill name cannot contain reserved word: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/agent/skills/skill.go","lineNumber":95,"sourceCode":"\tContent  string // File content\n\tIsScript bool   // Whether this is an executable script\n}\n\n// Validate checks if the skill metadata is valid according to Claude's specification\nfunc (s *Skill) Validate() error {\n\t// Validate name\n\tif s.Name == \"\" {\n\t\treturn errors.New(\"skill name is required\")\n\t}\n\tif n := utf8.RuneCountInString(s.Name); n > MaxNameLength {\n\t\treturn fmt.Errorf(\"skill name is %d characters; maximum is %d\", n, MaxNameLength)\n\t}\n\tif !namePattern.MatchString(s.Name) {\n\t\treturn errors.New(\"skill name must contain only letters, numbers, hyphens, and underscores\")\n\t}\n\tfor _, reserved := range reservedWords {\n\t\tif strings.Contains(s.Name, reserved) {\n\t\t\treturn fmt.Errorf(\"skill name cannot contain reserved word: %s\", reserved)\n\t\t}\n\t}\n\tif xmlTagPattern.MatchString(s.Name) {\n\t\treturn errors.New(\"skill name cannot contain XML tags\")\n\t}\n\n\t// Validate description\n\tif s.Description == \"\" {\n\t\treturn errors.New(\"skill description is required\")\n\t}\n\tif n := utf8.RuneCountInString(s.Description); n > MaxDescriptionLength {\n\t\treturn fmt.Errorf(\"skill description is %d characters; maximum is %d\", n, MaxDescriptionLength)\n\t}\n\tif xmlTagPattern.MatchString(s.Description) {\n\t\treturn errors.New(\"skill description cannot contain XML tags\")\n\t}\n\n\treturn nil","sourceCodeStart":77,"sourceCodeEnd":113,"githubUrl":"https://github.com/Tencent/WeKnora/blob/988cbb03305e055d8ebb7d46d9ac6cc0803cd074/internal/agent/skills/skill.go#L77-L113","documentation":"Naming-policy guard in Skill.Validate: the skill's Name contains one of the reserved words checked by the loop (Claude-spec reserved substrings). The name is syntactically valid but disallowed to prevent impersonation/collision with built-in skill semantics; the reserved word is interpolated into the message.","triggerScenarios":"Thrown at internal/agent/skills/skill.go:95 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rename the skill to avoid the reserved substring in its frontmatter `name` field","Use a hyphenated or prefixed variant, e.g. add a project prefix","Re-validate after rename via ParseSkillFile"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"988cbb03305e055d8ebb7d46d9ac6cc0803cd074","analyzedAt":"2026-09-02T14:41:08.344Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}