スキル一覧に戻る
weholt

agent-ops-dependencies

by weholt

0🍴 0📅 2026年1月25日
GitHubで見るManusで実行

SKILL.md


name: agent-ops-dependencies description: "Dependency management, updates, and security advisory handling. Use when adding, updating, or auditing project dependencies." category: utility invokes: [agent-ops-state, agent-ops-validation, agent-ops-interview] invoked_by: [agent-ops-implementation, agent-ops-improvement-discovery] state_files: read: [constitution.md, baseline.md, focus.md] write: [focus.md, issues/*.md]

Dependencies Workflow

Purpose

Safely manage project dependencies including adding new packages, updating existing ones, and handling security advisories.

When to Use

  • Adding a new dependency to the project
  • Updating dependencies (routine or security)
  • Auditing dependencies for vulnerabilities
  • Investigating dependency conflicts
  • Removing unused dependencies

Preconditions

  • .agent/constitution.md exists with package manager info
  • Understand the project's dependency management approach

Dependency Operations

Adding a New Dependency

Procedure:

  1. Justify the addition:

    • What problem does it solve?
    • Is there an existing alternative in the project?
    • What is the package's maintenance status?
    • What is the license? (compatible with project?)
  2. Evaluate the package:

    • Check download stats / popularity
    • Check last update date
    • Check open issues / security history
    • Check transitive dependencies (avoid bloat)
  3. Add with pinned version:

    # npm
    npm install package-name@version --save-exact
    
    # pip
    pip install package-name==version
    
    # cargo
    cargo add package-name@version
    
  4. Update lock file: Ensure lock file is committed

  5. Run validation: Full test suite after adding

  6. Document: Note in CHANGELOG if user-facing

Updating Dependencies

Routine Updates:

  1. Check for available updates
  2. Review changelogs for breaking changes
  3. Update one package at a time (easier to debug)
  4. Run full test suite after each update
  5. Commit with clear message

Security Updates (Priority):

  1. Identify severity (critical/high/medium/low)
  2. For critical/high: update immediately
  3. For medium/low: batch with routine updates
  4. Test thoroughly (security patches can break things)
  5. Document in CHANGELOG

Removing Dependencies

  1. Identify why it's being removed
  2. Find all usages in codebase
  3. Remove usages first
  4. Remove from package manifest
  5. Update lock file
  6. Run full test suite
  7. Document removal reason

Security Audit

Running an Audit

# npm
npm audit

# pip (with safety)
safety check

# cargo
cargo audit

# yarn
yarn audit

Audit Report Format

## Dependency Audit - [date]

### Summary
- Total dependencies: X
- Direct: Y
- Transitive: Z
- Vulnerabilities found: N

### Vulnerabilities

| Package | Severity | CVE | Fix Available | Action |
|---------|----------|-----|---------------|--------|
| pkg-a | CRITICAL | CVE-XXXX | Yes (v2.0.1) | Update |
| pkg-b | HIGH | CVE-YYYY | No | Evaluate alternatives |
| pkg-c | MEDIUM | CVE-ZZZZ | Yes (v1.2.3) | Schedule update |

### Recommendations
1. Immediate: Update pkg-a to v2.0.1
2. Short-term: Replace pkg-b with alternative
3. Routine: Update pkg-c in next batch

Package Manager Reference

Node.js (npm/yarn/pnpm)

Operationnpmyarnpnpm
Addnpm install pkgyarn add pkgpnpm add pkg
Add devnpm install -D pkgyarn add -D pkgpnpm add -D pkg
Removenpm uninstall pkgyarn remove pkgpnpm remove pkg
Updatenpm update pkgyarn upgrade pkgpnpm update pkg
Auditnpm audityarn auditpnpm audit
Lock filepackage-lock.jsonyarn.lockpnpm-lock.yaml

Python (pip/poetry/pipenv)

Operationpippoetrypipenv
Addpip install pkgpoetry add pkgpipenv install pkg
Add devpip install pkg (manual)poetry add -D pkgpipenv install -d pkg
Removepip uninstall pkgpoetry remove pkgpipenv uninstall pkg
Updatepip install -U pkgpoetry update pkgpipenv update pkg
Lock filerequirements.txtpoetry.lockPipfile.lock

Rust (cargo)

OperationCommand
Addcargo add pkg
Add devcargo add --dev pkg
Removecargo remove pkg
Updatecargo update -p pkg
Auditcargo audit
Lock fileCargo.lock

Constraints

Must Check with Constitution

  • Allowed package sources (registries)
  • Version pinning policy
  • Lock file policy (commit or not)
  • Audit requirements
  • License restrictions

Safety Rules

  • ❌ Never add dependencies without justification
  • ❌ Never update major versions without review
  • ❌ Never ignore critical security vulnerabilities
  • ❌ Never remove lock files
  • ✅ Always run tests after dependency changes
  • ✅ Always commit lock file changes
  • ✅ Always document significant dependency changes

Integration with AgentOps

During Planning

If task requires new dependency:

  1. Add dependency evaluation to plan
  2. Note license and security considerations
  3. Plan for testing after addition

During Implementation

When adding dependency:

  1. Follow the addition procedure above
  2. Update focus.md with dependency added
  3. Note in task's files_actually_changed

During Review

Check for:

  • Unnecessary new dependencies
  • Outdated dependencies with known vulnerabilities
  • Unused dependencies that can be removed

Output

Update .agent/focus.md:

## Just did
- Added dependency: package-name@1.2.3
  - Reason: needed for feature X
  - License: MIT (compatible)
  - Tests: PASS

Create task for security issues:

## T-XXXX — Update vulnerable dependency
- Type: security
- Priority: P0
- Description: pkg-a has CRITICAL vulnerability CVE-XXXX
- Action: Update to v2.0.1

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です