larksuite/cli · error

remove suite child %s: %w

Error message

remove suite child %s: %w

What it means

Wraps vfs.RemoveAll failure while deleting an uninstalled official skill's references directory inside the prepared suite. The suite crop could not remove a stale child directory.

Source

Thrown at internal/skillscheck/layout.go:101

func prepareSuite(suitePath string, official, target []string) error {
	referencesPath := filepath.Join(suitePath, "references")
	archived, err := listDirectSubdirs(referencesPath)
	if err != nil {
		return fmt.Errorf("inspect suite archive: %w", err)
	}
	if err := assertSameSkillNames(archived, official, "suite archive"); err != nil {
		return err
	}

	targetSet := toSet(target)
	removed := []string{}
	for _, name := range official {
		if targetSet[name] {
			continue
		}
		if err := vfs.RemoveAll(filepath.Join(referencesPath, name)); err != nil {
			return fmt.Errorf("remove suite child %s: %w", name, err)
		}
		removed = append(removed, name)
	}

	skillPath := filepath.Join(suitePath, "SKILL.md")
	raw, err := vfs.ReadFile(skillPath)
	if err != nil {
		return fmt.Errorf("read suite SKILL.md: %w", err)
	}
	rendered, err := cropSuiteRoutes(string(raw), removed, target)
	if err != nil {
		return err
	}
	if err := vfs.WriteFile(skillPath, []byte(rendered), 0o644); err != nil {
		return fmt.Errorf("write cropped suite SKILL.md: %w", err)
	}

	kept, err := listDirectSubdirs(referencesPath)

View on GitHub (pinned to 7fd6ef3c07)

Solutions

  1. Check staging directory permissions and retry the sync
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at internal/skillscheck/layout.go:101 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04). Data as JSON: /api/errors/590bd1d2b8ba74b5. Report an issue: GitHub.