@langwatch/scenario
    Preparing search index...

    Function injectSkill

    • Copy a SKILL.md into the working directory's .skills/<name>/ so Claude Code discovers it, and write a CLAUDE.md pointing at all discovered skills (unless one already exists).

      The skill name is derived from the SKILL.md's parent directory name, matching the reference helper (path.basename(path.dirname(skillPath))).

      NOTE: this performs EAGER filesystem writes (mkdirSync + copyFileSync), and copyFileSync CLOBBERS any existing same-named skill copy at <workingDirectory>/.skills/<name>/SKILL.md. This assumes a trusted-fixture setup (a test/scratch working directory), not an arbitrary user dir.

      Parameters

      • workingDirectory: string

        The directory Claude Code is spawned in.

      • skillPath: string

        Absolute path to a SKILL.md to inject.

      Returns void