技能安装
- 作者仓库星标 2,670
- 作者仓库 myclaude
- 领域
- 安全
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @stellarlinkco · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 读取环境变量
- 网络行为
- 允许外网请求
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
接受用户的 GitHub 存储库 URL。 URL 应指向包含 `skills/` 目录的存储库。支持的 URL 格式: `https://github.com/user/repo` `https://github.com/user/repo/tree/main/skills` `https://github.com/user/repo/tree/branch-name/skills`
使用 WebFetch 工具从 GitHub 检索技能目录列表。 GitHub API 端点模式:解析响应以提取:技能目录名称 每个技能都应该是包含 SKILL.md 文件的子目录
使用 AskUserQuestion 工具让用户选择要安装的技能。设置`multiSelect: true`以允许多项选择。展示每项技能: 技能名称(目录名称) 简要说明(如果可从 SKILL.md frontmatter 获得)
对于每个选定的技能,获取技能目录中的所有文件: 获取技能目录的文件树 下载所有文件(SKILL.md、scripts/、references/、assets/) 存储完整的技能内容以进行安全分析 将 WebFetch 与 GitHub API 结合使用:
重要:安装之前,请对每项技能进行彻底的安全分析。阅读`references/security_scan_prompt.md`中的安全扫描提示模板,并应用它来分析技能内容。检查:恶意命令执行 - eval、exec、shell=True 的子进程 后门检测 - 混淆代码、可疑网络请求
根据安全扫描结果: 如果安全 (APPROVE):直接继续安装 如果警告 (APPROVE_WITH_WARNINGS):向用户显示安全警告
对于批准的技能,安装到`~/.claude/skills/`: 创建技能目录:`~/.claude/skills/{skill_name}/` 编写维护目录结构的所有技能文件 确保适当的文件权限(脚本可执行) 验证 SKILL.md 是否存在并具有有效的 frontmatter
安装后,提供摘要: 成功安装的技能列表 跳过的技能列表(如果有)及其原因 位置:`~/.claude/skills/` 后续步骤:“技能现在可用。重新启动克劳德或直接使用它们。”
# Skill Install
## Overview
Install Claude skills from GitHub repositories with built-in security scanning to protect against malicious code, backdoors, and vulnerabilities.
## When to Use
Trigger this skill when the user:
- Provides a GitHub repository URL and wants to install skills
- Asks to "install skills from GitHub"
- Wants to browse and select skills from a repository
- Needs to add new skills to their Claude environment
## Workflow
### Step 1: Parse GitHub URL
Accept a GitHub repository URL from the user. The URL should point to a repository containing a `skills/` directory.
Supported URL formats:
- `https://github.com/user/repo`
- `https://github.com/user/repo/tree/main/skills`
- `https://github.com/user/repo/tree/branch-name/skills`
Extract:
- Repository owner
- Repository name
- Branch (default to `main` if not specified)
### Step 2: Fetch Skills List
Use the WebFetch tool to retrieve the skills directory listing from GitHub.
GitHub API endpoint pattern:
```
https://api.github.com/repos/{owner}/{repo}/contents/skills?ref={branch}
```
Parse the response to extract:
- Skill directory names
- Each skill should be a subdirectory containing a SKILL.md file
### Step 3: Present Skills to User
Use the AskUserQuestion tool to let the user select which skills to install.
Set `multiSelect: true` to allow multiple selections.
Present each skill with:
- Skill name (directory name)
- Brief description (if available from SKILL.md frontmatter)
### Step 4: Fetch Skill Content
For each selected skill, fetch all files in the skill directory:
1. Get the file tree for the skill directory
2. Download all files (SKILL.md, scripts/, references/, assets/)
3. Store the complete skill content for security analysis
Use WebFetch with GitHub API:
```
https://api.github.com/repos/{owner}/{repo}/contents/skills/{skill_name}?ref={branch}
```
For each file, fetch the raw content:
```
https://raw.githubusercontent.com/{owner}/{repo}/{branch}/skills/{skill_name}/{file_path}
```
### Step 5: Security Scan
**CRITICAL:** Before installation, perform a thorough security analysis of each skill.
Read the security scan prompt template from `references/security_scan_prompt.md` and apply it to analyze the skill content.
Examine for:
1. **Malicious Command Execution** - eval, exec, subprocess with shell=True
2. **Backdoor Detection** - obfuscated code, suspicious network requests
3. **Credential Theft** - accessing ~/.ssh, ~/.aws, environment variables
4. **Unauthorized Network Access** - external requests to suspicious domains
5. **File System Abuse** - destructive operations, unauthorized writes
6. **Privilege Escalation** - sudo attempts, system modifications
7. **Supply Chain Attacks** - suspicious package installations
Output the security analysis with:
- Security Status: SAFE / WARNING / DANGEROUS
- Risk Level: LOW / MEDIUM / HIGH / CRITICAL
- Detailed findings with file locations and severity
- Recommendation: APPROVE / APPROVE_WITH_WARNINGS / REJECT
### Step 6: User Decision
Based on the security scan results:
**If SAFE (APPROVE):**
- Proceed directly to installation
**If WARNING (APPROVE_WITH_WARNINGS):**
- Display the security warnings to the user
- Use AskUserQuestion to confirm: "Security warnings detected. Do you want to proceed with installation?"
- Options: "Yes, install anyway" / "No, skip this skill"
**If DANGEROUS (REJECT):**
- Display the critical security issues
- Refuse to install
- Explain why the skill is dangerous
- Do NOT provide an option to override for CRITICAL severity issues
### Step 7: Install Skills
For approved skills, install to `~/.claude/skills/`:
1. Create the skill directory: `~/.claude/skills/{skill_name}/`
2. Write all skill files maintaining the directory structure
3. Ensure proper file permissions (executable for scripts)
4. Verify SKILL.md exists and has valid frontmatter
Use the Write tool to create files.
### Step 8: Confirmation
After installation, provide a summary:
- List of successfully installed skills
- List of skipped skills (if any) with reasons
- Location: `~/.claude/skills/`
- Next steps: "The skills are now available. Restart Claude or use them directly."
## Example Usage
**User:** "Install skills from https://github.com/example/claude-skills"
**Assistant:**
1. Fetches skills list from the repository
2. Presents available skills: "skill-a", "skill-b", "skill-c"
3. User selects "skill-a" and "skill-b"
4. Performs security scan on each skill
5. skill-a: SAFE - proceeds to install
6. skill-b: WARNING (makes HTTP request) - asks user for confirmation
7. Installs approved skills to ~/.claude/skills/
8. Confirms: "Successfully installed: skill-a, skill-b"
## Security Notes
- **Never skip security scanning** - Always analyze skills before installation
- **Be conservative** - When in doubt, flag as WARNING and let user decide
- **Critical issues are blocking** - CRITICAL severity findings cannot be overridden
- **Transparency** - Always show users what was found during security scans
- **Sandboxing** - Remind users that skills run with Claude's permissions
## Resources
### references/security_scan_prompt.md
Contains the detailed security analysis prompt template with:
- Complete list of security categories to check
- Output format requirements
- Example analyses for safe, suspicious, and dangerous skills
- Decision criteria for APPROVE/REJECT recommendations
Load this file when performing security scans to ensure comprehensive analysis.
按说明文件中的顺序排列。
概述
何时使用
第1步:解析GitHub URL
第2步:获取技能列表
第 3 步:向用户展示技能
文件/命令 -> skills/ · https://github.com/user/repo · https://github.com/user/repo/tree/main/skills · https://github.com/user/repo/tree/branch-name/skills · main · multiSelect: true · references/security_scan_prompt.md · ~/.claude/skills/
内容校验值 -> 19ddf1d1213f
当前原文的自动摘译,尚未人工审校。
概述
从 GitHub 存储库安装 Claude 技能,并使用内置安全扫描来防范恶意代码、后门和漏洞。
何时使用
当用户满足以下条件时触发此技能: 提供 GitHub 存储库 URL 并想要安装技能 要求“从 GitHub 安装技能” 想要从存储库浏览并选择技能 需要向其 Claude 环境添加新技能