sdlc-subagents 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,124 @@
1
+ # sdlc-subagents
2
+
3
+ Configure [OpenCode](https://opencode.ai) as an orchestrator of multiple coding agent CLIs.
4
+
5
+ Run one command and your OpenCode agent learns how to delegate tasks to the right sub-agent CLI based on the task type.
6
+
7
+ ## Supported Sub-Agents
8
+
9
+ | Agent | Command | Best For |
10
+ |-------|---------|----------|
11
+ | [Gemini CLI](https://github.com/google-gemini/gemini-cli) | `gemini` | Context engineering, large codebase analysis, research |
12
+ | [GitHub Copilot CLI](https://githubnext.com/projects/copilot-cli) | `copilot` | PR creation, issue management, GitHub workflows |
13
+ | [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview) | `claude` | Complex refactoring, architecture changes, debugging |
14
+ | [Aider](https://aider.chat) | `aider` | Pair programming, auto-commits, any LLM provider |
15
+ | [Kimi CLI](https://github.com/MoonshotAI/kimi-cli) | `kimi` | Front-end development, UI components, long-context |
16
+ | [Cursor CLI](https://cursor.sh) | `agent` | IDE-grade coding, cloud handoff, rapid prototyping |
17
+
18
+ ## Quick Start
19
+
20
+ ```bash
21
+ npx sdlc-subagents
22
+ ```
23
+
24
+ That's it. The tool will:
25
+
26
+ 1. **Detect** which coding agent CLIs are installed on your system
27
+ 2. **Generate** OpenCode skill files (`.agents/skills/*/SKILL.md`) for each agent
28
+ 3. **Configure** `opencode.json` with permissions and `/delegate` commands
29
+
30
+ ## What Gets Created
31
+
32
+ ```
33
+ your-project/
34
+ .agents/
35
+ skills/
36
+ sdlc-orchestrator/SKILL.md # Master routing skill
37
+ gemini-cli/SKILL.md # Gemini CLI delegation
38
+ copilot-cli/SKILL.md # GitHub Copilot delegation
39
+ claude-code/SKILL.md # Claude Code delegation
40
+ aider/SKILL.md # Aider delegation
41
+ kimi-cli/SKILL.md # Kimi CLI delegation
42
+ cursor-cli/SKILL.md # Cursor CLI delegation
43
+ opencode.json # Permissions + custom commands
44
+ ```
45
+
46
+ ## Usage in OpenCode
47
+
48
+ After running `npx sdlc-subagents`, open your project with OpenCode. The agent will automatically discover the skills.
49
+
50
+ ### Auto-routing
51
+
52
+ Ask OpenCode to delegate and it will pick the best agent:
53
+
54
+ ```
55
+ /delegate Analyze the entire codebase and generate API documentation
56
+ ```
57
+
58
+ OpenCode routes this to Gemini CLI (large context + research).
59
+
60
+ ### Force a specific agent
61
+
62
+ ```
63
+ /delegate-claude-code Refactor the auth module to use strategy pattern
64
+ /delegate-copilot-cli Create a PR for the current branch changes
65
+ /delegate-aider Add input validation to all API endpoints
66
+ /delegate-kimi-cli Build a responsive dashboard with Tailwind
67
+ ```
68
+
69
+ ### Natural language
70
+
71
+ You don't even need the commands. Just describe your task and OpenCode will load the orchestrator skill and route to the right agent:
72
+
73
+ ```
74
+ > Use Gemini to research how the payment system works across all microservices
75
+ > Have Claude refactor the database layer to use Prisma
76
+ > Ask Aider to add tests for the auth module, commit each test separately
77
+ ```
78
+
79
+ ## How It Works
80
+
81
+ The tool generates [OpenCode Agent Skills](https://opencode.ai/docs/skills/) - markdown files that teach OpenCode when and how to delegate to each sub-agent CLI.
82
+
83
+ Each skill contains:
84
+ - **When to delegate**: Task types the agent excels at
85
+ - **How to invoke**: Exact CLI commands for non-interactive use
86
+ - **Delegation patterns**: Copy-paste bash patterns for capturing output
87
+ - **Important notes**: Auth requirements, flags, gotchas
88
+
89
+ The master `sdlc-orchestrator` skill provides a routing table that maps task types to the recommended agent.
90
+
91
+ ## Re-running
92
+
93
+ Running `npx sdlc-subagents` again is safe. It will:
94
+ - Update skill files with latest templates
95
+ - Merge new config into existing `opencode.json` (preserves your customizations)
96
+ - Re-detect installed CLIs
97
+
98
+ ## Installing the Sub-Agent CLIs
99
+
100
+ The tool works even if not all CLIs are installed - it scaffolds skills for all agents so you can install them later. Install commands:
101
+
102
+ ```bash
103
+ # Gemini CLI
104
+ npm install -g @google/gemini-cli
105
+
106
+ # GitHub Copilot CLI
107
+ npm install -g @github/copilot
108
+
109
+ # Claude Code
110
+ npm install -g @anthropic-ai/claude-code
111
+
112
+ # Aider
113
+ pipx install aider-chat
114
+
115
+ # Kimi CLI
116
+ uv tool install --python 3.13 kimi-cli
117
+
118
+ # Cursor CLI
119
+ curl https://cursor.sh/cli -fsS | bash
120
+ ```
121
+
122
+ ## License
123
+
124
+ MIT
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node
package/dist/index.js ADDED
@@ -0,0 +1,274 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/index.ts
4
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
5
+ import { dirname, join, resolve } from "path";
6
+ import { execSync } from "child_process";
7
+ import { fileURLToPath } from "url";
8
+
9
+ // src/agents.ts
10
+ var AGENTS = [
11
+ {
12
+ id: "gemini-cli",
13
+ name: "Gemini CLI",
14
+ command: "gemini",
15
+ installCommand: "npm install -g @google/gemini-cli",
16
+ description: "Google's Gemini coding agent with 1M token context window, built-in Google Search grounding, and generous free tier",
17
+ bestFor: "Context engineering, large codebase analysis, research-heavy tasks, documentation generation",
18
+ nonInteractiveFlag: '-p "PROMPT"',
19
+ detectCommand: "gemini",
20
+ env: ["GOOGLE_API_KEY"]
21
+ },
22
+ {
23
+ id: "copilot-cli",
24
+ name: "GitHub Copilot CLI",
25
+ command: "copilot",
26
+ installCommand: "npm install -g @github/copilot",
27
+ description: "GitHub's agentic coding CLI deeply integrated with GitHub workflows - PRs, issues, code review",
28
+ bestFor: "GitHub workflow automation, PR creation and review, issue management, repository operations",
29
+ nonInteractiveFlag: '--prompt "PROMPT"',
30
+ detectCommand: "copilot"
31
+ },
32
+ {
33
+ id: "claude-code",
34
+ name: "Claude Code",
35
+ command: "claude",
36
+ installCommand: "npm install -g @anthropic-ai/claude-code",
37
+ description: "Anthropic's terminal coding agent with deep agentic capabilities, multi-file editing, and sub-agent support",
38
+ bestFor: "Complex refactoring, architecture-level changes, multi-file edits, code review, debugging",
39
+ nonInteractiveFlag: '-p "PROMPT"',
40
+ detectCommand: "claude",
41
+ env: ["ANTHROPIC_API_KEY"]
42
+ },
43
+ {
44
+ id: "aider",
45
+ name: "Aider",
46
+ command: "aider",
47
+ installCommand: "pipx install aider-chat",
48
+ description: "Model-agnostic AI pair programming tool that works with any LLM and auto-commits changes to git",
49
+ bestFor: "Pair programming, incremental changes with auto-commits, working with any LLM provider, architect mode for complex changes",
50
+ nonInteractiveFlag: '--message "PROMPT" --yes',
51
+ detectCommand: "aider",
52
+ env: ["OPENAI_API_KEY", "ANTHROPIC_API_KEY"]
53
+ },
54
+ {
55
+ id: "kimi-cli",
56
+ name: "Kimi CLI",
57
+ command: "kimi",
58
+ installCommand: "uv tool install --python 3.13 kimi-cli",
59
+ description: "Moonshot AI's terminal coding agent with long-context support via Kimi K2 model and MCP integration",
60
+ bestFor: "Front-end development, full-stack tasks, long-context code understanding",
61
+ nonInteractiveFlag: "stdin pipe",
62
+ detectCommand: "kimi",
63
+ env: ["KIMI_API_KEY"]
64
+ },
65
+ {
66
+ id: "cursor-cli",
67
+ name: "Cursor CLI",
68
+ command: "agent",
69
+ installCommand: "curl https://cursor.sh/cli -fsS | bash",
70
+ description: "Cursor's terminal agent with full IDE-grade capabilities, cloud handoff, and multi-model support",
71
+ bestFor: "IDE-grade coding in terminal, cloud agent delegation, rapid prototyping",
72
+ nonInteractiveFlag: '-p "PROMPT"',
73
+ detectCommand: "agent"
74
+ }
75
+ ];
76
+
77
+ // src/index.ts
78
+ var bold = (s) => `\x1B[1m${s}\x1B[0m`;
79
+ var green = (s) => `\x1B[32m${s}\x1B[0m`;
80
+ var yellow = (s) => `\x1B[33m${s}\x1B[0m`;
81
+ var red = (s) => `\x1B[31m${s}\x1B[0m`;
82
+ var dim = (s) => `\x1B[2m${s}\x1B[0m`;
83
+ var cyan = (s) => `\x1B[36m${s}\x1B[0m`;
84
+ var __filename = fileURLToPath(import.meta.url);
85
+ var __dirname = dirname(__filename);
86
+ var TEMPLATES_DIR = resolve(__dirname, "..", "templates");
87
+ function isCommandAvailable(command) {
88
+ try {
89
+ const cmd = process.platform === "win32" ? `where ${command}` : `which ${command}`;
90
+ execSync(cmd, { stdio: "ignore" });
91
+ return true;
92
+ } catch {
93
+ return false;
94
+ }
95
+ }
96
+ function detectInstalledAgents() {
97
+ const results = /* @__PURE__ */ new Map();
98
+ for (const agent of AGENTS) {
99
+ results.set(agent.id, isCommandAvailable(agent.detectCommand));
100
+ }
101
+ return results;
102
+ }
103
+ function readTemplate(relativePath) {
104
+ const fullPath = join(TEMPLATES_DIR, relativePath);
105
+ return readFileSync(fullPath, "utf-8");
106
+ }
107
+ function writeFile(targetDir, relativePath, content) {
108
+ const fullPath = join(targetDir, relativePath);
109
+ const dir = dirname(fullPath);
110
+ if (!existsSync(dir)) {
111
+ mkdirSync(dir, { recursive: true });
112
+ }
113
+ const existed = existsSync(fullPath);
114
+ writeFileSync(fullPath, content, "utf-8");
115
+ return existed ? "updated" : "created";
116
+ }
117
+ function generateOpencodeJson(targetDir, installedMap) {
118
+ const existingPath = join(targetDir, "opencode.json");
119
+ let existing = {};
120
+ if (existsSync(existingPath)) {
121
+ try {
122
+ existing = JSON.parse(readFileSync(existingPath, "utf-8"));
123
+ } catch {
124
+ }
125
+ }
126
+ const skillPerms = {
127
+ "sdlc-orchestrator": "allow"
128
+ };
129
+ for (const agent of AGENTS) {
130
+ skillPerms[agent.id] = "allow";
131
+ }
132
+ const commands = {};
133
+ for (const agent of AGENTS) {
134
+ const installed = installedMap.get(agent.id);
135
+ commands[`delegate-${agent.id}`] = {
136
+ template: `Load the "${agent.id}" skill and delegate the following task to ${agent.name}: $ARGUMENTS`,
137
+ description: `Delegate a task to ${agent.name}${installed ? "" : " (not installed)"}`
138
+ };
139
+ }
140
+ const config = {
141
+ $schema: "https://opencode.ai/config.json",
142
+ ...existing,
143
+ permission: {
144
+ ...existing.permission,
145
+ skill: {
146
+ ...existing.permission?.skill ?? {},
147
+ ...skillPerms
148
+ }
149
+ },
150
+ command: {
151
+ ...existing.command,
152
+ ...commands,
153
+ "delegate": {
154
+ template: 'Load the "sdlc-orchestrator" skill. Based on the task type, choose the best sub-agent CLI and delegate: $ARGUMENTS',
155
+ description: "Auto-route a task to the best available sub-agent CLI"
156
+ }
157
+ },
158
+ instructions: mergeInstructions(
159
+ existing.instructions ?? [],
160
+ []
161
+ )
162
+ };
163
+ return JSON.stringify(config, null, 2);
164
+ }
165
+ function mergeInstructions(existing, additions) {
166
+ const set = /* @__PURE__ */ new Set([...existing, ...additions]);
167
+ return [...set];
168
+ }
169
+ async function main() {
170
+ const targetDir = process.cwd();
171
+ console.log();
172
+ console.log(
173
+ bold(" SDLC Sub-Agents") + dim(" \u2014 Configure OpenCode as an orchestrator of coding agent CLIs")
174
+ );
175
+ console.log();
176
+ console.log(dim(" Detecting installed coding agent CLIs..."));
177
+ console.log();
178
+ const installed = detectInstalledAgents();
179
+ const found = [];
180
+ const missing = [];
181
+ for (const agent of AGENTS) {
182
+ if (installed.get(agent.id)) {
183
+ found.push(agent);
184
+ console.log(
185
+ ` ${green("+")} ${bold(agent.name)} ${dim(`(${agent.command})`)}`
186
+ );
187
+ } else {
188
+ missing.push(agent);
189
+ console.log(
190
+ ` ${red("-")} ${bold(agent.name)} ${dim("not found")} ${dim(`\u2014 install: ${agent.installCommand}`)}`
191
+ );
192
+ }
193
+ }
194
+ console.log();
195
+ console.log(
196
+ ` ${green(String(found.length))} detected, ${yellow(String(missing.length))} not found`
197
+ );
198
+ console.log();
199
+ console.log(dim(" Writing skill files..."));
200
+ const skillsDir = ".agents/skills";
201
+ const orchestratorContent = readTemplate(
202
+ "skills/sdlc-orchestrator/SKILL.md"
203
+ );
204
+ const orchResult = writeFile(
205
+ targetDir,
206
+ `${skillsDir}/sdlc-orchestrator/SKILL.md`,
207
+ orchestratorContent
208
+ );
209
+ console.log(
210
+ ` ${green("+")} ${orchResult} ${cyan(`${skillsDir}/sdlc-orchestrator/SKILL.md`)}`
211
+ );
212
+ for (const agent of AGENTS) {
213
+ const content = readTemplate(`skills/${agent.id}/SKILL.md`);
214
+ const result = writeFile(
215
+ targetDir,
216
+ `${skillsDir}/${agent.id}/SKILL.md`,
217
+ content
218
+ );
219
+ const status = installed.get(agent.id) ? green("+") : yellow("~");
220
+ console.log(
221
+ ` ${status} ${result} ${cyan(`${skillsDir}/${agent.id}/SKILL.md`)}`
222
+ );
223
+ }
224
+ console.log();
225
+ console.log(dim(" Configuring opencode.json..."));
226
+ const opencodeJson = generateOpencodeJson(targetDir, installed);
227
+ const jsonResult = writeFile(targetDir, "opencode.json", opencodeJson);
228
+ console.log(` ${green("+")} ${jsonResult} ${cyan("opencode.json")}`);
229
+ console.log();
230
+ console.log(bold(" Done!") + " Your project is now configured.");
231
+ console.log();
232
+ console.log(dim(" What was created:"));
233
+ console.log(
234
+ ` ${dim("1.")} ${cyan(`${skillsDir}/sdlc-orchestrator/SKILL.md`)} ${dim("\u2014 master routing skill")}`
235
+ );
236
+ for (const agent of AGENTS) {
237
+ console.log(
238
+ ` ${dim(" ")} ${cyan(`${skillsDir}/${agent.id}/SKILL.md`)} ${dim(`\u2014 ${agent.bestFor.split(",")[0]}`)}`
239
+ );
240
+ }
241
+ console.log(
242
+ ` ${dim("2.")} ${cyan("opencode.json")} ${dim("\u2014 permissions + /delegate commands")}`
243
+ );
244
+ console.log();
245
+ console.log(bold(" Usage in OpenCode:"));
246
+ console.log(
247
+ ` ${dim(">")} OpenCode will automatically discover the skills and`
248
+ );
249
+ console.log(
250
+ ` know how to delegate to each sub-agent based on task type.`
251
+ );
252
+ console.log();
253
+ console.log(` ${dim(">")} You can also use custom commands:`);
254
+ console.log(
255
+ ` ${cyan("/delegate")} ${dim("auto-route to best agent")}`
256
+ );
257
+ for (const agent of AGENTS) {
258
+ console.log(
259
+ ` ${cyan(`/delegate-${agent.id}`)} ${dim(`force ${agent.name}`)}`
260
+ );
261
+ }
262
+ if (missing.length > 0) {
263
+ console.log();
264
+ console.log(yellow(" Missing CLIs (install when ready):"));
265
+ for (const agent of missing) {
266
+ console.log(` ${dim("$")} ${agent.installCommand}`);
267
+ }
268
+ }
269
+ console.log();
270
+ }
271
+ main().catch((err) => {
272
+ console.error(red(`Error: ${err instanceof Error ? err.message : err}`));
273
+ process.exit(1);
274
+ });
package/package.json ADDED
@@ -0,0 +1,42 @@
1
+ {
2
+ "name": "sdlc-subagents",
3
+ "version": "0.1.0",
4
+ "description": "Scaffold OpenCode as an orchestrator of multiple coding agent CLIs (Gemini, Copilot, Claude, Aider, Kimi, Cursor)",
5
+ "bin": {
6
+ "sdlc-subagents": "dist/index.js"
7
+ },
8
+ "type": "module",
9
+ "scripts": {
10
+ "build": "tsup src/index.ts --format esm --dts --clean",
11
+ "dev": "tsx src/index.ts",
12
+ "prepublishOnly": "npm run build"
13
+ },
14
+ "keywords": [
15
+ "opencode",
16
+ "sdlc",
17
+ "ai-agents",
18
+ "coding-agents",
19
+ "gemini-cli",
20
+ "claude-code",
21
+ "aider",
22
+ "copilot",
23
+ "kimi",
24
+ "cursor",
25
+ "orchestrator"
26
+ ],
27
+ "author": "Roy Zalta",
28
+ "license": "MIT",
29
+ "files": [
30
+ "dist",
31
+ "templates"
32
+ ],
33
+ "engines": {
34
+ "node": ">=18"
35
+ },
36
+ "devDependencies": {
37
+ "@types/node": "^25.4.0",
38
+ "tsup": "^8.3.5",
39
+ "tsx": "^4.19.2",
40
+ "typescript": "^5.7.2"
41
+ }
42
+ }
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: aider
3
+ description: Delegate tasks to Aider for AI pair programming with auto-git-commits, model-agnostic LLM support, and architect mode for complex changes. Works with any LLM provider.
4
+ ---
5
+
6
+ ## What is Aider
7
+
8
+ Aider is a model-agnostic AI pair programming tool for the terminal. It works with any LLM (OpenAI, Anthropic, DeepSeek, local models via Ollama), automatically commits every change to git with descriptive messages, and supports an architect mode where one model plans and another edits.
9
+
10
+ ## When to delegate to Aider
11
+
12
+ Use Aider when you need to:
13
+ - Make incremental code changes with automatic git commits for each step
14
+ - Work with a specific LLM that other tools don't support (e.g., DeepSeek, local Ollama models)
15
+ - Use architect mode to have one model plan changes and another implement them
16
+ - Pair program on a specific set of files
17
+ - Make changes that should be individually tracked in git history
18
+ - Work with repositories where you want fine-grained commit history of AI changes
19
+
20
+ ## How to invoke Aider
21
+
22
+ ### Non-interactive (recommended for delegation)
23
+
24
+ Use `--message` with `--yes` for fully non-interactive execution:
25
+
26
+ ```bash
27
+ aider --message "YOUR PROMPT HERE" --yes
28
+ ```
29
+
30
+ ### With specific model
31
+
32
+ ```bash
33
+ aider --message "YOUR PROMPT" --yes --model sonnet
34
+ ```
35
+
36
+ ### With architect mode (plan + implement split)
37
+
38
+ ```bash
39
+ aider --message "YOUR PROMPT" --yes --architect --model o3-mini --editor-model sonnet
40
+ ```
41
+
42
+ ### With specific files in context
43
+
44
+ ```bash
45
+ aider --message "YOUR PROMPT" --yes --file src/auth.ts --file src/types.ts
46
+ ```
47
+
48
+ ### With read-only context files
49
+
50
+ ```bash
51
+ aider --message "YOUR PROMPT" --yes --file src/auth.ts --read docs/api-spec.md
52
+ ```
53
+
54
+ ### Dry run (preview changes without applying)
55
+
56
+ ```bash
57
+ aider --message "YOUR PROMPT" --yes --dry-run
58
+ ```
59
+
60
+ ### Disable auto-git-commit
61
+
62
+ ```bash
63
+ aider --message "YOUR PROMPT" --yes --no-git
64
+ ```
65
+
66
+ ## Important notes
67
+
68
+ - Requires API keys via environment variables (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, etc.) or `--api-key` flag
69
+ - By default, Aider auto-commits every change to git with a descriptive message
70
+ - The `--yes` flag is essential for non-interactive use (auto-confirms all prompts)
71
+ - Aider exits after completing the `--message` task
72
+ - Architect mode (`--architect`) is powerful for complex changes: one model reasons about the approach, another implements
73
+ - Use `--file` to explicitly add files to context (otherwise Aider uses its own heuristics)
74
+ - Use `--no-stream` if you want to capture complete output
75
+
76
+ ## Delegation pattern
77
+
78
+ For targeted file changes:
79
+
80
+ ```bash
81
+ aider --message "Add input validation to the createUser function in src/users.ts. Validate email format and password strength. Add corresponding tests." --yes --file src/users.ts --file tests/users.test.ts
82
+ ```
83
+
84
+ For architect-mode complex changes:
85
+
86
+ ```bash
87
+ aider --message "Migrate the database layer from raw SQL to Prisma ORM. Update all repository files accordingly." --yes --architect --model o3-mini --editor-model sonnet
88
+ ```
89
+
90
+ For changes with specific LLM:
91
+
92
+ ```bash
93
+ aider --message "Optimize the rendering performance of the dashboard component" --yes --model deepseek --file src/components/Dashboard.tsx
94
+ ```
@@ -0,0 +1,88 @@
1
+ ---
2
+ name: claude-code
3
+ description: Delegate tasks to Claude Code for complex refactoring, architecture-level changes, multi-file edits, in-depth code review, and debugging. Excels at deep reasoning about code structure.
4
+ ---
5
+
6
+ ## What is Claude Code
7
+
8
+ Claude Code is Anthropic's terminal-based coding agent. It reads entire codebases, performs multi-file edits, runs commands, manages git, and supports multi-agent workflows with sub-agent delegation.
9
+
10
+ ## When to delegate to Claude Code
11
+
12
+ Use Claude Code when you need to:
13
+ - Perform complex multi-file refactoring
14
+ - Make architecture-level changes across a codebase
15
+ - Debug complex issues that require deep code understanding
16
+ - Conduct thorough code reviews with actionable feedback
17
+ - Implement features that span multiple files and modules
18
+ - Work on tasks that benefit from Claude's strong reasoning capabilities
19
+ - Review git diffs and provide structured feedback
20
+
21
+ ## How to invoke Claude Code
22
+
23
+ ### Non-interactive (recommended for delegation)
24
+
25
+ Use the `-p` flag for non-interactive print mode:
26
+
27
+ ```bash
28
+ claude -p "YOUR PROMPT HERE"
29
+ ```
30
+
31
+ ### With structured output
32
+
33
+ ```bash
34
+ claude -p "YOUR PROMPT" --output-format json
35
+ ```
36
+
37
+ ### Pipe input for review
38
+
39
+ ```bash
40
+ git diff | claude -p "Review these changes for bugs and security issues"
41
+ ```
42
+
43
+ ### Resume last conversation
44
+
45
+ ```bash
46
+ claude -c
47
+ ```
48
+
49
+ ### With specific model
50
+
51
+ ```bash
52
+ claude -p "YOUR PROMPT" --model claude-sonnet-4-5
53
+ ```
54
+
55
+ ### Restrict available tools
56
+
57
+ ```bash
58
+ claude -p "YOUR PROMPT" --allowedTools "read,grep,glob"
59
+ ```
60
+
61
+ ## Important notes
62
+
63
+ - Requires Claude Pro/Max subscription or `ANTHROPIC_API_KEY`
64
+ - The `-p` flag is essential for non-interactive use
65
+ - Supports `--output-format json` for machine-readable structured output
66
+ - Supports `--input-format stream-json` for pipeline integration
67
+ - Creates `CLAUDE.md` project config file (similar to AGENTS.md)
68
+ - Claude Code has its own sub-agent support - useful for breaking down complex tasks
69
+
70
+ ## Delegation pattern
71
+
72
+ For code changes:
73
+
74
+ ```bash
75
+ RESULT=$(claude -p "Refactor the authentication module in src/auth/ to use the strategy pattern. Maintain backward compatibility with existing tests. Return a summary of changes made.")
76
+ ```
77
+
78
+ For code review:
79
+
80
+ ```bash
81
+ RESULT=$(git diff main..HEAD | claude -p "Review these changes. Focus on: 1) Security vulnerabilities 2) Performance regressions 3) API contract changes. Output as structured markdown." --output-format text)
82
+ ```
83
+
84
+ For debugging:
85
+
86
+ ```bash
87
+ RESULT=$(claude -p "The test in tests/auth.test.ts is failing with error: [ERROR]. Investigate the root cause and fix it. Return the fix as a diff.")
88
+ ```
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: copilot-cli
3
+ description: Delegate tasks to GitHub Copilot CLI for GitHub workflow automation, PR creation and review, issue management, and repository operations. Deeply integrated with GitHub's ecosystem.
4
+ ---
5
+
6
+ ## What is GitHub Copilot CLI
7
+
8
+ GitHub Copilot CLI is GitHub's agentic coding tool for the terminal. It provides deep integration with GitHub workflows including pull requests, issues, code review, and repository management alongside standard coding capabilities.
9
+
10
+ ## When to delegate to Copilot CLI
11
+
12
+ Use GitHub Copilot CLI when you need to:
13
+ - Create, review, or manage pull requests
14
+ - Manage GitHub issues (create, update, close, label)
15
+ - Perform code review with GitHub-native feedback
16
+ - Automate GitHub repository operations (branch management, releases)
17
+ - Generate PR descriptions from code changes
18
+ - Push changes and create PRs in a single flow using `/delegate`
19
+ - Work with GitHub Actions workflows
20
+
21
+ ## How to invoke Copilot CLI
22
+
23
+ ### Non-interactive (recommended for delegation)
24
+
25
+ ```bash
26
+ copilot --prompt "YOUR PROMPT HERE"
27
+ ```
28
+
29
+ ### Auto-approve all operations
30
+
31
+ ```bash
32
+ copilot --prompt "YOUR PROMPT" --allow-all
33
+ ```
34
+
35
+ ### Delegate changes as a PR
36
+
37
+ Inside Copilot CLI, the `/delegate` command pushes changes as a PR to a remote repo. For non-interactive use:
38
+
39
+ ```bash
40
+ copilot --prompt "Make the following changes and create a PR: [DESCRIPTION]" --allow-all
41
+ ```
42
+
43
+ ## Important notes
44
+
45
+ - Requires a GitHub Copilot subscription (Pro, Pro+, Business, or Enterprise)
46
+ - Authentication is via GitHub account (`/login` on first run)
47
+ - The older `gh copilot` extension was deprecated in Oct 2025 - use the standalone `copilot` command
48
+ - Requires Node.js v22+
49
+ - Copilot CLI has native access to GitHub API - no need for `gh` CLI separately
50
+
51
+ ## Delegation pattern
52
+
53
+ When delegating GitHub-related tasks to Copilot CLI:
54
+
55
+ ```bash
56
+ RESULT=$(copilot --prompt "Review the current branch changes and create a PR with title '[TITLE]' and description covering: [ASPECTS TO COVER]" --allow-all)
57
+ ```
58
+
59
+ For read-only operations (e.g., listing issues):
60
+
61
+ ```bash
62
+ RESULT=$(copilot --prompt "List all open issues labeled 'bug' in this repository. Return them as a markdown table with columns: number, title, assignee, created date.")
63
+ ```
@@ -0,0 +1,100 @@
1
+ ---
2
+ name: cursor-cli
3
+ description: Delegate tasks to Cursor CLI (agent command) for IDE-grade coding in the terminal, cloud agent handoff for long-running tasks, and rapid prototyping with multi-model support.
4
+ ---
5
+
6
+ ## What is Cursor CLI
7
+
8
+ Cursor CLI brings the full Cursor IDE agent experience to the terminal. It supports cloud agent handoff (start locally, continue remotely), works with any model in your Cursor subscription, and provides the same powerful coding capabilities as the Cursor editor.
9
+
10
+ ## When to delegate to Cursor CLI
11
+
12
+ Use Cursor CLI when you need to:
13
+ - Perform IDE-grade code generation and editing from the terminal
14
+ - Hand off long-running tasks to cloud agents
15
+ - Rapidly prototype features with multi-model support
16
+ - Work on tasks that benefit from Cursor's proprietary model routing
17
+ - Use plan mode to get implementation strategies before coding
18
+ - Run background coding tasks while you work on other things
19
+
20
+ ## How to invoke Cursor CLI
21
+
22
+ ### Non-interactive (recommended for delegation)
23
+
24
+ Use the `-p` flag for non-interactive print mode:
25
+
26
+ ```bash
27
+ agent -p "YOUR PROMPT HERE"
28
+ ```
29
+
30
+ ### With cloud handoff (long-running tasks)
31
+
32
+ ```bash
33
+ agent -p "YOUR PROMPT" -c --cloud
34
+ ```
35
+
36
+ ### With specific model
37
+
38
+ ```bash
39
+ agent -p "YOUR PROMPT" --model gpt-5.2
40
+ ```
41
+
42
+ ### Plan mode (get strategy without making changes)
43
+
44
+ ```bash
45
+ agent -p "YOUR PROMPT" --mode=plan
46
+ ```
47
+
48
+ ### Ask mode (answer questions without changes)
49
+
50
+ ```bash
51
+ agent -p "YOUR PROMPT" --mode=ask
52
+ ```
53
+
54
+ ### Full agent mode (default - makes changes)
55
+
56
+ ```bash
57
+ agent -p "YOUR PROMPT" --mode=agent
58
+ ```
59
+
60
+ ### List active/previous sessions
61
+
62
+ ```bash
63
+ agent ls
64
+ ```
65
+
66
+ ### Resume a previous session
67
+
68
+ ```bash
69
+ agent resume
70
+ ```
71
+
72
+ ## Important notes
73
+
74
+ - Install via `curl https://cursor.sh/cli -fsS | bash`
75
+ - Requires a Cursor subscription for authentication
76
+ - The CLI command is `agent` (NOT `cursor`)
77
+ - Still in beta - some features may change
78
+ - The `-p` flag is essential for non-interactive use
79
+ - Cloud mode (`-c` or `--cloud`) hands off to remote agents - useful for long tasks
80
+ - Supports `--output-format text` for clean output capture
81
+
82
+ ## Delegation pattern
83
+
84
+ For rapid prototyping:
85
+
86
+ ```bash
87
+ RESULT=$(agent -p "Create a complete CRUD API for a blog post system using Express.js and TypeScript. Include routes, controllers, types, and basic validation. Structure files under src/api/posts/")
88
+ ```
89
+
90
+ For planning before implementation:
91
+
92
+ ```bash
93
+ PLAN=$(agent -p "How should I implement real-time notifications in this Next.js app? Consider WebSocket vs SSE, database design, and component architecture." --mode=plan)
94
+ ```
95
+
96
+ For cloud-delegated long tasks:
97
+
98
+ ```bash
99
+ agent -p "Migrate the entire test suite from Jest to Vitest. Update all config files, test utilities, and mocks. Ensure all tests pass." -c --cloud
100
+ ```
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: gemini-cli
3
+ description: Delegate tasks to Gemini CLI for context engineering, large codebase analysis, research-heavy coding tasks, and documentation generation. Gemini has a 1M token context window and built-in Google Search grounding.
4
+ ---
5
+
6
+ ## What is Gemini CLI
7
+
8
+ Gemini CLI is Google's agentic coding tool for the terminal. It leverages Gemini models with up to 1M tokens of context, built-in Google Search grounding, and can read/edit files, run shell commands, and fetch web content.
9
+
10
+ ## When to delegate to Gemini CLI
11
+
12
+ Use Gemini CLI when you need to:
13
+ - Analyze very large codebases or files that exceed your context window
14
+ - Research external APIs, libraries, or frameworks using Google Search grounding
15
+ - Generate documentation from large amounts of source code
16
+ - Perform context engineering tasks that benefit from massive context windows
17
+ - Cross-reference multiple large files simultaneously
18
+ - Understand complex dependency trees across an entire monorepo
19
+
20
+ ## How to invoke Gemini CLI
21
+
22
+ ### Non-interactive (recommended for delegation)
23
+
24
+ Use the `-p` flag for non-interactive execution. The agent will run the prompt, produce output, and exit:
25
+
26
+ ```bash
27
+ gemini -p "YOUR PROMPT HERE"
28
+ ```
29
+
30
+ ### With specific model
31
+
32
+ ```bash
33
+ gemini -p "YOUR PROMPT" -m gemini-2.5-pro
34
+ ```
35
+
36
+ ### With all project files in context
37
+
38
+ ```bash
39
+ gemini -p "YOUR PROMPT" -a
40
+ ```
41
+
42
+ ### Auto-approve all tool calls (use with caution)
43
+
44
+ ```bash
45
+ gemini -p "YOUR PROMPT" --yolo
46
+ ```
47
+
48
+ ## Important notes
49
+
50
+ - Gemini CLI requires authentication via Google account (free tier: 60 req/min, 1000/day) or `GOOGLE_API_KEY` env var
51
+ - The `-p` flag is essential for non-interactive use - without it, Gemini enters interactive mode
52
+ - Output from `-p` mode goes to stdout and can be captured
53
+ - Gemini CLI creates a `GEMINI.md` project config file (similar to AGENTS.md)
54
+ - For sandboxed execution, use `-s` flag (requires Docker)
55
+
56
+ ## Delegation pattern
57
+
58
+ When delegating to Gemini CLI, structure your bash command like this:
59
+
60
+ ```bash
61
+ RESULT=$(gemini -p "Analyze the following codebase concern: [SPECIFIC TASK]. Focus on [SPECIFIC ASPECTS]. Return your analysis as structured markdown.")
62
+ ```
63
+
64
+ Then use the captured output to continue your work.
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: kimi-cli
3
+ description: Delegate tasks to Kimi CLI for front-end development, full-stack coding, and long-context code understanding. Powered by Moonshot AI's Kimi K2 model with extended context support.
4
+ ---
5
+
6
+ ## What is Kimi CLI
7
+
8
+ Kimi CLI is Moonshot AI's terminal-based autonomous coding agent. It leverages the Kimi K2 model with long-context support, reads and edits code, executes shell commands, and supports MCP tools integration.
9
+
10
+ ## When to delegate to Kimi CLI
11
+
12
+ Use Kimi CLI when you need to:
13
+ - Build or modify front-end components (React, Vue, Svelte, etc.)
14
+ - Implement full-stack features end-to-end
15
+ - Work on tasks that benefit from long-context understanding
16
+ - Generate UI code from descriptions or mockups
17
+ - Perform front-end-specific tasks (styling, responsive design, accessibility)
18
+ - Work with MCP-connected tools and resources
19
+
20
+ ## How to invoke Kimi CLI
21
+
22
+ ### Non-interactive (recommended for delegation)
23
+
24
+ Kimi CLI accepts prompts via stdin pipe:
25
+
26
+ ```bash
27
+ echo "YOUR PROMPT HERE" | kimi
28
+ ```
29
+
30
+ ### With specific model
31
+
32
+ ```bash
33
+ echo "YOUR PROMPT" | kimi --model kimi-k2
34
+ ```
35
+
36
+ ### With MCP configuration
37
+
38
+ ```bash
39
+ echo "YOUR PROMPT" | kimi --mcp-config-file ~/.config/kimi/mcp.json
40
+ ```
41
+
42
+ ## Important notes
43
+
44
+ - Install via `uv tool install --python 3.13 kimi-cli` (requires `uv` package manager)
45
+ - Authentication via `/login` command on first run (OAuth) or `KIMI_API_KEY` env var
46
+ - Non-interactive mode uses stdin pipe (not a `-p` flag like other tools)
47
+ - Kimi CLI creates an `AGENTS.md` project config (via `/init` command)
48
+ - Supports OpenAI-compatible API format
49
+ - Excels at front-end and UI-related coding tasks
50
+
51
+ ## Delegation pattern
52
+
53
+ For front-end component creation:
54
+
55
+ ```bash
56
+ RESULT=$(echo "Create a responsive navigation bar component using React and Tailwind CSS. It should have a logo, links (Home, About, Contact), a mobile hamburger menu, and dark mode toggle. Export as NavBar from src/components/NavBar.tsx" | kimi)
57
+ ```
58
+
59
+ For full-stack features:
60
+
61
+ ```bash
62
+ RESULT=$(echo "Implement a user profile page with the following: 1) React component at src/pages/Profile.tsx 2) API endpoint at src/api/profile.ts 3) Form for editing name, email, avatar. Use existing auth context from src/contexts/auth.tsx" | kimi)
63
+ ```
64
+
65
+ For styling and accessibility:
66
+
67
+ ```bash
68
+ RESULT=$(echo "Audit the components in src/components/ for accessibility issues. Fix any WCAG 2.1 AA violations. Add proper ARIA labels, keyboard navigation, and focus management." | kimi)
69
+ ```
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: sdlc-orchestrator
3
+ description: Orchestrate multiple coding agent CLIs as sub-agents. Load this skill to understand which coding agent CLI to delegate tasks to based on task type (front-end, context engineering, GitHub workflows, refactoring, pair programming, rapid prototyping).
4
+ ---
5
+
6
+ ## SDLC Sub-Agent Orchestration
7
+
8
+ You have access to multiple coding agent CLIs that you can delegate tasks to via the Bash tool. Each agent has different strengths. Use the `skill` tool to load the specific agent's skill for detailed invocation instructions.
9
+
10
+ ## Agent Routing Table
11
+
12
+ | Task Type | Recommended Agent | Skill to Load |
13
+ |-----------|-------------------|---------------|
14
+ | Large codebase analysis, research, documentation | Gemini CLI | `gemini-cli` |
15
+ | GitHub PRs, issues, code review, repo management | Copilot CLI | `copilot-cli` |
16
+ | Complex refactoring, architecture changes, debugging | Claude Code | `claude-code` |
17
+ | Incremental changes with git commits, multi-model | Aider | `aider` |
18
+ | Front-end development, UI components, styling | Kimi CLI | `kimi-cli` |
19
+ | IDE-grade coding, cloud handoff, rapid prototyping | Cursor CLI | `cursor-cli` |
20
+
21
+ ## How to delegate
22
+
23
+ 1. **Identify the task type** from the user's request
24
+ 2. **Load the specific agent skill** using the `skill` tool (e.g., `skill({ name: "gemini-cli" })`)
25
+ 3. **Follow the delegation pattern** described in that skill
26
+ 4. **Execute via Bash** using the agent's non-interactive mode
27
+ 5. **Process the output** and continue your work
28
+
29
+ ## Quick reference for non-interactive invocation
30
+
31
+ ```
32
+ gemini -p "PROMPT" # Gemini CLI
33
+ copilot --prompt "PROMPT" # GitHub Copilot CLI
34
+ claude -p "PROMPT" # Claude Code
35
+ aider --message "PROMPT" --yes # Aider
36
+ echo "PROMPT" | kimi # Kimi CLI
37
+ agent -p "PROMPT" # Cursor CLI
38
+ ```
39
+
40
+ ## Multi-agent workflows
41
+
42
+ You can chain multiple agents for complex SDLC workflows:
43
+
44
+ 1. **Research phase**: Use Gemini CLI to analyze requirements and existing code
45
+ 2. **Implementation phase**: Use Claude Code or Aider for the actual coding
46
+ 3. **Front-end phase**: Use Kimi CLI for UI components
47
+ 4. **Review phase**: Use Copilot CLI to create PRs with review
48
+ 5. **Iteration phase**: Use Aider for incremental fixes based on review feedback
49
+
50
+ ## Important rules
51
+
52
+ - Always check if the target CLI is available before delegating (use `which <command>`)
53
+ - Use non-interactive mode to capture output - never launch interactive sessions
54
+ - If a CLI is not installed, inform the user and provide the install command
55
+ - Prefer delegating to the agent best suited for the task type
56
+ - Capture output using command substitution: `RESULT=$(command)`
57
+ - If a task is simple enough for you to handle directly, don't delegate - only delegate complex or specialized tasks