Skip to content
Back to skills

Actions

ASecurity

从 skills.sh 安装选定的 skill。

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 27, 2026
developmentjavascriptjavabash

Security analysis

A100/100

Pro scans all 7 files and shows the line behind each finding

Scanned September 27, 2026

npx -y skills add David-Li0406/meta-skill-evloving --skill actions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Actions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Actions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/david-li0406-actions-03403834/badge)](https://www.skillsdirectory.com/skills/david-li0406-actions-03403834)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Action: install-skill

从 skills.sh 安装选定的 skill。

## 输入

- `state.selected_skill`: 用户选择的skill信息
- `state.search_results`: 搜索结果(包含安装信息)

## 处理逻辑

```javascript
const skillToInstall = state.search_results.find(
  r => r.name === state.selected_skill
);

if (!skillToInstall) {
  throw new Error("无法找到安装信息");
}

// 1. 获取安装方式
const installMethod = await AskUserQuestion({
  question: `如何安装 ${skillToInstall.name}?`,
  header: "安装方式",
  options: [
    {
      label: "自动安装 (推荐)",
      description: `执行: npx @claudecode/skills install ${skillToInstall.name}`
    },
    {
      label: "手动安装",
      description: "提供安装命令,由你手动执行"
    },
    {
      label: "取消",
      description: "放弃安装"
    }
  ]
});

// 2. 执行安装
state.execution_status = "installing";

if (installMethod === "自动安装") {
  await Bash({
    command: `npx @claudecode/skills install ${skillToInstall.name}`,
    description: `安装 skill: ${skillToInstall.name}`
  });
  state.installation_status = "completed";
} else if (installMethod === "手动安装") {
  console.log(`请手动执行: npx @claudecode/skills install ${skillToInstall.name}`);
  await AskUserQuestion({
    question: "安装完成后点击继续",
    header: "等待安装",
    options: [{ label: "已完成", description: "继续执行" }]
  });
  state.installation_status = "completed";
}
```

## 安装验证

```javascript
// 验证安装成功
function verifySkillInstalled(skillName) {
  const skillPath = `~/.claude/skills/${skillName}`;
  return fs.existsSync(skillPath);
}
```

## 输出

- `state.installation_status = "completed"`
- `state.execution_status = "installing"`

## 下一步

→ [execute-skill](05-execute-skill.md)

Files in this skill

  • 01-analyze-request.md1.1 KB
  • 02-match-local-skills.md1.5 KB
  • 03-search-skills.sh.md1.5 KB
  • 04-present-options.md2.7 KB
  • 05-execute-skill.md1.5 KB
  • 06-install-skill.md1.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…