Skip to content

fix: using-git-worktrees skill runs for all pyproject.toml projects, breaking non-Poetry setups #1108

@kuishou68

Description

@kuishou68

Bug Report

Description

In skills/using-git-worktrees/SKILL.md, the auto-detected Python project setup step is:

if [ -f pyproject.toml ]; then poetry install; fi

This unconditionally runs poetry install for any project containing pyproject.toml, even when the project uses uv, pip, hatch, pdm, or plain setuptools. The vast majority of modern Python projects use pyproject.toml without Poetry.

Impact

  • Running poetry install on a non-Poetry project fails (Poetry rejects the file or installs incorrectly).
  • On machines without Poetry installed it errors out entirely.
  • This silently breaks the "clean baseline" step that the worktrees skill relies on.

Expected Behaviour

The skill should detect the actual package manager by inspecting pyproject.toml content (look for [tool.poetry]) or by checking for lock files (poetry.lock, uv.lock, etc.) before choosing the install command.

Suggested Fix

# Python - detect package manager
if [ -f pyproject.toml ]; then
  if grep -q '\[tool\.poetry\]' pyproject.toml 2>/dev/null; then
    poetry install
  elif [ -f uv.lock ]; then
    uv sync
  elif [ -f requirements.txt ]; then
    pip install -r requirements.txt
  else
    pip install -e .
  fi
elif [ -f requirements.txt ]; then
  pip install -r requirements.txt
fi

Affected File

skills/using-git-worktrees/SKILL.md, "Run Project Setup" section

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions