Skip to content

Bug: multi-platform install race in installVerbatimSkills() deletes source before sibling platforms copy #2005

@alexeyv

Description

@alexeyv

Description

In _config-driven.js, installVerbatimSkills() (around lines 693–702), for records where install_to_bmad === 'false', the cleanup loop unconditionally deletes the source directory after installation. When multiple skill_format platforms (e.g., Kiro and Ona) are installed in the same CLI invocation, the first platform to run this loop deletes the source; the second platform finds nothing to copy and silently installs 0 verbatim skills for those entries.

Steps to Reproduce

  1. Install BMAD with two or more skill_format platforms selected simultaneously (e.g., --tools kiro,ona)
  2. Include a skill with install_to_bmad: 'false'
  3. Observe that only the first platform receives the verbatim skill files

Suggested Fix

// Guard against source already removed by prior platform
if (await fs.pathExists(sourceDir)) {
  await fs.remove(sourceDir);
}

Source

Found during PR review of #1968. Not specific to that PR — this is a pre-existing issue in the shared installer logic.


🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions