@robbiesrobotics/alice-agents 1.2.0 → 1.2.2
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.
|
@@ -6,6 +6,7 @@ import { fileURLToPath } from 'node:url';
|
|
|
6
6
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
7
|
const TEMPLATES_DIR = join(__dirname, '..', 'templates', 'workspaces');
|
|
8
8
|
const OPENCLAW_DIR = join(homedir(), '.openclaw');
|
|
9
|
+
const SKILLS_DIR = join(OPENCLAW_DIR, 'skills');
|
|
9
10
|
|
|
10
11
|
// Product files — always overwritten on install/upgrade
|
|
11
12
|
const PRODUCT_FILES = ['SOUL.md', 'AGENTS.md', 'IDENTITY.md', 'TOOLS.md'];
|
|
@@ -99,6 +100,22 @@ export function scaffoldWorkspace(agent, userInfo, agentCount) {
|
|
|
99
100
|
return { workspaceDir, written, skipped };
|
|
100
101
|
}
|
|
101
102
|
|
|
103
|
+
export function scaffoldSkills() {
|
|
104
|
+
// Install the claude-code skill into ~/.openclaw/skills/
|
|
105
|
+
const claudeCodeSkillDir = join(SKILLS_DIR, 'claude-code');
|
|
106
|
+
mkdirSync(claudeCodeSkillDir, { recursive: true });
|
|
107
|
+
|
|
108
|
+
const skillTemplatePath = join(__dirname, '..', 'templates', 'skills', 'claude-code', 'SKILL.md');
|
|
109
|
+
const skillDestPath = join(claudeCodeSkillDir, 'SKILL.md');
|
|
110
|
+
|
|
111
|
+
if (existsSync(skillTemplatePath)) {
|
|
112
|
+
const content = readFileSync(skillTemplatePath, 'utf8');
|
|
113
|
+
writeFileSync(skillDestPath, content, 'utf8');
|
|
114
|
+
return true;
|
|
115
|
+
}
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
102
119
|
export function scaffoldAll(agents, userInfo) {
|
|
103
120
|
const agentCount = agents.length;
|
|
104
121
|
const results = [];
|
|
@@ -108,5 +125,8 @@ export function scaffoldAll(agents, userInfo) {
|
|
|
108
125
|
results.push({ agent: agent.id, ...result });
|
|
109
126
|
}
|
|
110
127
|
|
|
128
|
+
// Install skills
|
|
129
|
+
scaffoldSkills();
|
|
130
|
+
|
|
111
131
|
return results;
|
|
112
132
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: claude-code
|
|
3
|
+
description: 'Delegate implementation tasks to Claude Code. Use when: (1) building new features or apps, (2) porting/refactoring code across multiple files, (3) fixing bugs that require file exploration, (4) any coding task that needs read+write+exec across a codebase. NOT for: planning/research (do that yourself), simple single-line edits (use edit tool directly), reading files (use read tool). Always give Claude Code a working directory and a precise task. Use background:true for long tasks and poll for completion.'
|
|
4
|
+
metadata:
|
|
5
|
+
{
|
|
6
|
+
"openclaw": { "emoji": "⚡", "requires": { "anyBins": ["claude"] } }
|
|
7
|
+
}
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Claude Code Skill
|
|
11
|
+
|
|
12
|
+
Runs Claude Code (`claude` CLI) in `--print --permission-mode bypassPermissions` mode.
|
|
13
|
+
No PTY needed. Fully autonomous — reads, writes, edits, runs shell commands.
|
|
14
|
+
|
|
15
|
+
## When to use this skill
|
|
16
|
+
|
|
17
|
+
Use Claude Code when the task requires:
|
|
18
|
+
- Creating or modifying **multiple files**
|
|
19
|
+
- Running **build/test/lint** commands to verify correctness
|
|
20
|
+
- Exploring an unfamiliar codebase before writing
|
|
21
|
+
- Any implementation work that would take you many tool calls
|
|
22
|
+
|
|
23
|
+
## Basic pattern
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
exec:
|
|
27
|
+
workdir: /path/to/project
|
|
28
|
+
command: claude --permission-mode bypassPermissions --print 'YOUR TASK HERE'
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Background pattern (for long tasks)
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
exec:
|
|
35
|
+
workdir: /path/to/project
|
|
36
|
+
background: true
|
|
37
|
+
command: claude --permission-mode bypassPermissions --print 'YOUR TASK HERE.
|
|
38
|
+
|
|
39
|
+
When done, run: openclaw system event --text "Done: brief summary" --mode now'
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then poll with `process(action=log, sessionId=...)` to check progress.
|
|
43
|
+
|
|
44
|
+
## Writing good prompts for Claude Code
|
|
45
|
+
|
|
46
|
+
1. **Start with context** — tell it what the project is and what exists
|
|
47
|
+
2. **Be specific** — name exact files, functions, behaviors expected
|
|
48
|
+
3. **State success criteria** — "run npm run build and it must pass"
|
|
49
|
+
4. **End with notification** — always append the `openclaw system event` line for long tasks
|
|
50
|
+
|
|
51
|
+
## Example: Feature build
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
exec:
|
|
55
|
+
workdir: /Users/aliceclaw/.openclaw/workspace-olivia/mission-control
|
|
56
|
+
background: true
|
|
57
|
+
command: >
|
|
58
|
+
claude --permission-mode bypassPermissions --print '
|
|
59
|
+
This is a Next.js 16 + TypeScript + shadcn/ui app.
|
|
60
|
+
|
|
61
|
+
Task: Add an AgentWizard modal to src/app/agents/page.tsx.
|
|
62
|
+
- Read src/app/agents/page.tsx first
|
|
63
|
+
- Read src/components/ui/ to see available components
|
|
64
|
+
- Build a multi-step Dialog: name → domain → preview → confirm
|
|
65
|
+
- On confirm, POST /api/agents with the form data
|
|
66
|
+
- The page should refresh the agent list after creation
|
|
67
|
+
|
|
68
|
+
Run npm run build at the end and fix any TypeScript errors.
|
|
69
|
+
|
|
70
|
+
When done: openclaw system event --text "AgentWizard complete" --mode now
|
|
71
|
+
'
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Example: Bug fix
|
|
75
|
+
|
|
76
|
+
```
|
|
77
|
+
exec:
|
|
78
|
+
workdir: /path/to/project
|
|
79
|
+
command: claude --permission-mode bypassPermissions --print 'Fix the TypeScript error in src/lib/openclaw.ts line 42. Run npm run build to verify.'
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Example: Code review
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
exec:
|
|
86
|
+
workdir: /path/to/project
|
|
87
|
+
command: claude --permission-mode bypassPermissions --print 'Review src/app/agents/page.tsx for bugs, performance issues, and missing error handling. Output a numbered list of findings.'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Rules for agents using this skill
|
|
91
|
+
|
|
92
|
+
1. **Give a precise workdir** — Claude Code needs to know where it is
|
|
93
|
+
2. **One task per invocation** — don't chain unrelated work in one prompt
|
|
94
|
+
3. **Always verify** — ask Claude Code to run the build/tests before finishing
|
|
95
|
+
4. **Background for >5min tasks** — use background:true and the notification line
|
|
96
|
+
5. **Report results** — after Claude Code finishes, summarize what changed to Olivia
|
|
97
|
+
6. **Never run in ~/.openclaw/ itself** — always in a project subdirectory
|
|
98
|
+
|
|
99
|
+
## Agents authorized to use this skill
|
|
100
|
+
|
|
101
|
+
All coding specialists: dylan, felix, isaac, caleb, darius, avery, devon, quinn, alex
|
|
102
|
+
Orchestrator: olivia (for coordination tasks only)
|
|
103
|
+
|
|
104
|
+
## Checking if claude is available
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
exec:
|
|
108
|
+
command: which claude && claude --version
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If not found, tell Olivia — she'll handle escalation.
|