TopRank Skills

Home / Claw Skills / Analyse des données / dependency-audit
Official OpenClaw rules 54%

dependency-audit

Smart dependency health check — security audit, outdated detection, unused deps, and prioritized update plan

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 dependency-audit 技能。 若已安装,则直接安装 dependency-audit 技能。

Overview

Skill Key
fratua/dependency-audit
Author
Sovereign Skills
Source Repo
openclaw/skills
Version
1.0.0
Source Path
skills/fratua/dependency-audit
Latest Commit SHA
5447ab45018bea8661b255bd51b1d698631fbdb8

Extracted Content

SKILL.md excerpt

# dependency-audit — Smart Dependency Health Check

Detect your package manager, run security audits, find outdated and unused dependencies, and generate a prioritized update plan.

## Steps

### 1. Detect Package Manager

Check for these files in the project root:

| File | Ecosystem | Audit Command |
|------|-----------|--------------|
| `package.json` | Node.js (npm/yarn/pnpm) | `npm audit` |
| `requirements.txt` / `pyproject.toml` / `Pipfile` | Python | `pip audit` |
| `Cargo.toml` | Rust | `cargo audit` |
| `go.mod` | Go | `govulncheck ./...` |
| `Gemfile` | Ruby | `bundle audit check` |

If multiple are found, audit all of them. If none found, stop and inform the user.

### 2. Run Security Audit

**Node.js:**
```bash
npm audit --json 2>/dev/null
# Parse: advisories, severity (critical/high/moderate/low), affected package, fix available
```

**Python:**
```bash
pip audit --format=json 2>/dev/null || pip audit 2>/dev/null
# If pip-audit not installed: pip install pip-audit
```

**Rust:**
```bash
cargo audit --json 2>/dev/null
# If not installed: cargo install cargo-audit
```

### 3. Check for Outdated Packages

**Node.js:**
```bash
npm outdated --json 2>/dev/null
# Shows: current, wanted (semver-compatible), latest
```

**Python:**
```bash
pip list --outdated --format=json 2>/dev/null
```

**Rust:**
```bash
cargo outdated -R 2>/dev/null
# If not installed: cargo install cargo-outdated
```

### 4. Identify Unused Dependencies

**Node.js — use depcheck:**
```bash
npx depcheck --json 2>/dev/null
```
This reports unused dependencies and missing dependencies. If `npx` fails, scan source files manually:
```bash
# List all deps from package.json, then grep for imports
# Flag any dep not found in any .js/.ts/.jsx/.tsx file
```

**Python:** Scan imports vs installed packages:
```bash
# Extract imports from .py files
grep -rh "^import \|^from " --include="*.py" . | sort -u
# Compare against requirements.txt entries
```

### 5. Generate Prioritized Update Plan

Organize fi...

Related Claw Skills