gooseworks 0.2.10 → 0.3.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.
package/README.md CHANGED
@@ -149,6 +149,45 @@ Standalone skills installed with `--with` skip the catalog search step. After `n
149
149
  | Enrichment | Contact enrichment, company research, tech stack |
150
150
  | Monitoring | Newsletter scanning, review site tracking |
151
151
 
152
+ ## Ads (`goose-ads`)
153
+
154
+ Alongside the GTM `gooseworks` skill, the CLI installs a **separate** `goose-ads` entry
155
+ skill for ads — **create** ad creative (remix a static ad template into a branded ad, or
156
+ read a brand for ads) and **analyze** ad performance (Meta/Google campaign diagnostics,
157
+ creative fatigue, CAC & lead quality, competitor ad intelligence, ad angles & hooks). The
158
+ `gooseworks` parent router also hands ad requests to it. Claude auto-loads whichever skill
159
+ matches the task; the two are domain-scoped and never merged.
160
+
161
+ > Renamed from `ads-remix`. Older installs get the stale `ads-remix` skill cleaned up
162
+ > automatically on the next `install`.
163
+
164
+ ```bash
165
+ gooseworks install --claude --mcp
166
+ ```
167
+
168
+ Then in Claude Code: *"remix template `<id>` for `<your-site>`"*.
169
+
170
+ **The GooseWorks MCP server is REQUIRED for ads.** The skill is a thin wrapper over the
171
+ backend's single ad-generation workflow — the same one the GooseWorks ads app uses — reached
172
+ through the `gooseworks` MCP tools (`get_brand_kit`, `submit_remix_batch`, `get_remix_batch`,
173
+ `regenerate_creative`, …). The skill does NOT generate images, drive FAL, or manage renders
174
+ itself; the backend runs the pipeline and stores results. `install` registers the MCP server
175
+ with `--mcp` (or `--all`) and verifies it's reachable; if it isn't, you'll see a warning — the
176
+ ads flow will fail without MCP. Re-run `gooseworks install --claude --mcp` if needed.
177
+
178
+ Generation is billed to your GooseWorks credits **server-side**: `submit_remix_batch` reserves
179
+ the estimated cost up front and bills only the images that complete. There's no separate
180
+ ad-credit balance. Use `estimate_remix_batch` (cost preview) and `gooseworks credits` (balance).
181
+
182
+ ### Keeping skills up to date
183
+
184
+ - **Entry skills** (`gooseworks`, `goose-ads`) are vendored in the CLI. They're (re)installed
185
+ on `install`/`update`, and **refreshed on `login`** — but only when their content actually
186
+ changed (a content-hash stamp skips unchanged ones, so re-running is cheap). Bump the CLI
187
+ (`npx gooseworks@latest …`) to get new entry-skill content.
188
+ - **Recipe skills** (e.g. ad-analytics like `meta-ads-analyzer`) are **fetched live** from
189
+ goose-skills each time they're used, so they're always current — nothing to update.
190
+
152
191
  ## File Layout
153
192
 
154
193
  ### Credentials
@@ -163,7 +202,11 @@ Standalone skills installed with `--with` skip the catalog search step. After `n
163
202
  ```
164
203
  ~/.agents/skills/
165
204
  ├── gooseworks/
166
- └── SKILL.md # GooseWorks skill — teaches your agent to use 100+ data tools
205
+ ├── SKILL.md # GTM skill — teaches your agent to use 100+ data tools
206
+ │ └── .gooseworks-version # content-hash stamp (freshness check; skip rewrite if unchanged)
207
+ ├── goose-ads/
208
+ │ ├── SKILL.md # Ads entry skill (create + analyze; creation requires MCP)
209
+ │ └── .gooseworks-version
167
210
  └── goose-graphics/
168
211
  └── SKILL.md # Optional standalone skill installed with --with
169
212
  ```
@@ -173,6 +216,7 @@ Standalone skills installed with `--with` skip the catalog search step. After `n
173
216
  ```
174
217
  ~/.claude/skills/
175
218
  ├── gooseworks → ~/.agents/skills/gooseworks
219
+ ├── goose-ads → ~/.agents/skills/goose-ads
176
220
  └── goose-graphics → ~/.agents/skills/goose-graphics
177
221
  ```
178
222
 
@@ -7,5 +7,15 @@
7
7
  * Returns true if configured, false if skipped (missing mcp_server_url).
8
8
  */
9
9
  export declare function configureClaudeMcp(): boolean;
10
+ /**
11
+ * Verify the GooseWorks MCP server is reachable (its unauthenticated /health
12
+ * endpoint). Ads creation REQUIRES MCP, so install surfaces this loudly. Returns
13
+ * { ok } — never throws. Confirms reachability, not token validity (that surfaces
14
+ * on the first tool call).
15
+ */
16
+ export declare function verifyMcpReachable(timeoutMs?: number): Promise<{
17
+ ok: boolean;
18
+ error?: string;
19
+ }>;
10
20
  export declare function removeClaudeMcp(): void;
11
21
  //# sourceMappingURL=claude-mcp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"claude-mcp.d.ts","sourceRoot":"","sources":["../../src/agents/claude-mcp.ts"],"names":[],"mappings":"AA6CA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAuB5C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAiBtC"}
1
+ {"version":3,"file":"claude-mcp.d.ts","sourceRoot":"","sources":["../../src/agents/claude-mcp.ts"],"names":[],"mappings":"AA6CA;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAuB5C;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CAAC,SAAS,SAAO,GAAG,OAAO,CAAC;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBnG;AAED,wBAAgB,eAAe,IAAI,IAAI,CAiBtC"}
@@ -34,6 +34,7 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.configureClaudeMcp = configureClaudeMcp;
37
+ exports.verifyMcpReachable = verifyMcpReachable;
37
38
  exports.removeClaudeMcp = removeClaudeMcp;
38
39
  const fs = __importStar(require("fs"));
39
40
  const path = __importStar(require("path"));
@@ -96,6 +97,36 @@ function configureClaudeMcp() {
96
97
  writeConfig(config);
97
98
  return true;
98
99
  }
100
+ /**
101
+ * Verify the GooseWorks MCP server is reachable (its unauthenticated /health
102
+ * endpoint). Ads creation REQUIRES MCP, so install surfaces this loudly. Returns
103
+ * { ok } — never throws. Confirms reachability, not token validity (that surfaces
104
+ * on the first tool call).
105
+ */
106
+ async function verifyMcpReachable(timeoutMs = 5000) {
107
+ const creds = (0, credentials_1.getCredentials)();
108
+ if (!creds?.mcp_server_url)
109
+ return { ok: false, error: 'no mcp_server_url in credentials' };
110
+ let healthUrl;
111
+ try {
112
+ healthUrl = new URL('/health', creds.mcp_server_url).toString();
113
+ }
114
+ catch {
115
+ return { ok: false, error: `invalid mcp_server_url: ${creds.mcp_server_url}` };
116
+ }
117
+ const controller = new AbortController();
118
+ const timer = setTimeout(() => controller.abort(), timeoutMs);
119
+ try {
120
+ const res = await fetch(healthUrl, { signal: controller.signal });
121
+ return res.ok ? { ok: true } : { ok: false, error: `health check returned ${res.status}` };
122
+ }
123
+ catch (err) {
124
+ return { ok: false, error: err?.message || 'unreachable' };
125
+ }
126
+ finally {
127
+ clearTimeout(timer);
128
+ }
129
+ }
99
130
  function removeClaudeMcp() {
100
131
  try {
101
132
  if (!fs.existsSync(CLAUDE_CONFIG_PATH))
@@ -1 +1 @@
1
- {"version":3,"file":"claude-mcp.js","sourceRoot":"","sources":["../../src/agents/claude-mcp.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqDA,gDAuBC;AAED,0CAiBC;AA/FD,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,qDAAqD;AAErD;;;GAGG;AAEH,MAAM,kBAAkB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,cAAc,CAAC,CAAC;AAcnE,SAAS,UAAU;IACjB,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAAE,OAAO,EAAE,CAAC;QAClD,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC;QACzD,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE;YAAE,OAAO,EAAE,CAAC;QAC3B,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAiB,CAAC;IACzC,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,SAAS,WAAW,CAAC,MAAoB;IACvC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAAC,M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7B,IAAI,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC;YAAE,OAAO;QAC/C,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,MAAM,CAAC,UAAU,EAAE,UAAU,EAAE,CAAC;YAClC,OAAO,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC;YACpC,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QACD,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;YAC5C,OAAO,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;YAC7C,OAAO,GAAG,IAAI,CAAC;QACjB,CAAC;QACD,IAAI,OAAO;YAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,cAAc;IAChB,CAAC;AACH,CAAC"}
@@ -1,4 +1,10 @@
1
1
  export declare function getCodexSkillsDir(): string;
2
2
  export declare function configureCodex(): number;
3
3
  export declare function removeCodex(): void;
4
+ /**
5
+ * Add (or overwrite) the GooseWorks MCP entry in ~/.codex/config.toml.
6
+ * Stores the same user-scoped bearer token shape used by Claude/Cursor config,
7
+ * so Codex Desktop can use it without relying on a launcher env var.
8
+ */
9
+ export declare function configureCodexMcp(): boolean;
4
10
  //# sourceMappingURL=codex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/agents/codex.ts"],"names":[],"mappings":"AAQA,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,cAAc,IAAI,MAAM,CA+CvC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAgBlC"}
1
+ {"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/agents/codex.ts"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,IAAI,MAAM,CAE1C;AAED,wBAAgB,cAAc,IAAI,MAAM,CA+CvC;AAED,wBAAgB,WAAW,IAAI,IAAI,CAgBlC;AAwCD;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAiB3C"}
@@ -36,12 +36,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.getCodexSkillsDir = getCodexSkillsDir;
37
37
  exports.configureCodex = configureCodex;
38
38
  exports.removeCodex = removeCodex;
39
+ exports.configureCodexMcp = configureCodexMcp;
39
40
  const fs = __importStar(require("fs"));
40
41
  const path = __importStar(require("path"));
41
42
  const os = __importStar(require("os"));
43
+ const credentials_1 = require("../auth/credentials");
42
44
  const installer_1 = require("../skills/installer");
43
45
  const names_1 = require("../skills/names");
44
46
  const CODEX_SKILLS_DIR = path.join(os.homedir(), '.codex', 'skills');
47
+ const CODEX_CONFIG_PATH = path.join(os.homedir(), '.codex', 'config.toml');
45
48
  function getCodexSkillsDir() {
46
49
  return CODEX_SKILLS_DIR;
47
50
  }
@@ -110,4 +113,58 @@ function removeCodex() {
110
113
  }
111
114
  }
112
115
  }
116
+ function normalizeMcpUrl(base) {
117
+ const stripped = base.replace(/\/$/, '');
118
+ return stripped.endsWith('/mcp') ? stripped : `${stripped}/mcp`;
119
+ }
120
+ function tomlString(value) {
121
+ return JSON.stringify(value);
122
+ }
123
+ function readCodexConfig() {
124
+ try {
125
+ if (!fs.existsSync(CODEX_CONFIG_PATH))
126
+ return '';
127
+ return fs.readFileSync(CODEX_CONFIG_PATH, 'utf-8');
128
+ }
129
+ catch {
130
+ return '';
131
+ }
132
+ }
133
+ function stripTomlTable(raw, tableName) {
134
+ const lines = raw.split(/\r?\n/);
135
+ const kept = [];
136
+ let skipping = false;
137
+ for (const line of lines) {
138
+ const header = line.match(/^\s*\[([^\]]+)\]\s*$/);
139
+ if (header) {
140
+ const name = header[1].trim();
141
+ skipping = name === tableName || name.startsWith(`${tableName}.`);
142
+ }
143
+ if (!skipping) {
144
+ kept.push(line);
145
+ }
146
+ }
147
+ return kept.join('\n').replace(/\n{3,}/g, '\n\n').trimEnd();
148
+ }
149
+ /**
150
+ * Add (or overwrite) the GooseWorks MCP entry in ~/.codex/config.toml.
151
+ * Stores the same user-scoped bearer token shape used by Claude/Cursor config,
152
+ * so Codex Desktop can use it without relying on a launcher env var.
153
+ */
154
+ function configureCodexMcp() {
155
+ const creds = (0, credentials_1.getCredentials)();
156
+ if (!creds?.mcp_server_url || !creds.api_key)
157
+ return false;
158
+ const configDir = path.dirname(CODEX_CONFIG_PATH);
159
+ fs.mkdirSync(configDir, { recursive: true });
160
+ const existing = stripTomlTable(readCodexConfig(), 'mcp_servers.gooseworks');
161
+ const block = [
162
+ '[mcp_servers.gooseworks]',
163
+ `url = ${tomlString(normalizeMcpUrl(creds.mcp_server_url))}`,
164
+ `http_headers = { Authorization = ${tomlString(`Bearer ${creds.api_key}`)} }`,
165
+ ].join('\n');
166
+ const next = `${existing ? `${existing}\n\n` : ''}${block}\n`;
167
+ fs.writeFileSync(CODEX_CONFIG_PATH, next, { mode: 0o600 });
168
+ return true;
169
+ }
113
170
  //# sourceMappingURL=codex.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/agents/codex.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,8CAEC;AAED,wCA+CC;AAED,kCAgBC;AA7ED,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,mDAAwD;AACxD,2CAA2D;AAE3D,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;AAErE,SAAgB,iBAAiB;IAC/B,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,SAAgB,cAAc;IAC5B,MAAM,UAAU,GAAG,IAAA,6BAAiB,GAAE,CAAC;IACvC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/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CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,OAAO,EAAE,CAAC;AAC9D,CAAC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB;IAC/B,MAAM,KAAK,GAAG,IAAA,4BAAc,GAAE,CAAC;IAC/B,IAAI,CAAC,KAAK,EAAE,cAAc,IAAI,CAAC,KAAK,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAE3D,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAClD,EAAE,CAAC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAE7C,MAAM,QAAQ,GAAG,cAAc,CAAC,eAAe,EAAE,EAAE,wBAAwB,CAAC,CAAC;IAC7E,MAAM,KAAK,GAAG;QACZ,0BAA0B;QAC1B,SAAS,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,EAAE;QAC5D,oCAAoC,UAAU,CAAC,UAAU,KAAK,CAAC,OAAO,EAAE,CAAC,IAAI;KAC9E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,MAAM,IAAI,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,QAAQ,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAE9D,EAAE,CAAC,aAAa,CAAC,iBAAiB,EAAE,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3D,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,wBAAgB,oBAAoB,IAAI,OAAO,CA2G9C;AAED,eAAO,MAAM,cAAc,SAAyB,CAAC"}
1
+ {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBpC,wBAAgB,oBAAoB,IAAI,OAAO,CAoJ9C;AAED,eAAO,MAAM,cAAc,SAAyB,CAAC"}
@@ -74,12 +74,12 @@ Examples:
74
74
  logger.step(1, 3, 'Authenticating...');
75
75
  const creds = await (0, login_1.ensureLoggedIn)(opts.apiBase);
76
76
  logger.success(`Logged in as ${creds.email}`);
77
- // Step 2: Install master skill (clean old skills first)
78
- logger.step(2, 3, 'Installing GooseWorks skill...');
77
+ // Step 2: Install entry skills (clean old skills first)
78
+ logger.step(2, 3, 'Installing GooseWorks skills...');
79
79
  (0, installer_1.removeAllSkills)();
80
- const masterContent = (0, master_skill_1.getMasterSkillContent)();
81
- (0, installer_1.installMasterSkill)(masterContent);
82
- logger.success('Installed GooseWorks skill to ~/.agents/skills/gooseworks/');
80
+ for (const r of (0, installer_1.installManagedEntrySkills)((0, master_skill_1.getEntrySkills)(), { force: true })) {
81
+ logger.success(`Installed ${r.name} skill to ~/.agents/skills/${r.name}/`);
82
+ }
83
83
  for (const slug of opts.with || []) {
84
84
  try {
85
85
  logger.info(`Installing standalone skill ${slug}...`);
@@ -109,6 +109,15 @@ Examples:
109
109
  if (wantMcp) {
110
110
  if ((0, claude_mcp_1.configureClaudeMcp)()) {
111
111
  logger.success("Registered 'gooseworks' MCP server in ~/.claude.json");
112
+ // Ads creation REQUIRES a reachable MCP server — verify and fail loud.
113
+ const mcp = await (0, claude_mcp_1.verifyMcpReachable)();
114
+ if (mcp.ok) {
115
+ logger.success('GooseWorks MCP server reachable');
116
+ }
117
+ else {
118
+ logger.warn(`GooseWorks MCP server NOT reachable (${mcp.error}). Ads creation requires it — ` +
119
+ 'restart Claude Code and check your connection; the goose-ads skill will fail without MCP.');
120
+ }
112
121
  }
113
122
  else {
114
123
  logger.info("Skipped MCP (no mcp_server_url in credentials — older backend?)");
@@ -119,6 +128,22 @@ Examples:
119
128
  if (agent === 'codex') {
120
129
  logger.info('Creating symlinks in ~/.codex/skills/');
121
130
  (0, codex_1.configureCodex)();
131
+ if (wantMcp) {
132
+ if ((0, codex_1.configureCodexMcp)()) {
133
+ logger.success("Registered 'gooseworks' MCP server in ~/.codex/config.toml");
134
+ const mcp = await (0, claude_mcp_1.verifyMcpReachable)();
135
+ if (mcp.ok) {
136
+ logger.success('GooseWorks MCP server reachable');
137
+ }
138
+ else {
139
+ logger.warn(`GooseWorks MCP server NOT reachable (${mcp.error}). Ads creation requires it — ` +
140
+ 'restart Codex and check your connection; the goose-ads skill will fail without MCP.');
141
+ }
142
+ }
143
+ else {
144
+ logger.info("Skipped MCP (no mcp_server_url in credentials — older backend?)");
145
+ }
146
+ }
122
147
  logger.success('Codex configured');
123
148
  }
124
149
  if (agent === 'cursor') {
@@ -144,10 +169,22 @@ Examples:
144
169
  }
145
170
  const agentNames = targetAgents.map((a) => a === 'claude' ? 'Claude Code' : a === 'codex' ? 'Codex' : 'Cursor').join(' and ');
146
171
  logger.done(`Setup complete! Open ${agentNames} and try one of these:`);
172
+ logger.info('Data & GTM:');
147
173
  logger.example('/gooseworks find people who know <linkedin-profile-url>');
148
- logger.example('/gooseworks find what <linkedin-profile-url> has been posting about');
149
174
  logger.example('/gooseworks find leads similar to <linkedin-company-url>');
150
175
  logger.example('/gooseworks research <company name>');
176
+ // goose-ads is a vendored entry skill — always installed, so always shown.
177
+ console.log('');
178
+ logger.info('Ads (create, edit & analyze):');
179
+ logger.example('/goose-ads remix template <id-or-url> for <your-product>');
180
+ logger.example('/goose-ads make an ad for <your-product>');
181
+ logger.example('/goose-ads why is my Meta campaign underperforming?');
182
+ // Graphics is a standalone skill — only suggest it if it was installed.
183
+ if ((opts.with || []).includes('goose-graphics')) {
184
+ console.log('');
185
+ logger.info('Graphics:');
186
+ logger.example('/goose-graphics make a chart from <data>');
187
+ }
151
188
  console.log('');
152
189
  });
153
190
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../src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C1B,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;YAClE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,gCAAgC;QACrD,CAAC;QACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,QAAkB;IACzD,OAAO,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,eAAO,MAAM,YAAY,SAmBrB,CAAC;AAEL;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,MAAiB,sDAW9D"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2BpC,eAAO,MAAM,YAAY,SAqBrB,CAAC;AAEL;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,MAAiB,sDAW9D"}
@@ -38,8 +38,31 @@ exports.ensureLoggedIn = ensureLoggedIn;
38
38
  const commander_1 = require("commander");
39
39
  const credentials_1 = require("../auth/credentials");
40
40
  const oauth_server_1 = require("../auth/oauth-server");
41
+ const installer_1 = require("../skills/installer");
42
+ const master_skill_1 = require("../skills/master-skill");
43
+ const claude_1 = require("../agents/claude");
44
+ const detect_1 = require("../agents/detect");
41
45
  const logger = __importStar(require("../utils/logger"));
42
46
  const config_1 = require("../config");
47
+ /**
48
+ * Refresh vendored entry skills on login for users who have already set up
49
+ * (`gooseworks` skill present). This is the "update skills on login": it picks up
50
+ * new or content-changed entry skills (e.g. the goose-ads skill) without
51
+ * rewriting unchanged ones, then re-symlinks Claude so the new skill is visible.
52
+ * Bootstrapping a first-time install stays the job of `gooseworks install`.
53
+ */
54
+ function refreshEntrySkillsOnLogin() {
55
+ if (!(0, installer_1.getInstalledSkills)().includes('gooseworks'))
56
+ return;
57
+ const changed = (0, installer_1.installManagedEntrySkills)((0, master_skill_1.getEntrySkills)())
58
+ .filter((r) => r.action === 'installed')
59
+ .map((r) => r.name);
60
+ if (changed.length === 0)
61
+ return;
62
+ logger.success(`Refreshed skills: ${changed.join(', ')}`);
63
+ if ((0, detect_1.isAgentInstalled)('claude'))
64
+ (0, claude_1.configureClaude)();
65
+ }
43
66
  exports.loginCommand = new commander_1.Command('login')
44
67
  .description('Sign in to GooseWorks with Google')
45
68
  .option('--api-base <url>', 'API base URL', config_1.API_BASE)
@@ -47,12 +70,14 @@ exports.loginCommand = new commander_1.Command('login')
47
70
  const existing = (0, credentials_1.getCredentials)();
48
71
  if (existing) {
49
72
  logger.success(`Already logged in as ${existing.email}`);
73
+ refreshEntrySkillsOnLogin();
50
74
  logger.info('Run "gooseworks logout" first to switch accounts.');
51
75
  return;
52
76
  }
53
77
  try {
54
78
  const result = await (0, oauth_server_1.runOAuthFlow)(opts.apiBase);
55
79
  logger.success(`Logged in as ${result.email}`);
80
+ refreshEntrySkillsOnLogin();
56
81
  }
57
82
  catch (err) {
58
83
  const message = err instanceof Error ? err.message : 'Login failed';
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[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f,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,aAAa,SA+CtB,CAAC"}
1
+ {"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC,eAAO,MAAM,aAAa,SAqDtB,CAAC"}
@@ -52,11 +52,11 @@ exports.updateCommand = new commander_1.Command('update')
52
52
  logger.error('Not logged in. Run "gooseworks login" first.');
53
53
  process.exit(1);
54
54
  }
55
- logger.step(1, 2, 'Updating skill...');
55
+ logger.step(1, 2, 'Updating skills...');
56
56
  (0, installer_1.removeAllSkills)();
57
- const masterContent = (0, master_skill_1.getMasterSkillContent)();
58
- (0, installer_1.installMasterSkill)(masterContent);
59
- logger.success('Updated GooseWorks skill');
57
+ for (const r of (0, installer_1.installManagedEntrySkills)((0, master_skill_1.getEntrySkills)(), { force: true })) {
58
+ logger.success(`Updated ${r.name} skill`);
59
+ }
60
60
  logger.step(2, 2, 'Reconfiguring agents...');
61
61
  if ((0, detect_1.isAgentInstalled)('claude')) {
62
62
  (0, claude_1.configureClaude)();
@@ -70,6 +70,11 @@ exports.updateCommand = new commander_1.Command('update')
70
70
  if ((0, detect_1.isAgentInstalled)('codex')) {
71
71
  (0, codex_1.configureCodex)();
72
72
  logger.success('Codex symlinks updated');
73
+ if (creds.mcp_server_url) {
74
+ if ((0, codex_1.configureCodexMcp)()) {
75
+ logger.success('Codex MCP config refreshed');
76
+ }
77
+ }
73
78
  }
74
79
  if ((0, detect_1.isAgentInstalled)('cursor')) {
75
80
  if ((0, cursor_1.hasExistingCursorMcpEntry)()) {
@@ -1 +1 @@
1
- {"version":3,"file":"update.js","sourceRoot":"","sources":["../../src/commands/update.ts"],"names":[],"mappings":";;;;;;;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,OAAO,CAAC,6BAA6B,CAAC,CAAC;YAChD,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,IAAI,CAAC,uFAAuF,CAAC,CAAC;YACvG,CAAC;QACH,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;QAClF,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;AAClC,CAAC,CAAC,CAAC"}
@@ -1,3 +1,4 @@
1
+ import type { EntrySkill } from './master-skill';
1
2
  export interface InstallStandaloneSkillOptions {
2
3
  onProgress?: (progress: {
3
4
  downloaded: number;
@@ -6,6 +7,22 @@ export interface InstallStandaloneSkillOptions {
6
7
  }
7
8
  export declare function getSkillsBasePath(): string;
8
9
  export declare function installMasterSkill(masterSkillMd: string): void;
10
+ /** True when the entry skill is installed AND its stamp matches `content`. */
11
+ export declare function isEntrySkillFresh(name: string, content: string): boolean;
12
+ /** Write one entry skill + its freshness stamp. */
13
+ export declare function installEntrySkill(skill: EntrySkill): void;
14
+ export interface EntrySkillInstallResult {
15
+ name: string;
16
+ action: 'installed' | 'skipped';
17
+ }
18
+ /**
19
+ * Install all vendored entry skills. With `force` (explicit install/update) each
20
+ * is rewritten unconditionally; without it (e.g. refresh-on-login) only missing
21
+ * or content-changed skills are rewritten — unchanged ones are skipped.
22
+ */
23
+ export declare function installManagedEntrySkills(skills: EntrySkill[], { force }?: {
24
+ force?: boolean;
25
+ }): EntrySkillInstallResult[];
9
26
  export declare function installStandaloneSkill(slug: string, options?: InstallStandaloneSkillOptions): Promise<void>;
10
27
  export declare function getInstalledSkills(): string[];
11
28
  export declare function removeAllSkills(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../../src/skills/installer.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,6BAA6B;IAC5C,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE;QAAE,UAAU,EAAE,MAAM,CAA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wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE,6BAAkC,GAC1C,OAAO,CAAC,IAAI,CAAC,CAoCf;AA0CD,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAS7C;AAED,wBAAgB,eAAe,IAAI,IAAI,CAQtC"}
@@ -35,12 +35,16 @@ var __importStar = (this && this.__importStar) || (function () {
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.getSkillsBasePath = getSkillsBasePath;
37
37
  exports.installMasterSkill = installMasterSkill;
38
+ exports.isEntrySkillFresh = isEntrySkillFresh;
39
+ exports.installEntrySkill = installEntrySkill;
40
+ exports.installManagedEntrySkills = installManagedEntrySkills;
38
41
  exports.installStandaloneSkill = installStandaloneSkill;
39
42
  exports.getInstalledSkills = getInstalledSkills;
40
43
  exports.removeAllSkills = removeAllSkills;
41
44
  const fs = __importStar(require("fs"));
42
45
  const path = __importStar(require("path"));
43
46
  const os = __importStar(require("os"));
47
+ const crypto = __importStar(require("crypto"));
44
48
  const names_1 = require("./names");
45
49
  const SKILLS_BASE = path.join(os.homedir(), '.agents', 'skills');
46
50
  const GOOSE_SKILLS_TREE_URL = 'https://api.github.com/repos/gooseworks-ai/goose-skills/git/trees/main?recursive=1';
@@ -54,6 +58,49 @@ function installMasterSkill(masterSkillMd) {
54
58
  fs.mkdirSync(masterDir, { recursive: true });
55
59
  fs.writeFileSync(path.join(masterDir, 'SKILL.md'), masterSkillMd, 'utf-8');
56
60
  }
61
+ // ── Vendored entry-skill freshness ──────────────────────────────────────────
62
+ // Entry skills (gooseworks, goose-ads) are vendored in the CLI and written to
63
+ // ~/.agents/skills/<name>/. We stamp each install with a content hash so we can
64
+ // skip rewriting an unchanged skill ("already local → don't call") and rewrite
65
+ // only when the vendored content changed ("updated → call again"). Recipe skills
66
+ // are fetched live via `gooseworks fetch`, so they need no stamping.
67
+ const STAMP_FILE = '.gooseworks-version';
68
+ function entryContentHash(content) {
69
+ return crypto.createHash('sha256').update(content, 'utf-8').digest('hex').slice(0, 16);
70
+ }
71
+ /** True when the entry skill is installed AND its stamp matches `content`. */
72
+ function isEntrySkillFresh(name, content) {
73
+ const dir = path.join(SKILLS_BASE, name);
74
+ if (!fs.existsSync(path.join(dir, 'SKILL.md')))
75
+ return false;
76
+ try {
77
+ return fs.readFileSync(path.join(dir, STAMP_FILE), 'utf-8').trim() === entryContentHash(content);
78
+ }
79
+ catch {
80
+ return false;
81
+ }
82
+ }
83
+ /** Write one entry skill + its freshness stamp. */
84
+ function installEntrySkill(skill) {
85
+ const dir = path.join(SKILLS_BASE, skill.name);
86
+ fs.mkdirSync(dir, { recursive: true });
87
+ fs.writeFileSync(path.join(dir, 'SKILL.md'), skill.content, 'utf-8');
88
+ fs.writeFileSync(path.join(dir, STAMP_FILE), entryContentHash(skill.content), 'utf-8');
89
+ }
90
+ /**
91
+ * Install all vendored entry skills. With `force` (explicit install/update) each
92
+ * is rewritten unconditionally; without it (e.g. refresh-on-login) only missing
93
+ * or content-changed skills are rewritten — unchanged ones are skipped.
94
+ */
95
+ function installManagedEntrySkills(skills, { force = false } = {}) {
96
+ return skills.map((skill) => {
97
+ if (!force && isEntrySkillFresh(skill.name, skill.content)) {
98
+ return { name: skill.name, action: 'skipped' };
99
+ }
100
+ installEntrySkill(skill);
101
+ return { name: skill.name, action: 'installed' };
102
+ });
103
+ }
57
104
  async function installStandaloneSkill(slug, options = {}) {
58
105
  if (!/^[a-z0-9][a-z0-9-]*$/.test(slug)) {
59
106
  throw new Error(`invalid skill slug '${slug}'. Use a slug like goose-graphics.`);
@@ -1 +1 @@
1
- {"version":3,"file":"installer.js","sourceRoot":"","sources":["../../src/skills/installer.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,8CAEC;AAED,gDAQC;AAED,wDAuCC;AA0CD,gDASC;AAED,0CAQC;AAzID,uCAAyB;AACzB,2CAA6B;AAC7B,uCAAyB;AACzB,mCAAmD;AAEnD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Q,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,sBAAsB,QAAQ,uBAAuB,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3F,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACnD,CAAC;AAED,SAAS,sBAAsB,CAAC,IAAuB;IACrD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,KAAK,IAAI,IAAI,EAAE,CAAC;QACzB,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC;YAAE,SAAS;QAEzE,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACpC,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACrC,IAAI,IAAI,EAAE,CAAC;YACT,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;IACD,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,IAAI,EAAE,CAAC;AAC3B,CAAC"}
@@ -1,12 +1,53 @@
1
1
  /**
2
- * Returns the master SKILL.md content.
3
- * This is the ONLY skill the CLI installs. It teaches the coding agent
4
- * how to discover and use GooseWorks skills on demand via the
5
- * `gooseworks` CLI commands.
2
+ * The CLI installs two vendored ENTRY skills into ~/.agents/skills/:
3
+ * - `gooseworks` — the PARENT router (getMasterSkillContent): GTM/data toolkit
4
+ * PLUS a domain router that hands ads/graphics/video work to the dedicated
5
+ * `goose-*` skills below.
6
+ * - `goose-ads` — the ads entry/contract (getGooseAdsSkillContent): ad creative
7
+ * (remix, brand research) AND ad analytics/intelligence. Formerly `ads-remix`.
8
+ * Each is a separate Claude Code skill; Claude auto-loads whichever matches the
9
+ * task by its description. They are domain-scoped on purpose — do NOT merge them.
10
+ *
11
+ * Sibling domain skills NOT vendored here (fetched live from goose-skills):
12
+ * - `goose-graphics` — charts/slides/infographics/branded visuals. Installed via
13
+ * `gooseworks install --with goose-graphics` or fetched on demand.
14
+ * - `goose-video` — ad/UGC/talking-head video. Coming soon.
15
+ *
16
+ * Recipe skills (remix-graphic-ad-from-reference, brand-research, meta-ads-analyzer,
17
+ * …) are NOT vendored here — they live in goose-skills and are fetched live on
18
+ * demand via `gooseworks fetch <slug>`, so they're always current.
19
+ */
20
+ export interface EntrySkill {
21
+ /** Install dir name under ~/.agents/skills/ AND the skill `name`. */
22
+ name: string;
23
+ content: string;
24
+ }
25
+ /** Every entry skill the CLI vendors + installs. */
26
+ export declare function getEntrySkills(): EntrySkill[];
27
+ /**
28
+ * Returns the GTM master SKILL.md content (the `gooseworks` entry skill).
29
+ * It teaches the coding agent how to discover and use GooseWorks skills on
30
+ * demand via the `gooseworks` CLI commands.
6
31
  *
7
32
  * The CLI handles credentials loading internally, so the agent does not
8
33
  * need to read ~/.gooseworks/credentials.json or set environment
9
34
  * variables — every command auto-loads the API key.
10
35
  */
11
36
  export declare function getMasterSkillContent(): string;
37
+ /**
38
+ * Returns the goose-ads entry SKILL.md content (the `goose-ads` entry skill,
39
+ * formerly `ads-remix`).
40
+ *
41
+ * This is the ads domain skill and a THIN WRAPPER over the backend's single ad
42
+ * generation workflow (adRemixBatchesService, exposed via the new
43
+ * mcp__gooseworks__*_remix_batch / regenerate_creative tools — the SAME workflow
44
+ * the ads frontend uses). The skill no longer generates images, manages renders,
45
+ * or uploads files itself; the backend reserves credits, runs the cloud pipeline,
46
+ * and bills. The skill ALSO routes ad analytics/intelligence to recipe skills
47
+ * fetched on demand from goose-skills. It is SEPARATE from the `gooseworks` GTM
48
+ * skill — different domain, different tools — and Claude loads it (or the
49
+ * `gooseworks` parent router hands off to it) when the user wants to make/edit an
50
+ * ad, research a brand for ads, or analyze ad performance.
51
+ */
52
+ export declare function getGooseAdsSkillContent(): string;
12
53
  //# sourceMappingURL=master-skill.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"master-skill.d.ts","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAyI9C"}
1
+ {"version":3,"file":"master-skill.d.ts","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAK7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CAwJ9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CA6KhD"}
@@ -1,11 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getEntrySkills = getEntrySkills;
3
4
  exports.getMasterSkillContent = getMasterSkillContent;
5
+ exports.getGooseAdsSkillContent = getGooseAdsSkillContent;
6
+ /** Every entry skill the CLI vendors + installs. */
7
+ function getEntrySkills() {
8
+ return [
9
+ { name: 'gooseworks', content: getMasterSkillContent() },
10
+ { name: 'goose-ads', content: getGooseAdsSkillContent() },
11
+ ];
12
+ }
4
13
  /**
5
- * Returns the master SKILL.md content.
6
- * This is the ONLY skill the CLI installs. It teaches the coding agent
7
- * how to discover and use GooseWorks skills on demand via the
8
- * `gooseworks` CLI commands.
14
+ * Returns the GTM master SKILL.md content (the `gooseworks` entry skill).
15
+ * It teaches the coding agent how to discover and use GooseWorks skills on
16
+ * demand via the `gooseworks` CLI commands.
9
17
  *
10
18
  * The CLI handles credentials loading internally, so the agent does not
11
19
  * need to read ~/.gooseworks/credentials.json or set environment
@@ -31,6 +39,21 @@ tags: [gooseworks, data, scraping, search, reddit, twitter, linkedin, email, peo
31
39
 
32
40
  You have access to GooseWorks — a toolkit with 100+ data skills for scraping, research, lead generation, enrichment, and more. **ALWAYS use GooseWorks skills** for any data task before trying web search or other tools.
33
41
 
42
+ This skill is also the **parent router** for the GooseWorks family. Data/GTM work you handle here (see "How to Use"); specialized work you hand off to a dedicated \`goose-*\` skill.
43
+
44
+ ## Route to the right skill FIRST
45
+
46
+ Before anything else, check whether the request belongs to a specialized domain. If so, **switch to that skill** instead of the data flow below:
47
+
48
+ | If the user wants… | Route to | How |
49
+ | --- | --- | --- |
50
+ | Remix/make an ad, research a brand for ads, OR analyze ad performance — Meta/Google ad campaigns, creative fatigue, CAC/lead quality, competitor ad intel, ad angles & hooks | **\`goose-ads\`** | Installed locally as an entry skill. Just use it. If unavailable, run \`gooseworks install --claude\`. |
51
+ | Charts, infographics, slides, social graphics, branded visual designs from a style/format | **\`goose-graphics\`** | If installed locally, use it. Otherwise \`gooseworks fetch goose-graphics\` (or \`gooseworks install --claude --with goose-graphics\`). |
52
+ | Ad/UGC/talking-head **video** | **\`goose-video\`** | Coming soon. Until it ships, search the catalog (\`gooseworks search "ugc video"\`) and \`gooseworks fetch\` the matching recipe. |
53
+ | Anything else — scraping, research, lead gen, enrichment, any data lookup | (stay here) | Follow "How to Use" below. |
54
+
55
+ Examples — all of these route to \`goose-ads\`, not the data flow: "remix this ad with project id 123", "make an ad for my product", "research my brand", "why is my Meta campaign underperforming", "which creatives should I cut".
56
+
34
57
  ## Setup
35
58
 
36
59
  All commands below auto-load credentials from \`~/.gooseworks/credentials.json\`. If a command exits with "Not logged in", tell the user to run: \`npx gooseworks login\`. To log out: \`npx gooseworks logout\`.
@@ -149,4 +172,193 @@ gooseworks call apify acts/parseforge~reddit-posts-scraper/runs --body='{"subred
149
172
  8. **Prefer \`gooseworks call\` over raw curl** — if it returns an error, first fix the parameters (check types, required fields, format) and retry. Only fall back to raw curl if you have strong reason to believe it is a CLI bug, not a parameter issue.
150
173
  `;
151
174
  }
175
+ /**
176
+ * Returns the goose-ads entry SKILL.md content (the `goose-ads` entry skill,
177
+ * formerly `ads-remix`).
178
+ *
179
+ * This is the ads domain skill and a THIN WRAPPER over the backend's single ad
180
+ * generation workflow (adRemixBatchesService, exposed via the new
181
+ * mcp__gooseworks__*_remix_batch / regenerate_creative tools — the SAME workflow
182
+ * the ads frontend uses). The skill no longer generates images, manages renders,
183
+ * or uploads files itself; the backend reserves credits, runs the cloud pipeline,
184
+ * and bills. The skill ALSO routes ad analytics/intelligence to recipe skills
185
+ * fetched on demand from goose-skills. It is SEPARATE from the `gooseworks` GTM
186
+ * skill — different domain, different tools — and Claude loads it (or the
187
+ * `gooseworks` parent router hands off to it) when the user wants to make/edit an
188
+ * ad, research a brand for ads, or analyze ad performance.
189
+ */
190
+ function getGooseAdsSkillContent() {
191
+ return `---
192
+ name: goose-ads
193
+ slug: goose-ads
194
+ description: >
195
+ GooseWorks ads skill — create, edit, AND analyze ad creative. Remix a static (image) ad
196
+ template into a branded ad for the user's product, edit/re-roll an existing creative,
197
+ research a brand for ads, OR analyze ad performance (Meta/Google campaign diagnostics,
198
+ creative fatigue, CAC & lead quality, competitor ad intelligence, ad angles & hooks). Use
199
+ when the user says "remix this ad", references a static ad template id/slug, asks to "make
200
+ an ad", "edit this ad", "research my brand", or asks to analyze/diagnose ad campaigns.
201
+ Generation runs through the GooseWorks backend's single cloud workflow (the same one the ads
202
+ app uses) — credits are reserved and billed server-side. Analytics recipes are fetched from
203
+ goose-skills on demand.
204
+ category: ads
205
+ version: 2.0.0
206
+ author: GooseWorks
207
+ tags: [gooseworks, ads, remix, static-ad, brand, creative, image, analytics, meta-ads, performance]
208
+ ---
209
+
210
+ # GooseWorks Ads — create, edit & analyze
211
+
212
+ The GooseWorks ads skill. Two jobs:
213
+
214
+ 1. **Create / edit ad creative** — a **thin wrapper** over the backend's single generation
215
+ workflow. You pick the brand + template(s) and submit ONE batch; the **backend** runs the
216
+ whole pipeline (compose → generate → persist → judge), reserves and bills credits, and
217
+ stores the renders. You do NOT generate images, call FAL, manage render rows, or upload
218
+ files — those are gone. This is the exact same workflow the GooseWorks ads app uses, so the
219
+ skill and the app can never drift.
220
+ 2. **Analyze ad performance** — fetch ad-analytics recipes from goose-skills on demand
221
+ (these are unrelated to generation; see "Analyze / intelligence" below).
222
+
223
+ ## Prerequisite — the GooseWorks MCP server is REQUIRED
224
+
225
+ Everything goes through the \`mcp__gooseworks__*\` tools. If they are not available, **stop and
226
+ tell the user to run \`gooseworks install --claude --mcp\`** (and restart Claude Code). There is
227
+ no HTTP/file fallback — the REST ad endpoints are session-cookie-only and reject your token.
228
+
229
+ ## Identity & credits
230
+
231
+ - One agent-scoped token authenticates the \`gooseworks\` MCP tools. Never print it. The tools
232
+ resolve your org automatically — you do NOT resolve an "Ads agent" or pass \`target\` for the
233
+ generation tools.
234
+ - **Credits are handled entirely by the backend.** \`submit_remix_batch\` reserves the estimated
235
+ cost up front (it errors with \`insufficient_credits\` if the wallet is short — relay the
236
+ message and stop) and bills only the images that actually complete. Call
237
+ \`estimate_remix_batch\` first to tell the user the cost; \`gooseworks credits\` shows balance.
238
+
239
+ ## Defaults — match the app (priority: frontend, then backend)
240
+
241
+ When the user doesn't specify, submit with the **ads app's** defaults so skill output matches
242
+ what they'd get in the UI. **Pass these explicitly:**
243
+
244
+ - \`variants\`: **1** per template
245
+ - \`ratios\`: **["4:5"]** (Meta feed vertical)
246
+ - \`engine\`: **"gpt_image_2"**
247
+ - \`quality\`: **"medium"**
248
+ - \`preserve_source_styling\`: **true** (keep the template's own colours/fonts; only restyle to
249
+ the brand palette if the user explicitly asks to "match my brand colours")
250
+
251
+ If the user asks for something the app exposes (more variants, a different ratio like 1:1 or
252
+ 9:16, a faster engine, higher quality), pass that instead. Omitting a field lets backend policy
253
+ decide — fine, but prefer sending the app defaults for predictable parity.
254
+
255
+ ## The generation tools (the new, single-workflow surface)
256
+
257
+ - \`submit_remix_batch { brand_id, items, prompt?, product_name?, preserve_source_styling?,
258
+ reference_image_urls?, allow_without_product_image?, engine?, quality? }\` — **the one call
259
+ that makes ads.** \`items\` is \`[{ template_id, variants?, ratios? }]\` (≤20 templates).
260
+ Returns the batch with a \`links\` block (\`brand_url\` + per-creative \`app_url\`). If the brand's
261
+ research isn't finished yet the batch comes back \`status: "queued"\` — it auto-runs the moment
262
+ research completes; tell the user it'll appear shortly, don't error.
263
+ - \`estimate_remix_batch { items, engine?, quality? }\` — cost preview (images, credits_per_image,
264
+ total_credits, available_credits). Reserves nothing. Use to quote the cost first.
265
+ - \`get_remix_batch { batch_id }\` — poll status. Returns each creative with its renders and
266
+ \`completed\`/\`failed\`/\`pending\` counts, plus \`links\`. A creative is done when its
267
+ \`current_render_url\` is set and \`pending\` is 0.
268
+ - \`list_brand_creatives { brand_id, limit?, offset? }\` — the brand's gallery feed (newest
269
+ first) + \`brand_url\`. Alternative poll target; also use to show everything made for a brand.
270
+ - \`regenerate_creative { project_id, mode?, prompt?, source_render_id?, ... }\` — **edit / re-roll
271
+ one existing creative** through the same pipeline. \`mode: "variation"\` (default) re-rolls from
272
+ the template; \`"edit"\` makes a targeted change to a specific render (\`prompt\` + \`source_render_id\`
273
+ required); \`"exact"\` runs \`prompt\` verbatim against that render's references. Returns a
274
+ single-item batch — poll it with \`get_remix_batch\`.
275
+
276
+ ## Reading the brand & picking inputs (still MCP, read-only)
277
+
278
+ - \`get_brand_kit { brand_id }\` — the CANONICAL brand context (name, description, audience,
279
+ voice, brandType, valueProps, colors, typography, logoUrl, \`products[]\`, presigned
280
+ \`referenceImages[]\`). Read this to choose \`product_name\` and any \`reference_image_urls\`.
281
+ - \`list_ad_brands\` / \`get_ad_brand { brand_id }\` — find/fetch a brand by name or id.
282
+ - \`get_static_ad_template { template_id }\` — resolve a template (slug OR uuid; public catalog
283
+ AND your org's private templates). Confirms it exists before you submit.
284
+ - \`remix_community_ad { community_id }\` — a **Community** ad id is an \`ad_project\` id, not a
285
+ template id. Call this FIRST to snapshot it into a private template, then use the returned
286
+ template \`id\` in \`items\`.
287
+ - \`create_user_ad_template { workspace_path }\` — "bring your own ad": upload the user's own
288
+ image as a private template, then remix it like any other.
289
+ - \`get_ad_project\` / \`append_project_message\` — inspect a creative / leave a note on its thread.
290
+
291
+ ## Workflow — make ads from a template
292
+
293
+ 1. **Resolve the brand.** \`list_ad_brands\` by name/site → \`get_brand_kit { brand_id }\`. If the
294
+ kit's \`researchStatus\` isn't \`complete\`, you can still submit (the batch queues and runs when
295
+ research finishes) — just tell the user. Use the kit to pick \`product_name\` (a real entry from
296
+ \`products[]\`, not a guess) and, if the user supplied product photos, \`reference_image_urls\`.
297
+ 2. **Resolve the template(s).** \`get_static_ad_template { template_id }\` for each. For a Community
298
+ ad, \`remix_community_ad\` first; for an uploaded image, \`create_user_ad_template\` first.
299
+ 3. **(Optional) Craft the steering prompt.** The \`prompt\` is OPTIONAL — this is where the skill
300
+ adds value: turn the user's intent into a concise steering note (e.g. tone, season, emphasis).
301
+ Don't over-specify; the backend pipeline + brand kit handle palette, fonts, product swap.
302
+ 4. **(Optional) Quote the cost.** \`estimate_remix_batch { items, engine, quality }\` → tell the user.
303
+ 5. **Submit ONE batch.** \`submit_remix_batch { brand_id, items, prompt?, product_name?, engine,
304
+ quality, preserve_source_styling }\` using the app defaults above. Keep the returned \`batch_id\`
305
+ and \`links\`.
306
+ 6. **Poll until done.** \`get_remix_batch { batch_id }\` (or \`list_brand_creatives\`) every ~20-30s
307
+ until every creative's \`pending\` is 0. Generations normally finish in 1-3 min per image.
308
+ 7. **Hand back the links** from the batch's \`links\` block — \`brand_url\` (gallery) and each
309
+ creative's \`app_url\` — copied verbatim. Never end on just "done" or a file path.
310
+
311
+ ## Workflow — edit an existing ad
312
+
313
+ User wants to tweak a creative they already made → \`regenerate_creative\`:
314
+ - "make another version / different take" → \`mode: "variation"\` (optionally new \`prompt\`,
315
+ \`product_name\`, \`ratios\`).
316
+ - "change X in this exact image" → \`mode: "edit"\`, \`source_render_id\` = the render to edit,
317
+ \`prompt\` = the change.
318
+ - "run exactly this prompt on the product" → \`mode: "exact"\`, \`source_render_id\` + \`prompt\`.
319
+ Then poll with \`get_remix_batch\` and hand back the links, same as above.
320
+
321
+ ## Brand research
322
+
323
+ Research normally runs in the GooseWorks backend (on onboarding). Just read the result with
324
+ \`get_brand_kit\`. If a brand doesn't exist yet, you may \`create_ad_brand\` and let backend
325
+ research run; you don't need to research locally. (A standalone local recipe still exists via
326
+ \`gooseworks fetch brand-research\` if the user explicitly wants the agent to do it.)
327
+
328
+ ## Analyze / intelligence (fetched recipes — NOT generation)
329
+
330
+ These are analysis recipes you fetch from goose-skills with \`gooseworks fetch <slug>\` and
331
+ follow; they do NOT touch the generation tools or credits-for-images. Pick the closest match;
332
+ if unsure, \`gooseworks search "<what the user wants>"\` first:
333
+ - **Campaign performance diagnosis** ("why is my Meta/Google campaign underperforming",
334
+ creative fatigue, learning phase, pacing, auction overlap) → \`gooseworks fetch meta-ads-analyzer\`
335
+ (or \`ad-campaign-analyzer\` for cross-platform).
336
+ - **Lead/CAC quality** ("are these ads driving qualified leads", true CAC vs vanity CPA,
337
+ Scale/Keep/Investigate/Cut) → \`gooseworks fetch ad-lead-quality-analyzer\`.
338
+ - **Competitor ad intelligence** ("what ads are competitors running") →
339
+ \`gooseworks fetch competitor-ad-intelligence\` (Meta Ad Library: \`meta-ad-scraper\`;
340
+ Google: \`google-ad-scraper\`).
341
+ - **Creative ideation** (ad angles, winning hooks) → \`gooseworks fetch ad-angle-miner\` /
342
+ \`gooseworks fetch trending-ad-hook-spotter\`.
343
+ - **Policy / landing-page checks** → \`gooseworks fetch meta-ad-policy-checker\` /
344
+ \`gooseworks fetch ad-to-landing-page-auditor\`.
345
+
346
+ Save their scripts to \`/tmp/gooseworks-scripts/<slug>/\` and follow their instructions. These
347
+ run through the \`gooseworks\` CLI (\`gooseworks fetch\` / \`gooseworks call\`), like the GTM skills.
348
+
349
+ ## Rules
350
+
351
+ - **MCP required** — if \`mcp__gooseworks__*\` is unavailable, stop and tell the user to run
352
+ \`gooseworks install --claude --mcp\`.
353
+ - **One backend workflow** — generation is \`submit_remix_batch\` / \`regenerate_creative\` ONLY.
354
+ Do NOT call FAL, the media proxy, \`submit_render\`, \`update_render_status\`, or upload render
355
+ files yourself; do NOT \`gooseworks fetch\` a local remix recipe to generate. The backend owns it.
356
+ - **Always end a successful run with the links** from the batch's \`links\` block (\`brand_url\` +
357
+ each creative's \`app_url\`), copied verbatim. Never end on just "done" or a file path.
358
+ - **Quote cost before generating** when it's non-trivial (use \`estimate_remix_batch\`), and
359
+ relay \`insufficient_credits\` plainly if the submit is rejected — don't retry blindly.
360
+ - **Don't busy-loop** — poll \`get_remix_batch\` on a sensible interval (~20-30s); a \`queued\`
361
+ batch is waiting on research and will start on its own.
362
+ `;
363
+ }
152
364
  //# sourceMappingURL=master-skill.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AAUA,sDAyIC;AAnJD;;;;;;;;;GASG;AACH,SAAgB,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuIR,CAAC;AACF,CAAC"}
1
+ {"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AA0BA,wCAKC;AAWD,sDAwJC;AAiBD,0DA6KC;AAvWD,oDAAoD;AACpD,SAAgB,cAAc;IAC5B,OAAO;QACL,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QACxD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE;KAC1D,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsJR,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,uBAAuB;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2KR,CAAC;AACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/skills/names.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE9D"}
1
+ {"version":3,"file":"names.d.ts","sourceRoot":"","sources":["../../src/skills/names.ts"],"names":[],"mappings":"AAAA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAS9D"}
@@ -2,6 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isManagedGooseworksSkill = isManagedGooseworksSkill;
4
4
  function isManagedGooseworksSkill(name) {
5
- return name === 'gooseworks' || name.startsWith('gooseworks-') || name.startsWith('goose-');
5
+ return (name === 'gooseworks' ||
6
+ // `ads-remix` was renamed to `goose-ads`; keep it managed so a stale
7
+ // ads-remix dir from an older install is cleaned up on the next install.
8
+ name === 'ads-remix' ||
9
+ name.startsWith('gooseworks-') ||
10
+ name.startsWith('goose-'));
6
11
  }
7
12
  //# sourceMappingURL=names.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/skills/names.ts"],"names":[],"mappings":";;AAAA,4DAEC;AAFD,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AAC9F,CAAC"}
1
+ {"version":3,"file":"names.js","sourceRoot":"","sources":["../../src/skills/names.ts"],"names":[],"mappings":";;AAAA,4DASC;AATD,SAAgB,wBAAwB,CAAC,IAAY;IACnD,OAAO,CACL,IAAI,KAAK,YAAY;QACrB,qEAAqE;QACrE,yEAAyE;QACzE,IAAI,KAAK,WAAW;QACpB,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAC9B,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAC1B,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gooseworks",
3
- "version": "0.2.10",
3
+ "version": "0.3.1",
4
4
  "description": "GooseWorks CLI — give your coding agent real data tools",
5
5
  "bin": {
6
6
  "gooseworks": "./dist/index.js"
@@ -22,6 +22,21 @@ metadata:
22
22
 
23
23
  You have access to GooseWorks — a toolkit with 100+ data skills for scraping, research, lead generation, enrichment, and more. **ALWAYS use GooseWorks skills** for any data task before trying web search or other tools.
24
24
 
25
+ This skill is also the **parent router** for the GooseWorks family. Data/GTM work you handle here (see "How to Use"); specialized work you hand off to a dedicated `goose-*` skill.
26
+
27
+ ## Route to the right skill FIRST
28
+
29
+ Before anything else, check whether the request belongs to a specialized domain. If so, **switch to that skill** instead of the data flow below:
30
+
31
+ | If the user wants… | Route to | How |
32
+ | --- | --- | --- |
33
+ | Remix/make an ad, research a brand for ads, OR analyze ad performance — Meta/Google ad campaigns, creative fatigue, CAC/lead quality, competitor ad intel, ad angles & hooks | **`goose-ads`** | Installed locally as an entry skill. Just use it. If unavailable, run `gooseworks install --claude`. |
34
+ | Charts, infographics, slides, social graphics, branded visual designs from a style/format | **`goose-graphics`** | If installed locally, use it. Otherwise `gooseworks fetch goose-graphics` (or `gooseworks install --claude --with goose-graphics`). |
35
+ | Ad/UGC/talking-head **video** | **`goose-video`** | Coming soon. Until it ships, search the catalog (`gooseworks search "ugc video"`) and `gooseworks fetch` the matching recipe. |
36
+ | Anything else — scraping, research, lead gen, enrichment, any data lookup | (stay here) | Follow "How to Use" below. |
37
+
38
+ Examples — all of these route to `goose-ads`, not the data flow: "remix this ad with project id 123", "make an ad for my product", "research my brand", "why is my Meta campaign underperforming", "which creatives should I cut".
39
+
25
40
  ## Setup
26
41
 
27
42
  All commands below auto-load credentials from `~/.gooseworks/credentials.json`. If a command exits with "Not logged in", tell the user to run: `npx gooseworks login`. To log out: `npx gooseworks logout`.