{"record":{"id":"513d11c3bde20220","repo":"cli/cli","slug":"could-not-resolve-target-path-w","errorCode":null,"errorMessage":"could not resolve target path: %w","messagePattern":"could not resolve target path: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/skills/installer/installer.go","lineNumber":197,"sourceCode":"\nfunc installLocalSkill(sourceRoot string, skill discovery.Skill, baseDir string) error {\n\t// Use skill.Name (not InstallName) so skills are always installed flat.\n\t// Most agent clients only discover immediate subdirectories of their\n\t// skills folder and do not find skills nested under namespace directories.\n\tskillDir := filepath.Join(baseDir, skill.Name)\n\tif err := os.MkdirAll(skillDir, 0o755); err != nil {\n\t\treturn fmt.Errorf(\"could not create directory %s: %w\", skillDir, err)\n\t}\n\n\tsrcDir := filepath.Join(sourceRoot, filepath.FromSlash(skill.Path))\n\tabsSource, err := filepath.Abs(srcDir)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not resolve source path: %w\", err)\n\t}\n\n\tsafeSkillDir, err := safepaths.ParseAbsolute(skillDir)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"could not resolve target path: %w\", err)\n\t}\n\n\treturn filepath.WalkDir(srcDir, func(p string, d os.DirEntry, walkErr error) error {\n\t\tif walkErr != nil {\n\t\t\treturn walkErr\n\t\t}\n\t\tif d.Type()&os.ModeSymlink != 0 {\n\t\t\treturn nil\n\t\t}\n\t\tif d.IsDir() {\n\t\t\treturn nil\n\t\t}\n\n\t\trelPath, err := filepath.Rel(srcDir, p)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n","sourceCodeStart":179,"sourceCodeEnd":215,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/internal/skills/installer/installer.go#L179-L215","documentation":"Error \"could not resolve target path: %w\" thrown in cli/cli.","triggerScenarios":"Thrown at internal/skills/installer/installer.go:197 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the destination directory exists and is writable; use an absolute target path."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}