xiaohongshu
xiaohongshu
dependency-conflict-resolver
Detect and resolve package dependency conflicts before installation across npm/yarn/pnpm, pip/poetry, cargo, and composer. Auto-trigger when installing/upgrading packages. Validates peer dependencies, version compatibility, security vulnerabilities. Auto-resolves safe conflicts (patches, dev deps...
Full skill instructions
<quick_start> <workflow> Pre-installation check workflow:
<trigger_detection> Auto-invoke when detecting these commands:
npm install, npm i, yarn add, pnpm addpip install, poetry addcargo add, cargo installcomposer require, composer install
</trigger_detection><quick_example>
# User attempts: npm install [email protected]
# Skill detects: Peer dependency conflict with [email protected]
[CONFLICT DETECTED]
Package: [email protected]
Conflict: [email protected] requires react ^17.0.0
Risk: MEDIUM (breaking change)
[RECOMMENDED ACTION]
Option 1: Upgrade react-dom to ^18.0.0 (recommended)
npm install [email protected] [email protected]
Option 2: Downgrade react to ^17.0.0
npm install [email protected]
[SECURITY CHECK]
✓ No known vulnerabilities in [email protected]
✓ No known vulnerabilities in [email protected]
</quick_example> </quick_start>
<workflow> <detection_phase> **1. Identify Package Manager and Context**Scan current directory for lockfiles and package manifests:
Extract:
<conflict_analysis> 2. Analyze Dependency Conflicts
Check for conflicts in order of severity:
A. Peer Dependency Conflicts
B. Transitive Dependency Conflicts
C. Version Constraint Violations
D. Platform/Runtime Conflicts
<security_audit> 3. Security Vulnerability Scan
Run ecosystem-specific security audits:
JavaScript (npm/yarn/pnpm):
npm audit --json
# Parse output for HIGH/CRITICAL vulnerabilities
# Check: GHSA IDs, CVE numbers, severity scores
Python (pip/poetry):
pip-audit --format json
# Or: poetry audit --json
# Parse PyPA Advisory Database results
Rust (cargo):
cargo audit --json
# Check RustSec Advisory Database
# Identify RUSTSEC-YYYY-NNNN advisories
PHP (composer):
composer audit --format json
# Parse security advisories
# Check for blocked insecure packages
For each vulnerability found:
<resolution_strategy> 4. Classify Conflicts and Generate Resolutions
Auto-resolve (apply without asking):
Suggest manual review (present options):
Block with alternatives (prevent installation):
Resolution output format:
[CONFLICT TYPE] Brief description
Package: package-name@requested-version
Current: package-name@current-version
Conflict: dependency-name requires version-constraint
[IMPACT ASSESSMENT]
Risk: LOW | MEDIUM | HIGH | CRITICAL
Scope: dev-only | production | peer-dependency | transitive
[RECOMMENDED ACTIONS]
1. [Primary recommendation with command]
2. [Alternative approach with tradeoffs]
3. [Fallback option if applicable]
[SECURITY STATUS]
✓ No vulnerabilities | ⚠ Vulnerabilities found (details below)
</resolution_strategy>
<execution_phase> 5. Execute Resolution
For auto-resolvable conflicts:
For manual review conflicts:
For blocking conflicts:
<ecosystem_specific_patterns> JavaScript (npm/yarn/pnpm)
Common conflict patterns:
Resolution tools:
npm ls <package> - Show dependency tree for packagenpm why <package> - Explain why package is installednpm audit fix - Auto-fix vulnerabilitiesnpm overrides (package.json) - Force specific versions globallySee references/javascript-patterns.md for detailed examples.
Python (pip/poetry)
Common conflict patterns:
Resolution tools:
pip check - Verify installed packages have compatible dependenciespip install --dry-run - Simulate installation without applyingpoetry show --tree - Display dependency treepoetry update --dry-run - Preview updates without applyingSee references/python-patterns.md for detailed examples.
Rust (cargo)
Common conflict patterns:
Resolution tools:
cargo tree -d - Show duplicate dependenciescargo tree -i <package> - Show inverse dependenciescargo update --dry-run - Preview updatescargo outdated - Check for newer versionsSee references/rust-patterns.md for detailed examples.
PHP (composer)
Common conflict patterns:
Resolution tools:
composer why <package> - Show why package is installedcomposer why-not <package> <version> - Explain why version can't be installedcomposer outdated - List available updatescomposer audit - Security vulnerability scanSee references/php-patterns.md for detailed examples. </ecosystem_specific_patterns>
<advanced_features> Semver Compatibility Analysis
Understand version constraint symbols:
^1.2.3 → >=1.2.3 <2.0.0 (compatible changes)~1.2.3 → >=1.2.3 <1.3.0 (patch updates only)>=1.2.3 <2.0.0 → Explicit range1.2.x → Any patch version in 1.2.x* → Any version (avoid in production)Lockfile Strategy:
npm ci / poetry install in CI/CD (installs exact versions)Monorepo Considerations:
Security Best Practices:
See references/advanced-resolution.md for complex scenarios. </advanced_features>
<anti_patterns> Avoid these common mistakes:
1. Blindly using --force or --legacy-peer-deps
2. Ignoring security warnings
3. Using wildcard versions (*) in production
4. Deleting lockfiles to "fix" conflicts
5. Installing packages without checking compatibility
6. Mixing package managers (npm + yarn)
7. Upgrading all dependencies at once
8. Using outdated audit tools
<success_criteria> Conflict successfully resolved when:
Blocked installation when:
<reference_guides> For ecosystem-specific details and advanced scenarios:
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience