Skip to content
This repository was archived by the owner on Nov 25, 2026. It is now read-only.
This repository was archived by the owner on Nov 25, 2026. It is now read-only.

scan-scripts.py mutates the user's project: 'uv run ruff' syncs the nearest pyproject.toml (creates .venv/uv.lock, installs deps); biome runs unpinned via 'npx --yes' #156

Open

Description

@CloneOfAlex

Describe the bug

scan-scripts.py (both builders) is a lint scanner the Analyze flow treats as read-only. It shells out to:

  • uv run ruff check …
  • uv run --with shellcheck-py shellcheck …
  • npx --yes @biomejs/biome lint …

uv run <command> runs in project mode: uv looks for the nearest pyproject.toml from the current directory upwards, then locks and syncs that project before running the command. The Analyze flow runs from the user's repository, so linting a skill:

  • creates .venv/ and uv.lock in the user's project, leaving the git tree dirty;
  • installs the project's dependencies and runs its build backend;
  • can hit the 30 s _run_command timeout on the first sync. The scanner then reports ruff timed out instead of lint results.

npx --yes @biomejs/biome downloads and executes whatever version of the package is latest, with no pin.

Steps to reproduce

mkdir -p /tmp/t/userproj /tmp/t/sk/scripts && cd /tmp/t
printf -- '---\nname: sk\ndescription: x\n---\n' > sk/SKILL.md
printf '#!/usr/bin/env python3\nprint(1)\n' > sk/scripts/a.py
cat > userproj/pyproject.toml <<'EOF'
[project]
name = "userproj"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = ["six"]
EOF
cd userproj && ls -a                       # . .. pyproject.toml
python3 <bmb>/skills/bmad-workflow-builder/scripts/scan-scripts.py /tmp/t/sk >/dev/null
ls -a                                      # .ruff_cache .venv pyproject.toml uv.lock
ls .venv/lib/*/site-packages | grep six    # six-1.17.0.dist-info, six.py

Expected behavior

Lint without touching the caller's project:

  • uv tool run ruff@<pinned> check --isolated …, or uv run --no-project --with ruff==<pinned> ruff …;
  • the same for shellcheck: uv tool run --from shellcheck-py==<pinned> shellcheck …;
  • npx --yes @biomejs/biome@<pinned>.

Run the linters with cwd set to the skill directory, and pass --isolated / explicit config so results don't depend on the user's ruff or biome settings (see #130).

Environment

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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