360 Secure SkillHub
360 安全技能中心

secure-skill

提供 scan_skills.py 与 install_skills.py 两个 Python 脚本:前者扫描目标目录下的技能子目录,检查代码执行风险、提示注入模式和供应链问题,输出 markdown 表格报告,支持严格模式与 JSON 输出;后者依据本地 registry.json 把技能安装到项目的 .claude/skills/ 目录。扫描仅读取本地文件、不联网,安装时会跳过已存在的目标目…

garsonjw
garsonjw
热度 7.65
最近更新 2026-07-14 16:02:28
分类:安全依赖:代码执行 / 读写文件应用场景:报告撰写 / 自动化脚本 / 代码审查 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add secure-skill
Metadata
name
secure-skill
description
Scan skills in a project directory for security issues and generate a markdown table report, then install skills from a local registry. Combines static analysis of code and markdown files with supply chain checks. Use when auditing a skills directory, generating a security summary table, or installing skills from a local registry.
license
MIT + Commons Clause
metadata
{"version":"1.0.0","category":"engineering","domain":"ai-security","tier":"POWERFUL","updated":"2026-03-24T00:00:00.000Z","frameworks":"static-analysis, skill-management"}

Secure Skill

Tier: POWERFUL Category: Engineering / Security

Overview

Scans all skills found under a target directory for security issues — covering code execution risks, prompt injection patterns, and supply chain vulnerabilities — and produces a structured markdown table report summarising the verdict for each skill. Also installs skills from a local registry into a project's .claude/skills/ directory.

Scripts

  • scripts/scan_skills.py — scans all skill subdirectories and writes a markdown report
  • scripts/install_skills.py — installs skills from a local registry.json into a project

Usage: Scan Skills

python scripts/scan_skills.py <skills_dir> [--output report.md] [--strict] [--json]

Examples:

# Scan all skills in a directory and write report to scan_report.md
python scripts/scan_skills.py .claude/skills

# Scan with strict mode (HIGH findings count as FAIL) and save to custom path
python scripts/scan_skills.py .claude/skills --output security_report.md --strict

# Output raw JSON results
python scripts/scan_skills.py .claude/skills --json

Usage: Install Skills

Open scripts/install_skills.py and edit the DEFAULT_SKILLS list near the top:

DEFAULT_SKILLS = [
    "skill-name-1",
    "skill-name-2",
]

Then run:

python scripts/install_skills.py <project_root>

To install specific skills without editing the file:

python scripts/install_skills.py <project_root> skill-a skill-b skill-c

Report Format

The scan report is a markdown table with one row per skill:

| Skill | Code | Prompt | Supply Chain | Overall | Critical | High | Info |
|-------|------|--------|--------------|---------|----------|------|------|
| my-skill | PASS | PASS | PASS | PASS | 0 | 0 | 2 |
| bad-skill | FAIL | WARN | PASS | FAIL | 1 | 1 | 0 |

Overall verdict is the worst of the three individual verdicts. Exit code is 1 if any skill has a FAIL verdict, 0 otherwise.

Prerequisites

For scanning: The target directory should contain skill subdirectories, each with a SKILL.md file.

For installation: A registry.json file must exist in the skill root directory (same folder as this SKILL.md). Each entry needs "name" and "path" fields:

[
  { "name": "my-skill", "path": "my-skill" },
  { "name": "another-skill", "path": "another-skill" }
]

Behavior Notes

  • Scanning reads files only; no files are modified or deleted during a scan
  • All file access stays within the target directory tree
  • No network connections are made at any point
  • Installation stops with an error if a destination skill directory already exists
  • All skills in a batch install are attempted; the final exit code reflects any failure
  • The scanner skips fenced code blocks in markdown files to reduce false positives