dependency-alignment
БесплатноБез исполняемых скриптовНе проверенDependency version alignment and conflict resolution for parallel development. Use when extracting dependencies from Tech Specs to ensure version…
от 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-decomposePhase 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
- Check for
pyproject.toml(preferred - modern Python) - Fall back to
requirements.txt(legacy) - 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
- Check for
package.json(required) - 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 viewoutput - Conflict: Parse
ERESOLVEerrors for peer dependency issues
Conflict Resolution Strategies
Strategy 1: Pin to Compatible Version (Default)
When a requested version range can be satisfied:
- Resolve to the latest version within the range
- Pin to exact version in manifest
- 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:
- Check if upgrade is compatible with other dependencies
- Move to
upgradelist with pinned version - 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:
- Find version that satisfies both constraints
- Use the compatible version
- 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
Установить 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), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic