Tencent/WeKnora · error
skill file path is required
Error message
skill file path is required
What it means
Input guard in safeSkillRelPath: the caller passed an empty or whitespace-only relative path. A path is required to resolve any file inside a skill bundle, so the empty input is rejected before normalization.
Source
Thrown at internal/agent/skills/tenant_source.go:269
if err != nil {
return "", err
}
return path.Join(basePath, clean), nil
}
func (s *TenantSkillSource) row(name string) (*types.TenantSkillEntity, error) {
if row, ok := s.byName[name]; ok {
return row, nil
}
return nil, fmt.Errorf("skill not found: %s", name)
}
// safeSkillRelPath normalises a caller-supplied relative path and refuses
// anything that leaves the skill directory.
func safeSkillRelPath(relativePath string) (string, error) {
trimmed := strings.TrimSpace(relativePath)
if trimmed == "" {
return "", fmt.Errorf("skill file path is required")
}
if path.IsAbs(trimmed) {
return "", fmt.Errorf("invalid skill file path: %s", relativePath)
}
clean := path.Clean(trimmed)
if clean == "." || clean == ".." || strings.HasPrefix(clean, "../") {
return "", fmt.Errorf("invalid skill file path: %s", relativePath)
}
return clean, nil
}
// bundleArchive returns the compressed zip of one skill, downloading it at
// most once per cache lifetime.
func (s *TenantSkillSource) bundleArchive(
row *types.TenantSkillEntity,
) ([]byte, error) {
if s.loadBundle == nil {
return nil, fmt.Errorf("skill bundles are not available in this deployment")View on GitHub (pinned to 988cbb0330)
Solutions
- Pass a non-empty relative path such as "SKILL.md" or "scripts/run.sh"
- Check upstream code for variables that are empty when the skill has no script file
- Treat as a programming error: never call with an unset path
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/agent/skills/tenant_source.go:269 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/225ae5d1f74c34f7.
Report an issue: GitHub.