Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

dependency-alignment

БесплатноБез исполняемых скриптовНе проверен

Dependency version alignment and conflict resolution for parallel development. Use when extracting dependencies from Tech Specs to ensure version…

jpoutrinот jpoutrin★ 16 звёзд на GitHub

Об этом скилле

Dependency Version Alignment Skill

This skill resolves dependency versions during parallel decomposition to ensure compatibility with existing project dependencies and avoid transitive conflicts.

When This Skill Activates

  • During parallel-decompose Phase 1 (after dependency extraction, before manifest generation)
  • When the cto-architect agent identifies dependencies from Tech Spec imports
  • When validating manifest.json dependencies before execution

Supported Ecosystems

Ecosystem Dependency Files Package Manager Resolution Tool
Python pyproject.toml, requirements.txt, uv.lock uv, pip uv pip compile
Node.js package.json, package-lock.json, yarn.lock npm, yarn, pnpm npm view, npm ls

Detection Strategy

Python Projects

  1. Check for pyproject.toml (preferred - modern Python)
  2. Fall back to requirements.txt (legacy)
  3. Check for lock files: uv.lock, poetry.lock, requirements.lock
# Detection order
if -f "pyproject.toml"; then
  # Use pyproject.toml as source of truth
elif -f "requirements.txt"; then
  # Fall back to requirements.txt
fi

Node.js Projects

  1. Check for package.json (required)
  2. Check for lock files: package-lock.json, yarn.lock, pnpm-lock.yaml
# Detection
if -f "package.json"; then
  # Node.js project detected
fi

Resolution Commands

Python with uv

# Step 1: Get currently installed/locked versions
uv pip freeze --format json

# Step 2: Resolve a new dependency against existing project
# Creates a temporary requirements and resolves compatible version
uv pip compile pyproject.toml \
  --extra-requirement "pydantic>=2.0" \
  --dry-run \
  --quiet 2>&1

# Step 3: Get the resolved version for a specific package
uv pip compile - <<< "pydantic>=2.0" --dry-run 2>&1 | grep "pydantic=="

# Alternative: Check latest compatible version
uv pip compile - <<< "pydantic>=2.0,<3.0" --dry-run 2>&1

Parsing uv output:

  • Success: Extract pinned version from output (e.g., pydantic==2.5.3)
  • Conflict: Parse error message for incompatible version ranges

Node.js with npm

# Step 1: Get current dependency tree
npm ls --all --json 2>&1

# Step 2: Check what version would be installed
npm view zod@">=3.0" version --json

# Step 3: Check for peer dependency conflicts
npm install zod@">=3.0" --dry-run --json 2>&1

# Step 4: Explain dependency resolution
npm explain zod

Parsing npm output:

  • Success: Extract resolved version from npm view output
  • Conflict: Parse ERESOLVE errors for peer dependency issues

Conflict Resolution Strategies

Strategy 1: Pin to Compatible Version (Default)

When a requested version range can be satisfied:

  1. Resolve to the latest version within the range
  2. Pin to exact version in manifest
  3. No warning needed
Requested: pydantic>=2.0
Resolved:  pydantic==2.5.3

Strategy 2: Upgrade Existing Dependency

When new requirement needs a higher version than currently installed:

  1. Check if upgrade is compatible with other dependencies
  2. Move to upgrade list with pinned version
  3. Resolution tool validates compatibility
Current:   requests==2.25.1
Requested: requests>=2.28
Resolved:  requests==2.31.0 (in upgrade list)

Strategy 3: Find Compatible Range

When direct version causes conflict:

  1. Find version that satisfies both constraints
  2. Use the compatible version
  3. Log the resolution for transparency
Existing:  sqlalchemy>=1.4,<2.0 (from another package)
Requested: sqlalchemy>=2.0
Conflict:  No compatible version
Action:    Error with explanation, requires manual resolution

Output Format

Dependencies are output as pinned version strings:

Python Format

{
  "dependencies": {
    "python": {
      "add": ["pydantic==2.5.3", "sqlalchemy==2.0.25", "httpx==0.27.0"],
      "upgrade": ["requests==2.31.0"],
      "remove": [],
      "add_dev": ["pytest==7.4.3", "pytest-asyncio==0.21.1", "mypy==1.8.0"]
    }
  }
}

Node.js Format

{
  "dependencies": {
    "node": {
      "add": ["[email protected]", "[email protected]", "@types/[email protected]"],
      "upgrade": ["[email protected]"],
      "remove": [],
      "add_dev": ["[email protected]", "[email protected]", "[email protected]"]
    }
  }
}

Format conventions:

  • Python: package==version (PEP 440)
  • Node.js: package@version (npm convention)
  • All versions are pinned (exact, not ranges)

Integration with parallel-decompose

Step 7b in Phase 1

After extracting dependencies from Tech Spec imports (Step 7), invoke this skill:

7b. Align dependency versions (invoke `dependency-alignment` skill):
    - Detect project ecosystem (Python/Node.js)
    - For each extracted dependency:
      a. Query resolution tool for compatible version
      b. Check against existing project dependencies
      c. Resolve conflicts autom
Полный SKILL.md на GitHub

Установить dependency-alignment в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл dependency-alignment?

Dependency version alignment and conflict resolution for parallel development. Use when extracting dependencies from Tech Specs to ensure version compatibility with existing project dependencies and transitive dependencies.

Как установить скилл dependency-alignment?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл dependency-alignment запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить dependency-alignment с