返回顶部
d

dependency-guard

Use when a task adds, upgrades, removes, or reviews software dependencies and the agent should apply a Socket-based supply-chain guardrail before changing manifests or lockfiles. Prefer MCP `depscore` when available, otherwise use the bundled Socket CLI helper. Stop and recommend an alternative or human review when risk signals are weak.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.1
安全检测
已通过
74
下载量
0
收藏
概述
安装方式
版本历史

dependency-guard

# Dependency Guard Use this skill when dependency changes are in scope for `npm`, `pnpm`, `yarn`, Python packages, or other package ecosystems supported by Socket. ## Prerequisites - The `socket` CLI must be installed and on `PATH` (`npm install -g socket`). - Authentication is required for CLI-based reviews. See the Authentication section below. ## Workflow 1. Confirm the exact dependency change being proposed. 2. Check whether the feature can be implemented with the standard library or an existing project dependency. 3. Prefer MCP `depscore` if the host agent exposes it. 4. Otherwise run `scripts/check_dependency.sh <ecosystem> <package> [version]`. 5. Apply the policy in `references/policy.md`. 6. Apply the decision rules in `references/decision-matrix.md`. 7. Before making the change, report: - why the package is needed - whether an existing alternative exists - what Socket reported - whether install scripts, risky capabilities, or transitive risk are present 8. If the decision is `allow_with_warning`, present the warning clearly before making the change. If the decision is `block_pending_human_review` or `block`, stop and propose either: - a safer dependency - a no-dependency implementation - explicit human review ## Authentication Three authentication paths are supported, in order of preference: 1. **MCP `depscore`** — no local credentials needed; works through the host agent's MCP connection. 2. **`socket login`** — interactive CLI login; stores auth locally. - If your CLI supports it, pressing Enter at the token prompt uses limited public access. - To use a private token, paste it at the prompt instead. 3. **`SOCKET_SECURITY_API_TOKEN` env var** — set this for CI or headless environments. > **Security:** Never paste private tokens into agent prompts. Use the env var or `socket login` instead. > **CI note:** GitHub Actions workflows use `SOCKET_SECURITY_API_KEY` (a separate GitHub-integration key), not `SOCKET_SECURITY_API_TOKEN`. See `examples/github/dependency-guard.yml`. ## Reporting Contract Use the short response template in `references/examples.md` when presenting the package review to the user. ## References - Read `references/policy.md` for the canonical guardrail. - Read `references/decision-matrix.md` for allow/block criteria. - Read `references/examples.md` for user-facing review examples. ## Notes - Keep `SKILL.md` lean; do not duplicate the full policy here. - OpenClaw and ClawHub expect `metadata` to be a single-line JSON object in frontmatter, so keep the OpenClaw metadata compact. - The `version` field in frontmatter is the single source of truth; use `publish_clawhub.sh --bump patch|minor|major` to auto-increment. - Do not assume system-wide wrapper enforcement or shell-completion setup is desirable; keep CLI setup minimal. - If Socket tooling is unavailable, require human review before adding the dependency. - Review manifest and lockfile changes together.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dependency-guard-1775884803 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 dependency-guard-1775884803 技能

通过命令行安装

skillhub install dependency-guard-1775884803

下载 Zip 包

⬇ 下载 dependency-guard v1.0.1

文件大小: 8.36 KB | 发布时间: 2026-4-12 09:43

v1.0.1 最新 2026-4-12 09:43
- Added version field and prerequisites to SKILL.md; updated metadata to declare required `socket` CLI.
- Expanded authentication instructions, including explicit support for `SOCKET_SECURITY_API_TOKEN` and GitHub Actions integration.
- Removed 12 files: docs, agent configs, helper scripts, and all test scripts.
- Simplified repository to essential docs and example workflow.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部