ln-823-pip-upgrader

Upgrades Python pip/poetry/pipenv dependencies with breaking change handling

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "ln-823-pip-upgrader" with this command: npx skills add levnikolaevich/claude-code-skills/levnikolaevich-claude-code-skills-ln-823-pip-upgrader

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

ln-823-pip-upgrader

Type: L3 Worker Category: 8XX Optimization Parent: ln-820-dependency-optimization-coordinator

Upgrades Python dependencies with automatic breaking change detection.


Overview

AspectDetails
InputProject path, package manager type
OutputUpdated requirements.txt/pyproject.toml
Supportspip, poetry, pipenv

Workflow

Phases: Pre-flight → Detect Manager → Security Audit → Check Outdated → Apply Upgrades → Verify Installation → Report


Phase 0: Pre-flight Checks

CheckRequiredAction if Missing
requirements.txt OR pyproject.toml OR PipfileYesBlock upgrade
Virtual environment activeNoWarn user (risk of system pollution)
Git clean stateYesBlock (need clean baseline for revert)

Workers assume coordinator (ln-820) already verified git state and created backup.

Worktree & Branch Isolation

MANDATORY READ: Load shared/references/git_worktree_fallback.md — use ln-823 row.


Phase 1: Detect Manager

ManagerIndicator Files
piprequirements.txt
poetrypyproject.toml + poetry.lock
pipenvPipfile + Pipfile.lock

Phase 2: Security Audit

Commands

ManagerCommand
pippip-audit --json
poetrypoetry audit (via plugin)
pipenvpipenv check

Actions

SeverityAction
CriticalBlock upgrade, report
HighWarn, continue
Moderate/LowLog only

Phase 3: Check Outdated

Commands

ManagerCommand
pippip list --outdated --format=json
poetrypoetry show --outdated
pipenvpipenv update --outdated

Phase 4: Apply Upgrades

Commands

ManagerCommand
pippip install --upgrade <package>
pip (freeze)pip freeze > requirements.txt
poetrypoetry update
pipenvpipenv update

MCP Tools for Migration Search

Priority Order (Fallback Strategy)

PriorityToolWhen to Use
1mcp__context7__query-docsFirst choice for library docs
2mcp__Ref__ref_search_documentationOfficial docs and PyPI
3WebSearchLatest info, community solutions

Context7 Usage

StepToolParameters
1. Find librarymcp__context7__resolve-library-idlibraryName: "pydantic"
2. Query docsmcp__context7__query-docsquery: "pydantic v1 to v2 migration breaking changes"

MCP Ref Usage

ActionToolQuery Example
Searchmcp__Ref__ref_search_documentation"python pydantic 2 migration guide"
Readmcp__Ref__ref_read_urlURL from search results

WebSearch Fallback

Use when Context7/Ref return no results:

  • "<package> python <version> breaking changes migration"
  • "<ImportError message> <package> fix"

Phase 5: Verify Installation

Commands

CheckCommand
Import testpython -c "import <package>"
Testspytest or python -m pytest

Phase 6: Report Results

Report Schema

FieldDescription
projectProject path
packageManagerpip, poetry, or pipenv
durationTotal time
upgrades[]Applied upgrades
verificationPASSED or FAILED

Common Breaking Changes

MANDATORY READ: Load breaking_changes_patterns.md for full patterns.

PackageBreaking VersionKey Changes
pydantic1 → 2V1 compatibility layer needed
sqlalchemy1 → 2Query syntax changes
fastapi0.99 → 0.100+Pydantic v2 required

Configuration

Options:
  # Upgrade scope
  upgradeType: major          # major | minor | patch

  # Security
  auditLevel: high
  minimumReleaseAge: 14

  # Python specific
  pythonVersion: "3.12"
  useVirtualenv: true

  # Verification
  runTests: true

Error Handling

ErrorCauseSolution
ImportErrorBreaking API changeSearch Context7/Ref for migration
Dependency conflictVersion mismatchTry pip-compile or poetry lock

References


Definition of Done

  • Package manager detected (pip/poetry/pipenv) from indicator files
  • Security audit completed (pip-audit/poetry audit/pipenv check)
  • Outdated packages identified and listed
  • Upgrades applied with requirements.txt/pyproject.toml updated
  • Breaking changes handled via MCP migration guides
  • Import tests and pytest pass after upgrades
  • Report returned with upgrades applied and verification status

Version: 1.1.0 Last Updated: 2026-01-10

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

ln-782-test-runner

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ln-140-test-docs-creator

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ln-150-presentation-creator

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

ln-110-project-docs-coordinator

No summary provided by upstream source.

Repository SourceNeeds Review