gin-skills 1.0.0 → 1.0.1

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.
Files changed (49) hide show
  1. package/README.md +2 -0
  2. package/bin/cli.js +59 -1
  3. package/landing/index.html +15 -13
  4. package/package.json +8 -2
  5. package/skills/openclaw-builder/SKILL.md +115 -0
  6. package/skills/openclaw-builder/docs/acp-guide.md +117 -0
  7. package/skills/openclaw-builder/docs/automation-guide.md +135 -0
  8. package/skills/openclaw-builder/docs/browser-guide.md +217 -0
  9. package/skills/openclaw-builder/docs/channels-guide.md +150 -0
  10. package/skills/openclaw-builder/docs/commands-guide.md +130 -0
  11. package/skills/openclaw-builder/docs/config-guide.md +195 -0
  12. package/skills/openclaw-builder/docs/exec-guide.md +194 -0
  13. package/skills/openclaw-builder/docs/hooks-guide.md +132 -0
  14. package/skills/openclaw-builder/docs/models-auth-guide.md +140 -0
  15. package/skills/openclaw-builder/docs/multi-agent-guide.md +373 -0
  16. package/skills/openclaw-builder/docs/plugins-guide.md +134 -0
  17. package/skills/openclaw-builder/docs/remote-gateway-guide.md +184 -0
  18. package/skills/openclaw-builder/docs/sandboxing-guide.md +207 -0
  19. package/skills/openclaw-builder/docs/security-guide.md +232 -0
  20. package/skills/openclaw-builder/docs/skills-guide.md +92 -0
  21. package/skills/openclaw-builder/docs/webhooks-guide.md +179 -0
  22. package/skills/openclaw-builder/docs/workspace-memory-guide.md +130 -0
  23. package/skills/react-native-performance/SKILL.md +74 -0
  24. package/skills/react-native-performance/docs/01-architecture.md +1154 -0
  25. package/skills/react-native-performance/docs/02-rendering.md +1547 -0
  26. package/skills/react-native-performance/docs/03-startup.md +1432 -0
  27. package/skills/react-native-performance/docs/04-memory.md +2302 -0
  28. package/skills/react-native-performance/docs/05-navigation.md +1039 -0
  29. package/skills/react-native-performance/docs/06-network-state.md +1249 -0
  30. package/skills/react-native-performance/docs/07-bundle-size.md +1687 -0
  31. package/skills/react-native-performance/docs/08-algorithms.md +2415 -0
  32. package/skills/react-native-performance/docs/09-animations.md +1724 -0
  33. package/skills/react-native-performance/docs/10-senior-tricks.md +1565 -0
  34. package/skills/react-native-performance/docs/11-anti-patterns.md +224 -0
  35. package/skills/react-native-performance/docs/12-monitoring.md +969 -0
  36. package/skills/react-native-performance/docs/13-checklist.md +155 -0
  37. package/skills/react-native-performance/scanners/scan-all.sh +138 -0
  38. package/skills/react-native-performance/scanners/scan-animations.sh +240 -0
  39. package/skills/react-native-performance/scanners/scan-build-config.sh +83 -0
  40. package/skills/react-native-performance/scanners/scan-bundle-size.sh +209 -0
  41. package/skills/react-native-performance/scanners/scan-console-devtools.sh +264 -0
  42. package/skills/react-native-performance/scanners/scan-images.sh +212 -0
  43. package/skills/react-native-performance/scanners/scan-memory-leaks.sh +251 -0
  44. package/skills/react-native-performance/scanners/scan-navigation.sh +244 -0
  45. package/skills/react-native-performance/scanners/scan-rendering.sh +185 -0
  46. package/skills/react-native-performance/scanners/scan-state-network.sh +246 -0
  47. package/skills/react-native-performance/scanners/scan-typescript-perf.sh +97 -0
  48. package/skills/react-native-performance/scanners/scan-unused-assets.sh +302 -0
  49. package/skills/performance/SKILL.md +0 -509
package/README.md CHANGED
@@ -78,8 +78,10 @@ gin-skills versions # Show all published npm versions
78
78
  | `mobile-app-review` | `--skills mobile-app-review` | Mobile App Store Review Checklist: Comprehensive pre-submission audit for Apple App Store and Google Play Store. |
79
79
  | `mongodb` | `--skills mongodb` | MongoDB & Mongoose Best Practices: Production patterns for schema design, indexing, aggregation pipelines, transactions, connection management, and... |
80
80
  | `nestjs-architecture` | `--skills nestjs-architecture` | NestJS Feature-Based Architecture: Production patterns for organizing NestJS backends — feature modules, core infrastructure, shared utilities, gua... |
81
+ | `openclaw-builder` | `--skills openclaw-builder` | Guide for setting up, configuring, and extending OpenClaw — an AI gateway for connecting LLM agents to messaging channels (Telegram, Discord, Whats... |
81
82
  | `react-fsd-architecture` | `--skills react-fsd-architecture` | Feature-Sliced Design (FSD) Architecture: Architectural methodology for organizing frontend projects by business features — layers, slices, segment... |
82
83
  | `react-native-expo` | `--skills react-native-expo` | React Native Expo (Sty AI Mobile): Production patterns for the Sty AI React Native app — Expo SDK 54, Expo Router v5, React Query v5, Zustand v5, R... |
84
+ | `react-native-performance` | `--skills react-native-performance` | React Native Performance Optimization: Comprehensive guide — rendering, memory leaks, bundle size, startup, animations, navigation, algorithms, and... |
83
85
  | `react-query` | `--skills react-query` | TanStack React Query Best Practices: Comprehensive guide for writing production-quality React Query code — query keys, mutations, caching, optimist... |
84
86
  | `review-code` | `--skills review-code` | Code Review: Comprehensive code review and quality analysis for fullstack monorepos (NestJS backend, Next.js frontend, React Native mobile). |
85
87
  | `security-scanner` | `--skills security-scanner` | Security Scanner: Comprehensive security audit for fullstack monorepos — NestJS backend, Next.js frontend, and React Native mobile app. |
package/bin/cli.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { fileURLToPath } from 'url';
4
4
  import { dirname, join } from 'path';
5
- import { existsSync, readdirSync, statSync, mkdirSync, copyFileSync, rmSync, readFileSync } from 'fs';
5
+ import { existsSync, readdirSync, statSync, mkdirSync, copyFileSync, rmSync, readFileSync, writeFileSync } from 'fs';
6
6
  import { homedir } from 'os';
7
7
  import { Command } from 'commander';
8
8
  import chalk from 'chalk';
@@ -15,6 +15,14 @@ const SRC_SKILLS = join(PACKAGE_DIR, 'skills');
15
15
  const SRC_AGENTS = join(PACKAGE_DIR, 'agents');
16
16
  const PKG = JSON.parse(readFileSync(join(PACKAGE_DIR, 'package.json'), 'utf-8'));
17
17
 
18
+ // ─── Skills that require environment variables ───────────────────────────────
19
+ const SKILL_ENV_VARS = {
20
+ 'ai-asset-generator': [
21
+ { key: 'KIE_AI_API_KEY', desc: 'KIE AI API key for image/video generation', url: 'https://kie.ai' },
22
+ { key: 'STY_AI_API_KEY', desc: 'Sty AI API key for background removal', url: 'https://api.styai.app' },
23
+ ],
24
+ };
25
+
18
26
  // ─── Helpers ──────────────────────────────────────────────────────────────────
19
27
 
20
28
  function getDirs(dir) {
@@ -114,6 +122,56 @@ async function runInstall({ target, skills, agents, verb = 'Installed' }) {
114
122
  spinner.succeed(chalk.bold.green(`${verb}! ${count} item(s)`));
115
123
  console.log();
116
124
  log.info(`Target: ${chalk.cyan(target)}`);
125
+
126
+ // Check if any installed skills need env vars
127
+ const neededVars = [];
128
+ for (const skill of skills) {
129
+ if (SKILL_ENV_VARS[skill]) {
130
+ neededVars.push(...SKILL_ENV_VARS[skill].map(v => ({ ...v, skill })));
131
+ }
132
+ }
133
+
134
+ if (neededVars.length > 0) {
135
+ const envExamplePath = join(target, '.env.example');
136
+ const envPath = join(target, '.env');
137
+
138
+ // Build .env.example content
139
+ const lines = ['# Environment variables required by installed skills', ''];
140
+ const grouped = {};
141
+ for (const v of neededVars) {
142
+ if (!grouped[v.skill]) grouped[v.skill] = [];
143
+ grouped[v.skill].push(v);
144
+ }
145
+ for (const [skill, vars] of Object.entries(grouped)) {
146
+ lines.push(`# ─── ${skill} ───`);
147
+ for (const v of vars) {
148
+ lines.push(`# ${v.desc}`);
149
+ lines.push(`# Get from: ${v.url}`);
150
+ lines.push(`${v.key}=`);
151
+ lines.push('');
152
+ }
153
+ }
154
+
155
+ // Write .env.example (always overwrite with latest)
156
+ writeFileSync(envExamplePath, lines.join('\n'));
157
+
158
+ // Create .env from .env.example if it doesn't exist yet
159
+ if (!existsSync(envPath)) {
160
+ copyFileSync(envExamplePath, envPath);
161
+ }
162
+
163
+ console.log();
164
+ console.log(chalk.bold.yellow(' ⚠ Environment variables required:'));
165
+ console.log();
166
+ for (const v of neededVars) {
167
+ console.log(` ${chalk.yellow(v.key)}`);
168
+ console.log(` ${chalk.dim(v.desc)} — ${chalk.cyan(v.url)}`);
169
+ console.log();
170
+ }
171
+ console.log(` ${chalk.dim('Fill in your keys in:')} ${chalk.cyan(envPath)}`);
172
+ }
173
+
174
+ console.log();
117
175
  log.dim('Restart Claude Code (or run /agents) to pick up changes.');
118
176
  console.log();
119
177
  }
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
6
  <title>GinStudio Skills — Supercharge Claude Code</title>
7
- <meta name="description" content="Install production-ready skills and agents for Claude Code with one command. <!-- AUTO:META_COUNTS -->15 skills, 6 agents<!-- /AUTO:META_COUNTS -->, interactive TUI.">
7
+ <meta name="description" content="Install production-ready skills and agents for Claude Code with one command. <!-- AUTO:META_COUNTS -->17 skills, 6 agents<!-- /AUTO:META_COUNTS -->, interactive TUI.">
8
8
  <link rel="preconnect" href="https://fonts.googleapis.com">
9
9
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
10
10
  <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap" rel="stylesheet">
@@ -689,7 +689,7 @@
689
689
  <div class="container">
690
690
  <div class="hero-badge fade-up">
691
691
  <span class="dot"></span>
692
- <!-- AUTO:BADGE -->v1.0 &mdash; 15 Skills &middot; 6 Agents<!-- /AUTO:BADGE -->
692
+ <!-- AUTO:BADGE -->v1.0 &mdash; 17 Skills &middot; 6 Agents<!-- /AUTO:BADGE -->
693
693
  </div>
694
694
  <h1 class="fade-up"><span>Supercharge</span> Claude Code<br>with One Command</h1>
695
695
  <p class="hero-sub fade-up">
@@ -718,7 +718,7 @@
718
718
 
719
719
  <!-- AUTO:STATS -->
720
720
  <div class="stats-bar fade-up">
721
- <div class="stat"><span class="stat-number">15</span><span class="stat-label">Skills</span></div>
721
+ <div class="stat"><span class="stat-number">17</span><span class="stat-label">Skills</span></div>
722
722
  <div class="stat"><span class="stat-number">6</span><span class="stat-label">Agents</span></div>
723
723
  <div class="stat"><span class="stat-number">1</span><span class="stat-label">Command</span></div>
724
724
  <div class="stat"><span class="stat-number">MIT</span><span class="stat-label">License</span></div>
@@ -787,7 +787,7 @@
787
787
  <div class="container">
788
788
  <div class="section-header fade-up">
789
789
  <div class="section-tag">Skills</div>
790
- <h2><!-- AUTO:SKILL_COUNT -->15<!-- /AUTO:SKILL_COUNT --> Production-Ready Skills</h2>
790
+ <h2><!-- AUTO:SKILL_COUNT -->17<!-- /AUTO:SKILL_COUNT --> Production-Ready Skills</h2>
791
791
  <p>Deep domain knowledge that Claude Code loads automatically when relevant. Click to copy the install command.</p>
792
792
  </div>
793
793
  <div class="skills-grid" id="skillsGrid"></div>
@@ -1179,7 +1179,7 @@
1179
1179
  <div class="container">
1180
1180
  <div class="cta-box fade-up">
1181
1181
  <h2>Ready to Supercharge<br>Your Workflow?</h2>
1182
- <p>One command. <!-- AUTO:CTA_COUNTS -->15 skills. 6 agents.<!-- /AUTO:CTA_COUNTS --> Zero configuration.</p>
1182
+ <p>One command. <!-- AUTO:CTA_COUNTS -->17 skills. 6 agents.<!-- /AUTO:CTA_COUNTS --> Zero configuration.</p>
1183
1183
  <div class="cta-install-cmd" onclick="copyInstall()" role="button" tabindex="0" aria-label="Copy install command">
1184
1184
  <span class="dollar">$</span>
1185
1185
  <span class="cmd-text">npx gin-skills</span>
@@ -1220,10 +1220,10 @@
1220
1220
  <footer class="footer">
1221
1221
  <div class="container">
1222
1222
  <div class="footer-content">
1223
- <div class="footer-brand">GinStudio Skills v1.0.0</div>
1223
+ <div class="footer-brand">GinStudio Skills v1.0.1</div>
1224
1224
  <div class="footer-links">
1225
1225
  <a href="https://www.npmjs.com/package/gin-skills" target="_blank" rel="noopener">npm</a>
1226
- <a href="https://gitlab.com/ginstudio/skills" target="_blank" rel="noopener">GitLab</a>
1226
+ <a href="https://github.com/vuduynhiennn/ginskills" target="_blank" rel="noopener">GitHub</a>
1227
1227
  <a href="#features">Features</a>
1228
1228
  <a href="#skills">Skills</a>
1229
1229
  <a href="#agents">Agents</a>
@@ -1248,12 +1248,14 @@
1248
1248
  { name: 'mobile-app-review', desc: 'Mobile App Store Review Checklist: Comprehensive pre-submission audit for Apple App Store and Google Play Store.', color: 'var(--cyan)' },
1249
1249
  { name: 'mongodb', desc: 'MongoDB & Mongoose Best Practices: Production patterns for schema design, indexing, aggregation pipelines, transactions, connection management, and...', color: 'var(--green)' },
1250
1250
  { name: 'nestjs-architecture', desc: 'NestJS Feature-Based Architecture: Production patterns for organizing NestJS backends — feature modules, core infrastructure, shared utilities, gua...', color: 'var(--rose)' },
1251
- { name: 'react-fsd-architecture', desc: 'Feature-Sliced Design (FSD) Architecture: Architectural methodology for organizing frontend projects by business features — layers, slices, segment...', color: 'var(--purple)' },
1252
- { name: 'react-native-expo', desc: 'React Native Expo (Sty AI Mobile): Production patterns for the Sty AI React Native appExpo SDK 54, Expo Router v5, React Query v5, Zustand v5, R...', color: 'var(--amber)' },
1253
- { name: 'react-query', desc: 'TanStack React Query Best Practices: Comprehensive guide for writing production-quality React Query codequery keys, mutations, caching, optimist...', color: 'var(--blue)' },
1254
- { name: 'review-code', desc: 'Code Review: Comprehensive code review and quality analysis for fullstack monorepos (NestJS backend, Next.js frontend, React Native mobile).', color: 'var(--cyan)' },
1255
- { name: 'security-scanner', desc: 'Security Scanner: Comprehensive security audit for fullstack monoreposNestJS backend, Next.js frontend, and React Native mobile app.', color: 'var(--green)' },
1256
- { name: 'ui-ux-pro-max', desc: 'UI/UX design intelligence.', color: 'var(--rose)' },
1251
+ { name: 'openclaw-builder', desc: 'Guide for setting up, configuring, and extending OpenClaw — an AI gateway for connecting LLM agents to messaging channels (Telegram, Discord, Whats...', color: 'var(--purple)' },
1252
+ { name: 'react-fsd-architecture', desc: 'Feature-Sliced Design (FSD) Architecture: Architectural methodology for organizing frontend projects by business featureslayers, slices, segment...', color: 'var(--amber)' },
1253
+ { name: 'react-native-expo', desc: 'React Native Expo (Sty AI Mobile): Production patterns for the Sty AI React Native appExpo SDK 54, Expo Router v5, React Query v5, Zustand v5, R...', color: 'var(--blue)' },
1254
+ { name: 'react-native-performance', desc: 'React Native Performance Optimization: Comprehensive guide rendering, memory leaks, bundle size, startup, animations, navigation, algorithms, and...', color: 'var(--cyan)' },
1255
+ { name: 'react-query', desc: 'TanStack React Query Best Practices: Comprehensive guide for writing production-quality React Query code query keys, mutations, caching, optimist...', color: 'var(--green)' },
1256
+ { name: 'review-code', desc: 'Code Review: Comprehensive code review and quality analysis for fullstack monorepos (NestJS backend, Next.js frontend, React Native mobile).', color: 'var(--rose)' },
1257
+ { name: 'security-scanner', desc: 'Security Scanner: Comprehensive security audit for fullstack monorepos — NestJS backend, Next.js frontend, and React Native mobile app.', color: 'var(--purple)' },
1258
+ { name: 'ui-ux-pro-max', desc: 'UI/UX design intelligence.', color: 'var(--amber)' },
1257
1259
  ];
1258
1260
  /* /AUTO:SKILLS_DATA */
1259
1261
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gin-skills",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Install GinStudio skills and agents for Claude Code",
5
5
  "homepage": "https://skills.ginstudio.asia",
6
6
  "repository": {
@@ -16,11 +16,17 @@
16
16
  ],
17
17
  "license": "MIT",
18
18
  "type": "module",
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
19
22
  "scripts": {
20
23
  "gen-readme": "node scripts/gen-readme.mjs",
21
24
  "check-upstream": "node scripts/check-upstream.mjs",
22
25
  "deploy": "npx wrangler pages deploy landing --project-name ginskill --branch main",
23
- "prepublishOnly": "node scripts/gen-readme.mjs"
26
+ "prepublishOnly": "npm version patch --no-git-tag-version && node scripts/gen-readme.mjs",
27
+ "postpublish": "git add -A && git commit -m \"chore: release v$(node -p \"require('./package.json').version\")\" && git tag v$(node -p \"require('./package.json').version\") && git push && git push --tags && npm run deploy",
28
+ "release:minor": "npm version minor --no-git-tag-version && npm publish",
29
+ "release:major": "npm version major --no-git-tag-version && npm publish"
24
30
  },
25
31
  "bin": {
26
32
  "gin-skills": "bin/cli.js"
@@ -0,0 +1,115 @@
1
+ ---
2
+ name: openclaw-builder
3
+ description: |
4
+ Guide for setting up, configuring, and extending OpenClaw — an AI gateway for connecting LLM agents to messaging channels (Telegram, Discord, WhatsApp, Signal, etc.), automation (cron, webhooks, heartbeat), browser control, skills, and multi-agent workflows.
5
+ - MANDATORY TRIGGERS: setup openclaw, configure openclaw, install openclaw, openclaw telegram, openclaw discord, openclaw channel, openclaw gateway, openclaw cron, openclaw webhook, openclaw heartbeat, openclaw skills, openclaw agent, openclaw browser, openclaw memory, openclaw session, how to use openclaw, openclaw config, add skill to openclaw, install skill openclaw, openclaw mcp, openclaw acp, openclaw plugin, extend openclaw, openclaw builder, multi-agent openclaw, openclaw model, openclaw api key, openclaw anthropic, openclaw openai, dm scope, session isolation, openclaw security, openclaw exec, openclaw elevated, openclaw sandbox, openclaw remote, openclaw tailscale, openclaw vps, openclaw slash commands, openclaw /new, openclaw /status, openclaw directive
6
+ - Use this skill when the user wants to: install/setup OpenClaw, connect a messaging channel, configure the gateway, set up automation, add skills or agents, work with ACP/plugins, set up multi-agent routing, or troubleshoot OpenClaw issues.
7
+ argument-hint: "[topic: getting-started | channels | automation | gateway | skills | acp | multi-agent | browser | memory | cli | plugins]"
8
+ ---
9
+
10
+ # OpenClaw Builder
11
+
12
+ Fetch live docs or load local guides based on what the user needs.
13
+
14
+ ## Tutorial Routing
15
+
16
+ Run this to load the relevant guide:
17
+
18
+ ```bash
19
+ cat skills/skills/openclaw-builder/docs/$TOPIC
20
+ ```
21
+
22
+ Or fetch live docs from openclaw.ai:
23
+
24
+ ```bash
25
+ python3 skills/skills/openclaw-builder/scripts/fetch-docs.py <page-path>
26
+ ```
27
+
28
+ ---
29
+
30
+ ## Local Guides (bundled)
31
+
32
+ | Topic | File | When to use |
33
+ |-------|------|-------------|
34
+ | Adding skills | `docs/skills-guide.md` | User wants to install/add/enable a skill |
35
+ | ACP setup | `docs/acp-guide.md` | User wants to connect an IDE or use ACP protocol |
36
+ | Multi-agent | `docs/multi-agent-guide.md` | User wants multiple agents, routing, or personas |
37
+ | Automation (cron/heartbeat) | `docs/automation-guide.md` | User wants scheduled tasks, reminders, or heartbeat |
38
+ | Hooks | `docs/hooks-guide.md` | User wants event-driven automation, custom hooks |
39
+ | Plugins | `docs/plugins-guide.md` | User wants to install/create plugins, add channels |
40
+ | Workspace & Memory | `docs/workspace-memory-guide.md` | User asks about memory, workspace files, MEMORY.md |
41
+ | Gateway config | `docs/config-guide.md` | User wants to configure openclaw.json, channels, tools |
42
+ | Channels setup | `docs/channels-guide.md` | User wants to setup Telegram, Discord, WhatsApp, Signal |
43
+ | Models & Auth | `docs/models-auth-guide.md` | User wants to set API keys, model providers, DM scope |
44
+ | Browser control | `docs/browser-guide.md` | User wants to use/configure browser automation |
45
+ | Webhooks | `docs/webhooks-guide.md` | User wants external HTTP triggers, GitHub/Gmail webhooks |
46
+ | Sandboxing | `docs/sandboxing-guide.md` | User wants Docker isolation for agent tools |
47
+ | Security | `docs/security-guide.md` | User asks about security, hardening, audit, secrets |
48
+ | Slash commands | `docs/commands-guide.md` | User asks about /commands, directives, /think, /model |
49
+ | Remote gateway | `docs/remote-gateway-guide.md` | User wants Tailscale, VPS, Docker, remote access |
50
+ | Exec & Elevated | `docs/exec-guide.md` | User wants exec tool, elevated mode, bash, approvals |
51
+
52
+ **Load a local guide:**
53
+ ```bash
54
+ cat skills/skills/openclaw-builder/docs/skills-guide.md
55
+ cat skills/skills/openclaw-builder/docs/acp-guide.md
56
+ cat skills/skills/openclaw-builder/docs/multi-agent-guide.md
57
+ cat skills/skills/openclaw-builder/docs/automation-guide.md
58
+ cat skills/skills/openclaw-builder/docs/hooks-guide.md
59
+ cat skills/skills/openclaw-builder/docs/plugins-guide.md
60
+ cat skills/skills/openclaw-builder/docs/workspace-memory-guide.md
61
+ cat skills/skills/openclaw-builder/docs/config-guide.md
62
+ cat skills/skills/openclaw-builder/docs/channels-guide.md
63
+ cat skills/skills/openclaw-builder/docs/models-auth-guide.md
64
+ cat skills/skills/openclaw-builder/docs/browser-guide.md
65
+ cat skills/skills/openclaw-builder/docs/webhooks-guide.md
66
+ cat skills/skills/openclaw-builder/docs/sandboxing-guide.md
67
+ cat skills/skills/openclaw-builder/docs/security-guide.md
68
+ cat skills/skills/openclaw-builder/docs/commands-guide.md
69
+ cat skills/skills/openclaw-builder/docs/remote-gateway-guide.md
70
+ cat skills/skills/openclaw-builder/docs/exec-guide.md
71
+ ```
72
+
73
+ ---
74
+
75
+ ## Live Docs Pages (fetch-docs.py)
76
+
77
+ For anything not covered by local guides, fetch fresh from docs.openclaw.ai:
78
+
79
+ | Topic | Page path |
80
+ |-------|-----------|
81
+ | Getting started | `start/getting-started` |
82
+ | All docs index | `index` |
83
+ | Gateway config | `gateway/configuration` |
84
+ | Gateway config reference | `gateway/configuration-reference` |
85
+ | Telegram | `channels/telegram` |
86
+ | Discord | `channels/discord` |
87
+ | WhatsApp | `channels/whatsapp` |
88
+ | Signal | `channels/signal` |
89
+ | Slack | `channels/slack` |
90
+ | Cron jobs | `automation/cron-jobs` |
91
+ | Webhooks | `automation/webhook` |
92
+ | Heartbeat | `gateway/heartbeat` |
93
+ | Hooks | `automation/hooks` |
94
+ | Skills system | `tools/skills` |
95
+ | Skills config | `tools/skills-config` |
96
+ | ClawHub | `tools/clawhub` |
97
+ | Plugins | `tools/plugin` |
98
+ | ACP CLI | `cli/acp` |
99
+ | Agent runtime | `concepts/agent` |
100
+ | Memory | `concepts/memory` |
101
+ | Browser tool | `cli/browser` |
102
+ | Session management | `concepts/session` |
103
+ | Channels index | `channels/index` |
104
+
105
+ For unknown topics: fetch `index` first to discover the right page.
106
+
107
+ ---
108
+
109
+ ## Workflow
110
+
111
+ 1. Identify what the user wants (setup / extend / troubleshoot)
112
+ 2. Check local guides first — faster than fetching
113
+ 3. If not covered → fetch live docs with `fetch-docs.py`
114
+ 4. Guide step-by-step based on content
115
+ 5. Verify: `openclaw gateway status` or `openclaw doctor`
@@ -0,0 +1,117 @@
1
+ # ACP — Agent Client Protocol
2
+
3
+ ## What is ACP?
4
+
5
+ ACP (Agent Client Protocol) is how IDEs and editors connect to the OpenClaw Gateway. It bridges prompts from an IDE over stdio → Gateway over WebSocket. OpenClaw maps ACP sessions to Gateway session keys.
6
+
7
+ Reference: https://agentclientprotocol.com
8
+
9
+ ## How It Works
10
+
11
+ ```
12
+ IDE/Editor → openclaw acp (stdio) → OpenClaw Gateway (WebSocket) → Agent
13
+ ```
14
+
15
+ ACP does not pick agents directly — it routes by Gateway session key.
16
+
17
+ ## Basic Usage
18
+
19
+ ```bash
20
+ # Connect to local Gateway
21
+ openclaw acp
22
+
23
+ # Connect to remote Gateway
24
+ openclaw acp --url wss://gateway-host:18789 --token <token>
25
+
26
+ # Use token file (safer — token not visible in process list)
27
+ openclaw acp --url wss://gateway-host:18789 --token-file ~/.openclaw/gateway.token
28
+
29
+ # Attach to a specific agent session
30
+ openclaw acp --session agent:main:main
31
+ openclaw acp --session agent:design:main
32
+
33
+ # Attach by label
34
+ openclaw acp --session-label "support inbox"
35
+ ```
36
+
37
+ ## Targeting Agents
38
+
39
+ Use agent-scoped session keys:
40
+
41
+ ```bash
42
+ openclaw acp --session agent:<agentId>:main
43
+ ```
44
+
45
+ Examples:
46
+ - `agent:main:main` — default agent
47
+ - `agent:coding:main` — agent named "coding"
48
+ - `agent:qa:bug-123` — custom session thread
49
+
50
+ ## Editor Setup
51
+
52
+ ### Zed
53
+
54
+ Add to `~/.config/zed/settings.json`:
55
+
56
+ ```json
57
+ {
58
+ "agent_servers": {
59
+ "OpenClaw ACP": {
60
+ "type": "custom",
61
+ "command": "openclaw",
62
+ "args": ["acp"],
63
+ "env": {}
64
+ }
65
+ }
66
+ }
67
+ ```
68
+
69
+ Target specific agent:
70
+
71
+ ```json
72
+ {
73
+ "agent_servers": {
74
+ "OpenClaw ACP": {
75
+ "type": "custom",
76
+ "command": "openclaw",
77
+ "args": ["acp", "--url", "wss://gateway-host:18789", "--token-file", "~/.openclaw/gateway.token", "--session", "agent:coding:main"],
78
+ "env": {}
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ ### Claude Code / Codex via sessions_spawn
85
+
86
+ From within an OpenClaw agent session, spawn a coding agent via ACP:
87
+
88
+ ```
89
+ sessions_spawn(runtime="acp", agentId="<acp-agent-id>", task="...", thread=true, mode="session")
90
+ ```
91
+
92
+ This is the recommended way to use Claude Code or Codex inside OpenClaw — no manual ACP setup needed.
93
+
94
+ ## Debug / Test
95
+
96
+ ```bash
97
+ # Interactive ACP client (test without an IDE)
98
+ openclaw acp client
99
+
100
+ # Point at remote Gateway
101
+ openclaw acp client --server-args --url wss://gateway-host:18789 --token-file ~/.openclaw/gateway.token
102
+ ```
103
+
104
+ ## Session Mapping
105
+
106
+ | Flag | Behavior |
107
+ |------|----------|
108
+ | (none) | Isolated session with `acp:<uuid>` prefix |
109
+ | `--session <key>` | Use specific Gateway session key |
110
+ | `--session-label <label>` | Resolve existing session by label |
111
+ | `--reset-session` | Fresh session id for same key |
112
+
113
+ ## Security Notes
114
+
115
+ - Prefer `--token-file` over `--token` (token visible in process list)
116
+ - Use env vars: `OPENCLAW_GATEWAY_TOKEN`, `OPENCLAW_GATEWAY_PASSWORD`
117
+ - ACP child processes receive `OPENCLAW_SHELL=acp` for context-specific rules
@@ -0,0 +1,135 @@
1
+ # Automation — Cron Jobs & Heartbeat
2
+
3
+ ## Cron vs Heartbeat — When to Use Each
4
+
5
+ | | Cron | Heartbeat |
6
+ |---|---|---|
7
+ | Timing | Exact schedule | Approximate interval |
8
+ | Context | Isolated session (no history) | Main session (has context) |
9
+ | Use case | Precise tasks, background chores | Proactive check-ins, inbox scans |
10
+ | Config | `openclaw cron add ...` | `agents.defaults.heartbeat` |
11
+
12
+ ## Heartbeat
13
+
14
+ Runs periodic agent turns in the **main session** — agent checks for anything needing attention.
15
+
16
+ ### Quick Config
17
+
18
+ ```json5
19
+ // ~/.openclaw/openclaw.json
20
+ {
21
+ agents: {
22
+ defaults: {
23
+ heartbeat: {
24
+ every: "30m", // interval (0m to disable)
25
+ target: "last", // deliver to last used channel (default: "none")
26
+ lightContext: true, // only inject HEARTBEAT.md (faster, cheaper)
27
+ activeHours: { start: "08:00", end: "23:00" }, // optional time window
28
+ }
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ ### HEARTBEAT.md
35
+
36
+ Create in workspace root — agent reads this every heartbeat:
37
+
38
+ ```markdown
39
+ # Heartbeat checklist
40
+
41
+ - Quick scan: anything urgent in inbox?
42
+ - Calendar events in next 2 hours?
43
+ - If nothing: reply HEARTBEAT_OK
44
+ ```
45
+
46
+ **Rules:**
47
+ - Agent replies `HEARTBEAT_OK` if nothing to do (stripped, not delivered)
48
+ - Agent sends alert text if something needs attention
49
+ - Keep file small to avoid token bloat
50
+ - Empty file = heartbeat skipped (saves API calls)
51
+
52
+ ### Manual Wake
53
+
54
+ ```bash
55
+ openclaw system event --text "Check urgent follow-ups" --mode now
56
+ ```
57
+
58
+ ## Cron Jobs
59
+
60
+ Runs tasks on a schedule — isolated sessions, full agent turns.
61
+
62
+ ### Quick Start
63
+
64
+ ```bash
65
+ # One-shot reminder in 20 minutes
66
+ openclaw cron add \
67
+ --name "Reminder" \
68
+ --at "20m" \
69
+ --session main \
70
+ --system-event "Reminder: check expense reports" \
71
+ --wake now \
72
+ --delete-after-run
73
+
74
+ # Recurring daily job — deliver to Telegram
75
+ openclaw cron add \
76
+ --name "Morning brief" \
77
+ --cron "0 7 * * *" \
78
+ --tz "Asia/Ho_Chi_Minh" \
79
+ --session isolated \
80
+ --message "Summarize overnight updates." \
81
+ --announce \
82
+ --channel telegram \
83
+ --to "YOUR_CHAT_ID"
84
+
85
+ # List all jobs
86
+ openclaw cron list
87
+
88
+ # Run a job immediately
89
+ openclaw cron run <job-id>
90
+ ```
91
+
92
+ ### Schedule Types
93
+
94
+ | Type | Example | Description |
95
+ |------|---------|-------------|
96
+ | `--at "20m"` | In 20 minutes | One-shot relative |
97
+ | `--at "2026-03-08T09:00:00Z"` | Exact datetime | One-shot absolute |
98
+ | `--cron "0 7 * * *"` | Every day 7am | Cron expression |
99
+
100
+ ### Session Targets
101
+
102
+ - `--session main` — runs during next heartbeat (use `--system-event`)
103
+ - `--session isolated` — dedicated isolated session (use `--message`)
104
+
105
+ ### Delivery Options
106
+
107
+ ```bash
108
+ --announce # deliver to channel
109
+ --channel telegram # which channel
110
+ --to "CHAT_ID" # recipient
111
+
112
+ # Webhook instead
113
+ --delivery webhook --to "https://your-webhook.com"
114
+ ```
115
+
116
+ ### Management
117
+
118
+ ```bash
119
+ openclaw cron list # list all jobs
120
+ openclaw cron run <id> # run now
121
+ openclaw cron edit <id> --message "new prompt"
122
+ openclaw cron runs --id <id> # view run history
123
+ openclaw cron remove <id>
124
+ ```
125
+
126
+ ### Config (openclaw.json)
127
+
128
+ ```json5
129
+ {
130
+ cron: {
131
+ enabled: true,
132
+ sessionRetention: "24h", // keep isolated run sessions for 24h
133
+ }
134
+ }
135
+ ```