skills/deps/SKILL.md
Analyze, test, and upgrade dependencies. One curated PR, not 47 version bumps. Reachability analysis, behavioral diffs, risk assessment. Package-manager agnostic. Use when: "upgrade deps", "dependency audit", "check for updates", "outdated packages", "security audit deps", "update dependencies", "vulnerable dependencies", "deps". Trigger: /deps.
npx skillsauth add phrazzld/spellbook depsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze, test, and upgrade dependencies. One curated PR, not 47 version bumps.
Target: $ARGUMENTS
You are the executive orchestrator.
| Mode | Intent | |------|--------| | audit (default) | Full: discover outdated, analyze risk, upgrade, test, PR | | security | Security-only: CVE/advisory-affected deps with reachability analysis | | upgrade [pkg] | Targeted: upgrade a specific package with full analysis | | report | Analysis only, no upgrades — produce the report |
If --ecosystem is specified, limit analysis to that ecosystem.
Otherwise, detect all ecosystems present.
| Mode | Phase 0 | Phase 1 | Phase 2 | Phase 3 | Phase 4 | Phase 5 | |------|---------|---------|---------|---------|---------|--------| | audit | ✓ | ✓ | ✓ | ✓ | ✓ | PR | | security | ✓ | ✓ (security only) | ✓ | ✓ | ✓ | PR | | upgrade [pkg] | ✓ | skip | ✓ | ✓ | ✓ | PR | | report | skip | ✓ | ✓ | skip | skip | Report only |
Detect by lockfile/manifest presence. Multiple ecosystems in a monorepo: analyze each independently, upgrade separately.
| Signal | Ecosystem |
|--------|-----------|
| package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb | npm/Node |
| requirements.txt, Pipfile.lock, poetry.lock, uv.lock | Python |
| Cargo.lock | Rust |
| go.sum | Go |
| Gemfile.lock | Ruby |
| composer.lock | PHP |
No lockfile found → STOP. Tell the user to generate one first. Upgrading without a lockfile is guessing — you can't diff what you can't pin.
Six phases, gated. Each phase must complete before the next begins.
Run the project's full test suite. If tests fail, STOP — report the failures and exit. You cannot attribute regressions to upgrades if the baseline is already red.
Gate: test suite passes.
Run native audit/outdated commands for each detected ecosystem:
| Ecosystem | Outdated command | Audit command |
|-----------|-----------------|---------------|
| npm | npm outdated --json | npm audit --json |
| Python | pip list --outdated --format=json | pip-audit --format=json (or safety check) |
| Rust | cargo outdated --root-deps-only | cargo audit --json |
| Go | go list -m -u all | govulncheck ./... |
Categorize each outdated dependency:
List all known CVEs with severity. Cross-reference with reachability in Phase 2.
Gate: structured list of outdated deps with categorization + CVE list.
For each non-patch update AND all security-flagged dependencies, analyze three concerns. Parallelize across packages, not within a single package.
Changelog: Read changelog/release notes. Summarize breaking changes,
deprecations. Verdict: migration_required: yes | no | unknown.
Reachability: Trace import chains to CVE-affected functions. See
references/reachability-analysis.md. Verdict: reachable | not reachable | unknown.
Behavioral: Compare API surface before/after. Check install scripts,
network calls, permission changes. See references/behavioral-diff.md.
Verdict: risk: critical | high | medium | low.
Gate: all packages have verdicts for all three concerns. Any unknown
reachability on critical/high CVEs → investigate deeper or escalate.
Create branch deps/upgrade-YYYY-MM-DD. Apply upgrades in risk order:
Each commit message references the package, version range, and risk level. If a major bump has no migration guide and significant API changes, escalate to human — don't guess at migration.
Gate: all upgrades committed atomically per group.
After each upgrade group:
dagger.json exists, run dagger call checkDo not proceed past a failing group. Fix or revert, then continue.
Gate: all upgrade groups pass tests (or are reverted with notes).
Produce a single PR with structured body:
## Dependency Upgrades
### Summary
X packages upgraded, Y security fixes, Z blocked (with reasons).
### Security
| CVE | Package | Severity | Reachable? | Action |
|-----|---------|----------|------------|--------|
| CVE-2024-XXXXX | lodash | High | Yes — used in `src/utils.ts:42` | Upgraded 4.17.20 → 4.17.21 |
| CVE-2024-YYYYY | xmldom | Medium | No — only in devDependencies | No action (noted) |
### Upgrades
| Package | From | To | Type | Risk | Changelog |
|---------|------|----|------|------|-----------|
| react | 18.2.0 | 18.3.0 | Minor | Low | Perf improvements, no breaking changes |
| webpack | 5.x | 6.0.0 | Major | High | New config format — see migration guide |
### Reachability Report
[Which CVE-affected functions are actually called in this codebase]
### Behavioral Changes
[Install scripts added/removed, new network calls, permission changes]
### Test Results
[Pass/fail per upgrade group, any reverted packages]
### Risk Assessment
[Overall risk: low/medium/high. Rationale. Residual risks.]
For report mode: produce this output without creating a branch or PR. For security mode: include only the Security and Reachability sections.
npm ls, pip show, cargo tree after
upgrading. The lockfile diff is the truth.development
Lightweight evidence-backed retro and catch-up reports for a current repo, branch, PR, backlog slice, or recent agent session. Use when the user asks for a debrief, catch me up, what changed, why it matters, product implications, end-user implications, developer experience implications, current app state, backlog state, workspace state, alternatives considered, or context rebuild after losing the thread. Trigger: /debrief.
testing
Capture agent-session work records as local JSONL audit evidence. Links a backlog/spec, branch, commits, review verdicts, QA/demo evidence, transcript refs, and shipped ref without storing raw private transcripts. Use when: "trace this work", "write work record", "agent session trace", "journal this delivery", "link transcript evidence". Trigger: /trace, /journal.
data-ai
Turn proven agent-session patterns into first-party Harness Kit skills. Use when: "skillify this conversation", "make this into a skill", "generate a skill from current transcript", "extract reusable workflow". Trigger: /skillify.
testing
Run one targeted, read-only architecture or quality critique through a named lens from the shared rubric. Use when: "critique this module", "run an Ousterhout pass", "lens critique", "architecture critique". Trigger: /critique.