Tencent/WeKnora · error

failed to list skill files: %w

Error message

failed to list skill files: %w

What it means

Wrapper in ListSkillFiles: the recursive filepath.Walk over the skill's base directory returned a non-nil error (walk failure such as unreadable subdirectory, or a Rel computation error inside the walk callback). The listing itself failed, so the caller gets no partial file list.

Source

Thrown at internal/agent/skills/loader.go:278

			return err
		}

		if info.IsDir() {
			return nil
		}

		// Get relative path
		relPath, err := filepath.Rel(skill.BasePath, path)
		if err != nil {
			return err
		}

		files = append(files, relPath)
		return nil
	})

	if err != nil {
		return nil, fmt.Errorf("failed to list skill files: %w", err)
	}

	return files, nil
}

// GetSkillByName returns a cached skill by name
func (l *Loader) GetSkillByName(name string) (*Skill, bool) {
	skill, ok := l.discoveredSkills[name]
	return skill, ok
}

// GetSkillBasePath returns the base path for a skill (always absolute)
func (l *Loader) GetSkillBasePath(skillName string) (string, error) {
	skill, ok := l.discoveredSkills[skillName]
	if !ok {
		var err error
		skill, err = l.LoadSkillInstructions(skillName)
		if err != nil {

View on GitHub (pinned to 988cbb0330)

Solutions

  1. Fix permissions on the skill directory tree so it can be walked
  2. Check for broken symlinks or inaccessible subdirectories
  3. Retry after the skill directory finishes syncing/installing
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at internal/agent/skills/loader.go:278 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02). Data as JSON: /api/errors/6cc4c943f00b5472. Report an issue: GitHub.