{"record":{"id":"056b758ca18c4ff8","repo":"charmbracelet/crush","slug":"compatibility-exceeds-d-characters","errorCode":null,"errorMessage":"compatibility exceeds %d characters","messagePattern":"compatibility exceeds (.+?) characters","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skills/skills.go","lineNumber":142,"sourceCode":"\t\tif len(s.Name) > MaxNameLength {\n\t\t\terrs = append(errs, fmt.Errorf(\"name exceeds %d characters\", MaxNameLength))\n\t\t}\n\t\tif !namePattern.MatchString(s.Name) {\n\t\t\terrs = append(errs, errors.New(\"name must be alphanumeric with hyphens, no leading/trailing/consecutive hyphens\"))\n\t\t}\n\t\tif s.Path != \"\" && !strings.EqualFold(filepath.Base(s.Path), s.Name) {\n\t\t\terrs = append(errs, fmt.Errorf(\"name %q must match directory %q\", s.Name, filepath.Base(s.Path)))\n\t\t}\n\t}\n\n\tif s.Description == \"\" {\n\t\terrs = append(errs, errors.New(\"description is required\"))\n\t} else if len(s.Description) > MaxDescriptionLength {\n\t\terrs = append(errs, fmt.Errorf(\"description exceeds %d characters\", MaxDescriptionLength))\n\t}\n\n\tif len(s.Compatibility) > MaxCompatibilityLength {\n\t\terrs = append(errs, fmt.Errorf(\"compatibility exceeds %d characters\", MaxCompatibilityLength))\n\t}\n\n\treturn errors.Join(errs...)\n}\n\n// Parse parses a SKILL.md file from disk.\nfunc Parse(path string) (*Skill, error) {\n\tcontent, err := os.ReadFile(path)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tskill, err := ParseContent(content)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tskill.Path = filepath.Dir(path)","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/charmbracelet/crush/blob/7944b8e52225d8805e31eacbf7ef24856b0dfb7a/internal/skills/skills.go#L124-L160","documentation":"Skill.Validate() limits the Compatibility field to MaxCompatibilityLength (500) characters. The compatibility field is free-form metadata describing environment requirements, and this error is thrown when it exceeds that cap.","triggerScenarios":"Calling Validate() on a Skill whose Compatibility string exceeds 500 characters, usually from an over-long `compatibility:` frontmatter entry in SKILL.md.","commonSituations":"Listing every OS/version/dependency combination in prose instead of a terse summary; concatenating tool version matrices into the compatibility field.","solutions":["Shorten `compatibility:` in SKILL.md frontmatter to under 500 characters","Keep only the essential environment requirements (e.g. \"requires: git, go 1.21+\") and move details into the body","Split environment notes across description or instructions where appropriate"],"exampleFix":"// before\n// compatibility: Requires Linux, macOS, or Windows with WSL; git >= 2.30; go >= 1.21; node >= 20; ... [600+ chars]\n// after\n// compatibility: requires git >= 2.30 and go >= 1.21","handlingStrategy":"validation","validationCode":"const maxCompatibility = 500\nif len(frontmatter.Compatibility) > maxCompatibility {\n\treturn fmt.Errorf(\"compatibility is %d chars, limit %d\", len(frontmatter.Compatibility), maxCompatibility)\n}","typeGuard":null,"tryCatchPattern":"skill, err := skills.Parse(path)\nif err != nil {\n\treturn fmt.Errorf(\"skipping skill %s: %w\", path, err)\n}","preventionTips":["Keep compatibility notes to a terse list of hard requirements","Move per-platform or version-matrix details into the SKILL.md body","Lint frontmatter field lengths in CI"],"tags":["skills","validation","frontmatter","length-limit"],"backgroundTag":"field-exceeds-max-length","analyzedSha":"7944b8e52225d8805e31eacbf7ef24856b0dfb7a","analyzedAt":"2026-08-29T12:48:59.079Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}