Skip to content
Back to search

sub-agents-skills

Marketplace for the sub-agent runner plugin.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/shinpr--sub-agents-skills/badge.svg)](/listings/shinpr--sub-agents-skills)

HTML

<a href="/listings/shinpr--sub-agents-skills"><img src="/api/listings/shinpr--sub-agents-skills/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

**Requirements:** Python 3.9+ and at least one [supported backend](#supported-backends) installed.

1. Install the Skill

**Codex (plugin):**

codex plugin marketplace add shinpr/sub-agents-skills

Then open the plugin picker, install `Runner`, and restart Codex:

/plugins

After restart, invoke the skill as `$runner:sub-agents`.

**Claude Code (plugin):**

/plugin marketplace add shinpr/sub-agents-skills
/plugin install runner@sub-agents-skills
/reload-plugins

**Grok Build (plugin):**

grok plugin marketplace add shinpr/sub-agents-skills
grok plugin install runner --trust

**Google Antigravity (plugin):**

agy plugin install https://github.com/shinpr/sub-agents-skills/tree/main/plugins/runner

**Other clients (Cursor CLI, VS Code, etc.):**

Use the install script to copy the skill into the client's skill path:

# Cursor
curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target ~/.cursor/skills

# VS Code / Copilot (project-scoped)
curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target .github/skills

# Gemini CLI
curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target ~/.gemini/skills

Or clone manually:

git clone https://github.com/shinpr/sub-agents-skills.git
cd sub-agents-skills
./install.sh --target <client-skill-path>

2. Create Your First Agent

Create a `.agents/` folder in your project and add `code-reviewer.md`:

---
run-agent: codex
permission: read-only
---

# Code Reviewer

Review code for quality and maintainability issues.

## Task
- Find bugs and potential issues
- Suggest improvements
- Check code style consistency

## Done When
- All target files reviewed
- Issues listed with explanations

The `run-agent` frontmatter specifies which backend executes this agent. See [Writing Agents](#writing-agents) for more on agent design.

3. Run It

Ask your parent AI tool:

Use the code-reviewer agent to review the authentication changes.

The parent tool invokes the agent with the selected backend and returns its result.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json · Manifest · 35 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. {
  2. "name": "sub-agents-skills",
  3. "owner": {
  4. "name": "Shinsuke Kagawa",
  5. "url": "https://github.com/shinpr"
  6. },
  7. "description": "Marketplace for the sub-agent runner plugin.",
  8. "plugins": [
  9. {
  10. "name": "runner",
  11. "source": "./",
  12. "description": "Run agent definitions as sub-agents across multiple AI coding CLIs.",
  13. "version": "0.14.1",
  14. "author": {
  15. "name": "Shinsuke Kagawa",
  16. "url": "https://github.com/shinpr"
  17. },
  18. "category": "Developer Tools",
  19. "tags": [
  20. "sub-agents",
  21. "agent-skills",
  22. "orchestration",
  23. "multi-llm",
  24. "glm",
  25. "kimi",
  26. "grok",
  27. "opencode",
  28. "command-code",
  29. "minimax-code",
  30. "mcode",
  31. "pi"
  32. ]
  33. }
  34. ]
  35. }
README.md · README · 573 lines · 7 findings marked

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Sub-Agents Skills
  2. English | [简体中文](README.zh-CN.md) | [Русский](README.ru.md) | [Deutsch](README.de.md) | [Español](README.es.md)
  3. [![Codex CLI](https://img.shields.io/badge/Codex%20CLI-Plugin-10a37f)](https://developers.openai.com/codex/cli)
  4. [![Claude Code](https://img.shields.io/badge/Claude%20Code-Plugin-purple)](https://claude.ai/code)
  5. [![Kimi](https://img.shields.io/badge/Kimi-Backend-000000)](https://www.kimi.com/code/en)
  6. [![Agent Skills](https://img.shields.io/badge/Agent%20Skills-Spec%20Compliant-blue)](https://agentskills.io)
  7. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  8. Run task-specific agents on different AI coding backends from a single parent tool.
  9. Write an agent once in Markdown, then choose the backend that runs it. Send implementation, review, investigation, and verification work to different coding tools without duplicating the agent definition.
  10. The skill itself follows the [Agent Skills](https://agentskills.io) standard; the agents it runs are Markdown files under `.agents/`.
  11. ![AI coding backends selected for design, implementation, and review](docs/assets/header.jpg)
  12. ## Quick Start
  13. **Requirements:** Python 3.9+ and at least one [supported backend](#supported-backends) installed.
  14. ### 1. Install the Skill
  15. **Codex (plugin):**
  16. ```sh
  17. codex plugin marketplace add shinpr/sub-agents-skills
  18. ```
  19. Then open the plugin picker, install `Runner`, and restart Codex:
  20. ```text
  21. /plugins
  22. ```
  23. After restart, invoke the skill as `$runner:sub-agents`.
  24. **Claude Code (plugin):**
  25. ```text
  26. /plugin marketplace add shinpr/sub-agents-skills
  27. /plugin install runner@sub-agents-skills
  28. /reload-plugins
  29. ```
  30. **Grok Build (plugin):**
  31. ```sh
  32. grok plugin marketplace add shinpr/sub-agents-skills
  33. grok plugin install runner --trust
  34. ```
  35. **Google Antigravity (plugin):**
  36. ```sh
  37. agy plugin install https://github.com/shinpr/sub-agents-skills/tree/main/plugins/runner
  38. ```
  39. **Other clients (Cursor CLI, VS Code, etc.):**
  40. Use the install script to copy the skill into the client's skill path:
  41. ```bash
  42. # Cursor
  43. curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target ~/.cursor/skills
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 66 on GitHub
  44. # VS Code / Copilot (project-scoped)
  45. curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target .github/skills
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 69 on GitHub
  46. # Gemini CLI
  47. curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target ~/.gemini/skills
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 72 on GitHub
  48. ```
  49. Or clone manually:
  50. ```bash
  51. git clone https://github.com/shinpr/sub-agents-skills.git
  52. cd sub-agents-skills
  53. ./install.sh --target <client-skill-path>
  54. ```
  55. ### 2. Create Your First Agent
  56. Create a `.agents/` folder in your project and add `code-reviewer.md`:
  57. ```markdown
  58. ---
  59. run-agent: codex
  60. permission: read-only
  61. ---
  62. # Code Reviewer
  63. Review code for quality and maintainability issues.
  64. ## Task
  65. - Find bugs and potential issues
  66. - Suggest improvements
  67. - Check code style consistency
  68. ## Done When
  69. - All target files reviewed
  70. - Issues listed with explanations
  71. ```
  72. The `run-agent` frontmatter specifies which backend executes this agent. See [Writing Agents](#writing-agents) for more on agent design.
  73. ### 3. Run It
  74. Ask your parent AI tool:
  75. ```text
  76. Use the code-reviewer agent to review the authentication changes.
  77. ```
  78. The parent tool invokes the agent with the selected backend and returns its result.
  79. ## Why Use It?
  80. Most AI coding tools provide sub-agents tied to their own models. Claude Code delegates to Claude, and Codex delegates to GPT. Their built-in delegation does not provide a portable way to route a task to another provider's model.
  81. Sub-Agents Skills separates an agent's role from its execution backend. The Markdown file defines what the agent does, while `run-agent` selects where it runs. Changing the backend does not require rewriting the role, task, or output instructions.
  82. Because the runner is packaged as an Agent Skill, the same `.agents/` definitions can be used from different supported parent tools.
  83. ## Usage Examples
  84. To run an agent, describe the task in your prompt:
  85. ```text
  86. Use the code-reviewer agent to check my UserService class.
  87. ```
  88. ```text
  89. Use the test-writer agent to create unit tests for the auth module.
  90. ```
  91. ```text
  92. Use the doc-writer agent to add JSDoc comments to all public methods.
  93. ```
  94. ### Mixing Backends in One Project
  95. Agents using different backends can live side by side:
  96. ```text
  97. .agents/
  98. ├── test-writer.md # run-agent: codex
  99. ├── code-reviewer.md # run-agent: claude
  100. ├── kimi-implementer.md # run-agent: kimi
  101. └── alternate-reviewer.md # run-agent: grok
  102. ```
  103. ```text
  104. Use the code-reviewer and alternate-reviewer agents in parallel, then send the agreed changes to kimi-implementer.
  105. ```
  106. Name both the agent and the task in the request; an agent name alone does not provide a task.
  107. ## Supported Backends
  108. Set `run-agent` in each agent definition. The value selects a backend; some backends share an underlying executable.
  109. | `run-agent` | Backend | Executed CLI |
  110. |-------------|---------|--------------|
  111. | `codex` | Codex | `codex` |
  112. | `claude` | Claude Code | `claude` |
  113. | `cursor-agent` | Cursor CLI | `cursor-agent` |
  114. | `glm` | GLM (Z.ai) | `claude` with the Z.ai endpoint |
  115. | `kimi` | Kimi | `claude` with the Kimi endpoint |
  116. | `grok` | Grok Build | `grok` |
  117. | `antigravity` | Google Antigravity | `agy` |
  118. | `gemini` | Gemini CLI (compatibility) | `gemini` |
  119. | `opencode` | OpenCode | `opencode` |
  120. | `command-code` | Command Code | `command-code` |
  121. | `mcode` | MiniMax Code | `mcode` |
  122. | `pi` | Pi | `pi` |
  123. Install only the CLIs you plan to use. For Google models, prefer Antigravity CLI 1.1.12 or later; existing Gemini CLI configurations remain supported.
  124. ## Writing Agents
  125. Agent definitions are `.md` or `.txt` files under `.agents/`. For normal use, include `run-agent` in the YAML frontmatter and keep the task instructions in the body.
  126. ```markdown
  127. ---
  128. run-agent: claude
  129. model: opus
  130. effort: high
  131. permission: safe-edit
  132. ---
  133. # Agent Name
  134. One-sentence purpose.
  135. ## Task
  136. - Action 1
  137. - Action 2
  138. ## Done When
  139. - Criterion 1
  140. - Criterion 2
  141. ```
  142. <details>
  143. <summary>Frontmatter reference</summary>
  144. ### Frontmatter Options
  145. | Field | Values | Description |
  146. |-------|--------|-------------|
  147. | `run-agent` | `codex`, `claude`, `cursor-agent`, `glm`, `kimi`, `grok`, `antigravity`, `gemini`, `opencode`, `command-code`, `mcode`, `pi` | Which backend executes this agent |
  148. | `model` | Backend-specific model name (optional) | Model passed to the selected CLI; omit to use its configured default |
  149. | `effort` | Backend/model-specific value (optional) | Reasoning-effort override; omit to use the backend/model default |
  150. | `permission` | `read-only`, `safe-edit` (default), `yolo` | Approval/sandbox level the sub-agent runs with |
  151. `run-agent` is required unless `--cli` explicitly overrides it for one run.
  152. `effort` is forwarded unchanged to the selected backend. Accepted values depend
  153. on the backend and model, so check the provider documentation before setting it.
  154. Invalid combinations fail at runtime. Cursor and Gemini do not support this
  155. field.
  156. **Permission levels:**
  157. - `read-only`: investigation/review mode that prevents direct edits where supported; shell behavior depends on the backend and this mode is not a security boundary (codex `-s read-only` / claude `--permission-mode plan` / cursor `--mode plan --sandbox enabled` / grok `--sandbox read-only` / antigravity `--mode plan --sandbox` / gemini `--approval-mode plan` / OpenCode permission rules / Command Code `--permission-mode plan` / MCode `--permission smart`, which still allows direct edits / Pi `--tools read,grep,find,ls` with MCP tools excluded)
  158. - `safe-edit`: default non-interactive edit mode (codex `-s workspace-write` + `approval_policy=never` / claude `--permission-mode acceptEdits` / cursor `--trust --sandbox enabled` / grok `--sandbox workspace` / antigravity `--mode accept-edits --sandbox` / gemini `--approval-mode auto_edit` / OpenCode permission rules / Command Code `--yolo --permission-mode auto-accept` / MCode `--permission smart`, which does not stop the run when it denies a tool call / Pi default tools)
  159. - `yolo`: bypass all approvals and sandboxing; use it only for tasks and environments you trust.
  160. Sub-agents have no stdin, so the runner uses non-interactive backend modes. The
  161. isolation guarantees depend on the selected CLI; permission flags are not
  162. equivalent across backends. For Cursor, the sandbox confines supported shell
  163. commands, while `--mode plan` supplies the read-only constraint.
  164. </details>
  165. <details>
  166. <summary>Agent authoring guidelines</summary>
  167. ### Keep Each Agent Focused
  168. Give each agent one responsibility. Separate review, implementation, and test
  169. generation when they need different instructions or permissions.
  170. ### Keep Agents Self-Contained
  171. Agents run in isolation with fresh context. Avoid:
  172. - References to other agents ("then use X agent...")
  173. - Assumptions about prior context ("continuing from before...")
  174. - Tasks outside the agent's stated responsibility
  175. ### Optional Agent Sections
  176. Add these sections when the agent needs them:
  177. - **Scope boundaries**: Explicitly state what's *out of scope*
  178. - **Prohibited actions**: List common mistakes the agent should avoid
  179. - **Output format**: Define structured output when needed
  180. </details>
  181. <details>
  182. <summary>Complete agent example</summary>
  183. Each `.md` or `.txt` file in your `.agents/` folder becomes an agent. The filename becomes the agent name (e.g., `bug-investigator.md` → "bug-investigator").
  184. **`bug-investigator.md`**
  185. ```markdown
  186. ---
  187. run-agent: codex
  188. permission: read-only
  189. ---
  190. # Bug Investigator
  191. Investigate bug reports and identify root causes.
  192. ## Task
  193. - Collect evidence from error logs, code, and git history
  194. - Generate multiple hypotheses for the cause
  195. - Trace each hypothesis to its root cause
  196. - Report findings with supporting evidence
  197. ## Out of Scope
  198. - Fixing the bug (investigation only)
  199. - Making assumptions without evidence
  200. ## Done When
  201. - At least 2 hypotheses documented with evidence
  202. - Most likely cause identified with confidence level
  203. - Affected code locations listed
  204. ```
  205. For more advanced patterns (completion checklists, prohibited actions, structured output), see [claude-code-workflows/agents](https://github.com/shinpr/claude-code-workflows/tree/main/agents).
  206. </details>
  207. ## Configuration Reference
  208. <details>
  209. <summary>Agent location and backend selection</summary>
  210. ### Agent Definition Location
  211. | Priority | Source | Path |
  212. |----------|--------|------|
  213. | 1 | `--agents-dir` argument | Explicit path |
  214. | 2 | Environment variable | `$SUB_AGENTS_DIR` |
  215. | 3 | Default | `{cwd}/.agents/` |
  216. To customize: `export SUB_AGENTS_DIR=/custom/path`
  217. ### CLI Selection Priority
  218. 1. `--cli` argument (explicit one-run override)
  219. 2. Agent definition `run-agent` frontmatter
  220. 3. Error if neither is specified
  221. `--cli` always overrides the agent definition's `run-agent`; omit it for normal runs.
  222. </details>
  223. <details>
  224. <summary>Direct runner CLI parameters</summary>
  225. ### Script Parameters
  226. | Parameter | Required | Description |
  227. |-----------|----------|-------------|
  228. | `--list` | - | List available agents (no other params needed) |
  229. | `--agent` | Yes* | Agent definition name from --list |
  230. | `--prompt` | Yes* | Task description to delegate |
  231. | `--cwd` | Yes* | Working directory (absolute path) |
  232. | `--timeout` | No | Timeout ms (default: 600000) |
  233. | `--cli` | No | Force CLI: `codex`, `claude`, `cursor-agent`, `glm`, `kimi`, `grok`, `antigravity`, `gemini`, `opencode`, `command-code`, `mcode`, `pi` |
  234. *Required when not using --list
  235. </details>
  236. ## Backend Setup
  237. Most backends use their CLI's existing authentication. The following backends
  238. need additional routing or provider configuration.
  239. <a id="glm-zai"></a>
  240. <details>
  241. <summary>GLM (Z.ai)</summary>
  242. The `glm` backend runs the Claude Code binary against GLM's
  243. Anthropic-compatible endpoint. Install Claude Code, then set your Z.ai token:
  244. ```bash
  245. export GLM_API_KEY=<your-z.ai-token>
  246. ```
  247. The runner sends the key through the child environment and points Claude Code
  248. at `https://api.z.ai/api/anthropic`.
  249. </details>
  250. <a id="kimi"></a>
  251. <details>
  252. <summary>Kimi</summary>
  253. The `kimi` backend runs the Claude Code binary against Kimi's coding endpoint.
  254. Install Claude Code, then set your Kimi API key:
  255. ```bash
  256. export KIMI_API_KEY=<your-kimi-api-key>
  257. ```
  258. The runner sends the key through the child environment and points Claude Code
  259. at `https://api.kimi.com/coding/`.
  260. Provider-specific keys take priority, so multiple backends can remain
  261. configured at the same time:
  262. ```bash
  263. export GLM_API_KEY=<your-z.ai-token>
  264. export KIMI_API_KEY=<your-kimi-api-key>
  265. export CURSOR_API_KEY=<your-cursor-token> # optional when cursor-agent is logged in
  266. ```
  267. </details>
  268. <a id="opencode"></a>
  269. <details>
  270. <summary>OpenCode</summary>
  271. The `opencode` backend uses the model selected in the agent definition. If
  272. `model` is omitted, it uses OpenCode's configured default. Through OpenCode, an
  273. agent can run on supported providers, OpenAI-compatible APIs, gateways, or local
  274. models.
  275. Configure OpenCode in `~/.config/opencode/opencode.json` or the project's
  276. `opencode.json`, then use provider/model syntax when selecting a model:
  277. ```markdown
  278. ---
  279. run-agent: opencode
  280. model: provider/model-id
  281. effort: provider-variant
  282. permission: safe-edit
  283. ---
  284. ```
  285. The runner passes `model` through `--model` and `effort` through OpenCode's
  286. `--variant` option.
  287. </details>
  288. <a id="command-code"></a>
  289. <details>
  290. <summary>Command Code</summary>
  291. Install Command Code and configure a model. Use `command-code login` for
  292. Command Code-hosted models, and `command-code --list-models` to find model IDs.
  293. Set `run-agent: command-code`; `model` and `effort` are optional.
  294. </details>
  295. <a id="mcode"></a>
  296. <details>
  297. <summary>MiniMax Code</summary>
  298. Install MiniMax Code, then sign in with `mcode login` or configure a provider.
  299. Set `run-agent: mcode`; `model` and `effort` are optional.
  300. MCode's headless mode has no setting that blocks direct edits, so `read-only`
  301. and `safe-edit` both run with `--permission smart`, and `yolo` runs with
  302. `--permission full`. When `smart` denies a tool call that needs approval, the
  303. run keeps going and can still end with `success`. In testing, the model
  304. retried a denied write outside the workspace with `cd ..` and a relative path.
  305. </details>
  306. <a id="pi"></a>
  307. <details>
  308. <summary>Pi</summary>
  309. Install Pi and configure a provider and model. Set `run-agent: pi`; `model`
  310. and `effort` are optional. The runner passes `effort` as Pi's `--thinking`
  311. level.
  312. Pi has no permission modes or sandbox. For `read-only`, the runner enables
  313. only the `read`, `grep`, `find`, and `ls` tools, so the agent cannot run shell
  314. commands or MCP tools. `safe-edit` and `yolo` both run with Pi's default
  315. tools, including `bash`, `edit`, and `write`.
  316. </details>
  317. ## Security
  318. Agent definitions are system prompts that control what the sub-agent does. A malicious agent definition could instruct the sub-agent to read sensitive files, execute harmful commands, or exfiltrate data.
  319. Only use agent definitions you've written yourself or from sources you trust. Review any third-party agent definitions before use.
  320. ## How It Works
  321. The parent tool reads the installed `SKILL.md` to learn how to invoke the runner.
  322. The runner then loads the selected `.agents/*.md` definition, calls its configured
  323. backend, and returns that invocation's result to the parent.
  324. ```mermaid
  325. graph LR
  326. A["Your AI tool<br/>(Codex, Claude Code, Cursor...)"] --> B["run_subagent.py"]
  327. B --> C["Codex"]
  328. B --> D["Claude Code"]
  329. B --> E["Cursor CLI"]
  330. B --> H["Grok Build"]
  331. B --> G["GLM"]
  332. B --> K["Kimi"]
  333. B --> F["Google Antigravity<br/>(Gemini models)"]
  334. B -.-> GM["Gemini CLI<br/>(compatibility)"]
  335. B --> MC["MiniMax Code"]
  336. B --> I["OpenCode"]
  337. B --> CC["Command Code"]
  338. B --> PI["Pi"]
  339. I --> J["Selected provider/model<br/>(managed · BYOK · local)"]
  340. CC --> J
  341. PI --> J
  342. style B fill:#f5f5f5,stroke:#333
  343. ```
  344. ```text
  345. skills/sub-agents/
  346. ├── SKILL.md # Instructions for the parent tool
  347. ├── scripts/
  348. │ └── run_subagent.py # Calls external CLIs
  349. └── references/
  350. └── codex.md # Host-specific setup notes
  351. ```
  352. ### Independent Contexts
  353. Each sub-agent invocation starts a fresh conversation. Sub-agents do not inherit
  354. one another's chat history. They do, however, use the same selected working
  355. directory and can see the files it contains.
  356. The parent receives the runner's final result, not the sub-agent's complete
  357. conversation history. Each invocation starts a separate CLI process and has its
  358. own startup cost.
  359. ## Troubleshooting
  360. ### Timeout errors or authentication failures
  361. **Codex / Claude Code:**
  362. Make sure the CLI is installed and accessible in your `PATH`.
  363. **Cursor CLI:**
  364. Run `cursor-agent login` to authenticate, or set `CURSOR_API_KEY`. Sessions can expire, so run the login command again if you see auth errors.
  365. **GLM:**
  366. Set `GLM_API_KEY` to your Z.ai token (see [GLM (Z.ai)](#glm-zai)).
  367. **Kimi:**
  368. Install Claude Code and set `KIMI_API_KEY` to your Kimi API key (see [Kimi](#kimi)).
  369. **Google:**
  370. Run `agy` once to authenticate before using the `antigravity` backend.
  371. If you use the Gemini CLI backend instead, set `GEMINI_API_KEY` in the environment.
  372. **OpenCode:**
  373. Install OpenCode and configure a provider and default model. Run `opencode models`
  374. and a direct `opencode run --format json` smoke test before using the backend.
  375. **Command Code:**
  376. Install Command Code and configure a model. Run `command-code status` to check
  377. authentication before using the backend.
  378. **MiniMax Code:**
  379. Run `mcode login`, or configure a provider for your own API key.
  380. **Pi:**
  381. Run `pi auth check --model <provider/model>` to check the provider's
  382. credentials before using the backend.
  383. ### Agent not found
  384. Check that:
  385. - Your agent file is in the `.agents/` directory (or path specified by `SUB_AGENTS_DIR`)
  386. - The file has `.md` or `.txt` extension
  387. - The filename uses hyphens or underscores (no spaces)
  388. ### CLI not found (exit code 127)
  389. Install the required CLI:
  390. - Codex: `npm install -g @openai/codex`
  391. - Claude Code: `curl -fsSL https://claude.ai/install.sh | bash`
  392. - Cursor CLI: `curl https://cursor.com/install -fsS | bash`
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 555 on GitHub
  393. - Grok Build: `curl -fsSL https://x.ai/cli/install.sh | bash`
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 556 on GitHub
  394. - Google Antigravity: `curl -fsSL https://antigravity.google/cli/install.sh | bash`
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 557 on GitHub
  395. - OpenCode: `brew install anomalyco/tap/opencode`
  396. - Command Code: `npm install -g command-code`
  397. - MiniMax Code: `curl -fsSL https://filecdn.minimax.chat/public/install.sh | bash`
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 560 on GitHub
  398. - Pi: `npm install -g --ignore-scripts @earendil-works/pi-coding-agent`
  399. If you use Gemini CLI, install it with `npm install -g @google/gemini-cli`.
  400. ### Other execution errors
  401. 1. Verify the agent definition has valid `run-agent` frontmatter
  402. 2. Ensure your chosen CLI tool is installed and accessible
  403. 3. Check that `--cwd` is an absolute path to an existing directory
  404. ## License
  405. MIT
install.sh · Bundled script · 125 lines · 1 finding marked
  1. #!/bin/bash
  2. set -e
  3. # sub-agents-skills installer
  4. # Usage: curl -fsSL https://raw.githubusercontent.com/shinpr/sub-agents-skills/main/install.sh | bash -s -- --target <path>
    • Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
    • Line 5 on GitHub
  5. TARGET=""
  6. SKILL_NAME=""
  7. REPO_URL="https://github.com/shinpr/sub-agents-skills"
  8. usage() {
  9. echo "Usage: $0 --target <install-path> [--skill <skill-name>]"
  10. echo ""
  11. echo "Options:"
  12. echo " --target <path> Required. Directory to install skills into."
  13. echo " Examples:"
  14. echo " ~/.claude/skills (Claude Code)"
  15. echo " ~/.cursor/skills (Cursor)"
  16. echo " .github/skills (VS Code/Copilot project)"
  17. echo ""
  18. echo " --skill <name> Optional. Install specific skill only."
  19. echo " Default: install all skills."
  20. echo ""
  21. echo "Examples:"
  22. echo " $0 --target ~/.claude/skills"
  23. echo " $0 --target ~/.cursor/skills --skill sub-agents"
  24. echo ""
  25. echo " # Via curl:"
  26. echo " curl -fsSL $REPO_URL/raw/main/install.sh | bash -s -- --target ~/.claude/skills"
  27. exit 1
  28. }
  29. error() {
  30. echo "Error: $1" >&2
  31. exit 1
  32. }
  33. # Parse arguments
  34. while [[ $# -gt 0 ]]; do
  35. case $1 in
  36. --target)
  37. TARGET="$2"
  38. shift 2
  39. ;;
  40. --skill)
  41. SKILL_NAME="$2"
  42. shift 2
  43. ;;
  44. -h|--help)
  45. usage
  46. ;;
  47. *)
  48. error "Unknown option: $1"
  49. ;;
  50. esac
  51. done
  52. # Validate target
  53. if [[ -z "$TARGET" ]]; then
  54. echo "Error: --target is required." >&2
  55. echo ""
  56. usage
  57. fi
  58. # Expand ~ to home directory
  59. TARGET="${TARGET/#\~/$HOME}"
  60. # Determine source directory
  61. # If running from curl, we need to clone/download first
  62. # If running locally, use the script's directory
  63. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  64. SKILLS_SOURCE="$SCRIPT_DIR/skills"
  65. # Check if running from curl (no local skills directory)
  66. if [[ ! -d "$SKILLS_SOURCE" ]]; then
  67. echo "Downloading skills from repository..."
  68. TEMP_DIR=$(mktemp -d)
  69. trap "rm -rf $TEMP_DIR" EXIT
  70. git clone --depth 1 "$REPO_URL" "$TEMP_DIR" 2>/dev/null || \
  71. error "Failed to clone repository. Please check the URL: $REPO_URL"
  72. SKILLS_SOURCE="$TEMP_DIR/skills"
  73. fi
  74. # Verify skills source exists
  75. if [[ ! -d "$SKILLS_SOURCE" ]]; then
  76. error "Skills directory not found: $SKILLS_SOURCE"
  77. fi
  78. # Create target directory
  79. mkdir -p "$TARGET"
  80. # Install skills
  81. installed=0
  82. if [[ -n "$SKILL_NAME" ]]; then
  83. # Install specific skill
  84. if [[ ! -d "$SKILLS_SOURCE/$SKILL_NAME" ]]; then
  85. error "Skill not found: $SKILL_NAME"
  86. fi
  87. echo "Installing skill: $SKILL_NAME -> $TARGET/$SKILL_NAME"
  88. rm -rf "$TARGET/$SKILL_NAME"
  89. cp -r "$SKILLS_SOURCE/$SKILL_NAME" "$TARGET/"
  90. installed=1
  91. else
  92. # Install all skills
  93. for skill_dir in "$SKILLS_SOURCE"/*/; do
  94. if [[ -d "$skill_dir" ]]; then
  95. skill_name=$(basename "$skill_dir")
  96. echo "Installing skill: $skill_name -> $TARGET/$skill_name"
  97. rm -rf "$TARGET/$skill_name"
  98. cp -r "${skill_dir%/}" "$TARGET/"
  99. ((installed++))
  100. fi
  101. done
  102. fi
  103. if [[ $installed -eq 0 ]]; then
  104. error "No skills found to install"
  105. fi
  106. echo ""
  107. echo "Done! Installed $installed skill(s) to $TARGET"

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.