{"record":{"id":"fb5ef68afc5a231b","repo":"charmbracelet/crush","slug":"skill-not-found","errorCode":null,"errorMessage":"skill not found","messagePattern":"skill not found","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skills/catalog.go","lineNumber":41,"sourceCode":"\tName          string     `json:\"name\"`\n\tDescription   string     `json:\"description\"`\n\tLabel         string     `json:\"label\"`\n\tSource        SourceType `json:\"source\"`\n\tUserInvocable bool       `json:\"user_invocable\"`\n}\n\n// SkillReadResult holds metadata about a skill returned alongside its\n// content.\ntype SkillReadResult struct {\n\tName        string     `json:\"name\"`\n\tDescription string     `json:\"description\"`\n\tSource      SourceType `json:\"source\"`\n\tBuiltin     bool       `json:\"builtin\"`\n}\n\n// ErrSkillNotFound is returned when a skill ID is not part of the\n// effective visible skill set.\nvar ErrSkillNotFound = errors.New(\"skill not found\")\n\n// Catalog builds a slice of CatalogEntry values from pre-discovered\n// skills. The skillPaths and workingDir parameters are used only for\n// labelling (system / user / project); pass nil/empty when labels are\n// not needed.\nfunc Catalog(active []*Skill, skillPaths []string, workingDir string) []CatalogEntry {\n\tentries := make([]CatalogEntry, 0, len(active))\n\tfor _, skill := range active {\n\t\tlabel, source := skillLabel(skillPaths, workingDir, skill)\n\t\tentries = append(entries, CatalogEntry{\n\t\t\tID:            skill.SkillFilePath,\n\t\t\tName:          skill.Name,\n\t\t\tDescription:   skill.Description,\n\t\t\tLabel:         label,\n\t\t\tSource:        source,\n\t\t\tUserInvocable: skill.UserInvocable,\n\t\t})\n\t}","sourceCodeStart":23,"sourceCodeEnd":59,"githubUrl":"https://github.com/charmbracelet/crush/blob/7944b8e52225d8805e31eacbf7ef24856b0dfb7a/internal/skills/catalog.go#L23-L59","documentation":"ErrSkillNotFound is the sentinel error returned by Catalog.FindEffective when the requested skill ID is not part of the effective visible skill set (builtin, user, or project skills currently discovered). Callers should compare with errors.Is.","triggerScenarios":"Calling FindEffective(id) with a skill ID that was never discovered, was filtered out as non-visible, or whose source directory no longer exists.","commonSituations":"Typo in a skill ID in config or an agent prompt; a project skill removed/renamed while stale references remain; skills disabled or excluded so they are not in the effective set; running in a directory without the project skill.","solutions":["Run the skill listing (catalog) to see the effective visible skill IDs and use the exact ID","Fix the ID typo or update the stale reference to the renamed skill","Ensure the skill directory exists in .agents/skills, user skills dir, or builtin set and passes visibility filtering"],"exampleFix":"// before\nskill, err := catalog.FindEffective(\"code-review\")\n// after\nif !catalog.HasSkill(\"code-review\") {\n\treturn fmt.Errorf(\"skill %q not available; check skill config\", \"code-review\")\n}\nskill, err := catalog.FindEffective(\"code-review\")","handlingStrategy":"type-guard","validationCode":"for id, ok := range visibleIDs { _ = id; _ = ok }\n// before lookup:\nif _, ok := catalog.VisibleIDs()[skillID]; !ok {\n\treturn fmt.Errorf(\"unknown skill %q\", skillID)\n}","typeGuard":"func hasSkill(c *skills.Catalog, id string) bool {\n\t_, err := c.FindEffective(id)\n\treturn err == nil\n}","tryCatchPattern":"skill, err := catalog.FindEffective(id)\nif errors.Is(err, skills.ErrSkillNotFound) {\n\t// fall back to builtin or report unknown skill\n}","preventionTips":["List effective skills before referencing IDs in config","Use exact IDs from the catalog output, not display names","Re-check skill references after renaming or removing skills"],"tags":["skills","lookup","not-found"],"backgroundTag":"resource-not-found","analyzedSha":"7944b8e52225d8805e31eacbf7ef24856b0dfb7a","analyzedAt":"2026-08-29T12:48:59.079Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}