adspirer-skills 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +69 -0
- package/bin/adspirer-skills.mjs +169 -0
- package/package.json +22 -0
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# adspirer-skills
|
|
2
|
+
|
|
3
|
+
**Install [Adspirer Skills](https://adspirer.com/skills) — 92 expert advertising workflows for AI agents — with one command.**
|
|
4
|
+
|
|
5
|
+
Ready-to-run skills for **Google Ads, Meta (Facebook/Instagram) Ads, TikTok Ads, LinkedIn Ads, and Amazon Ads**: media planning, creative production, campaign launch, and always-on ad ops. Each is a bounded workflow in the open [Agent Skills](https://agentskills.io) (`SKILL.md`) format — so it drops into **Claude Code, Claude, ChatGPT, Cursor, Codex, Gemini CLI**, and any Agent-Skills-compatible AI.
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx adspirer-skills list # browse all 92 skills
|
|
9
|
+
npx adspirer-skills add the-daily-pacing-check # install (Claude Code by default)
|
|
10
|
+
npx adspirer-skills add meta-full-funnel-launcher --agent cursor
|
|
11
|
+
npx adspirer-skills search "meta campaign"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
No account needed to install or run. Browse everything at **[adspirer.com/skills](https://adspirer.com/skills)**.
|
|
15
|
+
|
|
16
|
+
## Agents
|
|
17
|
+
|
|
18
|
+
`claude-code` (default) · `claude` · `cursor` · `codex` · `windsurf` · `gemini` · `openclaw` · `antigravity` · `hermes` · `other`
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx adspirer-skills add <skill> --agent <name>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The CLI writes each skill into your agent's native location (Claude Code → `.claude/skills/`, Cursor → `.cursor/rules/`, Codex → `AGENTS.md`, and so on).
|
|
25
|
+
|
|
26
|
+
## Why these are safe to run
|
|
27
|
+
|
|
28
|
+
Every Adspirer Skill carries the same contract: **fixed checks against live account data, honest stop conditions, and approval gates on anything that spends.** Skill content is reference material — authority comes only from you, and nothing spends a dollar without your explicit approval. The ads leg connects through [Adspirer](https://adspirer.com/skills) only when a step touches a live ad account.
|
|
29
|
+
|
|
30
|
+
## Popular skills
|
|
31
|
+
|
|
32
|
+
- **[A/B Test Runner](https://adspirer.com/skills/a-b-test-runner)** — Set up a clean A/B test (one variable, proper split, a decision rule and duration for significance), read it honestly, and call the winner only when the data supports it.
|
|
33
|
+
- **[Ad Copy Writing Room](https://adspirer.com/skills/ad-copy-writing-room)** — A copy-writing prompt that produces platform-correct ad copy variations (headlines, primary text, CTAs) grounded in a real offer and audience, with angle rationale.
|
|
34
|
+
- **[Ad-Library Deep Dive](https://adspirer.com/skills/ad-library-deep-dive)** — Systematically mine a brand's Meta Ad Library: creative angles, hooks, formats, longevity (long-running = winning) — extract patterns to inform your own creative.
|
|
35
|
+
- **[Agency New-Client Onboarding](https://adspirer.com/skills/agency-new-client-onboarding)** — Onboard a new client end to end: audit their accounts, set up tracking, build the initial plan, launch the first campaigns, and establish the reporting cadence.
|
|
36
|
+
- **[Amazon Sponsored Products Launcher](https://adspirer.com/skills/amazon-sponsored-products-launcher)** — Launch an Amazon Sponsored Products campaign: product eligibility, keyword/ASIN targeting, bids, negatives, built and checked.
|
|
37
|
+
- **[Anomaly Triage](https://adspirer.com/skills/anomaly-triage)** — When a metric moves sharply, triage it: is it real, a tracking artifact, a platform delay, or a genuine change? Trace it to a driver before anyone panics.
|
|
38
|
+
- **[App Campaign (UAC) Launcher](https://adspirer.com/skills/app-campaign-uac-launcher)** — Launch a Google App campaign (UAC): conversion events/SDK check, asset variety, bidding by install vs in-app action, built paused and verified.
|
|
39
|
+
- **[App Growth Stack](https://adspirer.com/skills/app-growth-stack)** — Stand up an app-growth stack: UAC + Meta app campaigns, install + in-app event tracking, cohort/LTV read, and a scaling plan — end to end, gated.
|
|
40
|
+
- **[Audience Architect](https://adspirer.com/skills/audience-architect)** — Design a layered audience strategy (cold/warm/hot, exclusions, lookalikes/custom) for a campaign, per platform, with overlap and audience-size sanity checks.
|
|
41
|
+
- **[Avatar Spokesperson Ads](https://adspirer.com/skills/avatar-spokesperson-ads)** — Generate avatar-spokesperson video ads via HeyGen — script, avatar, voiceover — at scale for testing message variations.
|
|
42
|
+
- **[B2B Media Plan (LinkedIn-first)](https://adspirer.com/skills/b2b-media-plan-linkedin-first)** — Build a B2B media plan centered on LinkedIn: firmographic targeting, ABM lists, lead-gen vs traffic objectives, realistic B2B CPLs, and budget staging.
|
|
43
|
+
- **[B2B Pipeline Engine](https://adspirer.com/skills/b2b-pipeline-engine)** — Build a B2B pipeline engine: LinkedIn + Search lead gen → CRM sync (HubSpot if connected) → follow-up → attribute pipeline back to campaigns.
|
|
44
|
+
|
|
45
|
+
## Browse by job
|
|
46
|
+
|
|
47
|
+
**Media Planning** — [Audience Architect](https://adspirer.com/skills/audience-architect) · [B2B Media Plan (LinkedIn-first)](https://adspirer.com/skills/b2b-media-plan-linkedin-first) · [Campaign Budget Splitter](https://adspirer.com/skills/campaign-budget-splitter) · [E-commerce Media Plan](https://adspirer.com/skills/e-commerce-media-plan) · [Flighting & Pacing Planner](https://adspirer.com/skills/flighting-pacing-planner) · [Keyword Universe Builder](https://adspirer.com/skills/keyword-universe-builder) · [Launch-Readiness Audit](https://adspirer.com/skills/launch-readiness-audit) · [Market-Entry Media Plan](https://adspirer.com/skills/market-entry-media-plan) · [The Channel-Mix Advisor](https://adspirer.com/skills/the-channel-mix-advisor) · [The Media Plan Builder](https://adspirer.com/skills/the-media-plan-builder)
|
|
48
|
+
|
|
49
|
+
**Creative Production** — [Ad Copy Writing Room](https://adspirer.com/skills/ad-copy-writing-room) · [Avatar Spokesperson Ads](https://adspirer.com/skills/avatar-spokesperson-ads) · [Brand-Character Ads](https://adspirer.com/skills/brand-character-ads) · [Creative Brief Generator](https://adspirer.com/skills/creative-brief-generator) · [Creative Compliance Pre-Check](https://adspirer.com/skills/creative-compliance-pre-check) · [Creative Resize Matrix](https://adspirer.com/skills/creative-resize-matrix) · [Design-System Ad Kit](https://adspirer.com/skills/design-system-ad-kit) · [Landing Page Builder](https://adspirer.com/skills/landing-page-builder) · [Pro Retouch Pipeline](https://adspirer.com/skills/pro-retouch-pipeline) · [Static Ad Factory](https://adspirer.com/skills/static-ad-factory) · [Text-in-Image Ad Maker](https://adspirer.com/skills/text-in-image-ad-maker) · [The Creative Testing Matrix](https://adspirer.com/skills/the-creative-testing-matrix) · [UGC-Style Video Ads](https://adspirer.com/skills/ugc-style-video-ads) · [Video Ad Concepter](https://adspirer.com/skills/video-ad-concepter) · [Voiceover & Dubbing Pack](https://adspirer.com/skills/voiceover-dubbing-pack)
|
|
50
|
+
|
|
51
|
+
**Campaign Launch** — [Amazon Sponsored Products Launcher](https://adspirer.com/skills/amazon-sponsored-products-launcher) · [App Campaign (UAC) Launcher](https://adspirer.com/skills/app-campaign-uac-launcher) · [Cross-Platform Product Launch](https://adspirer.com/skills/cross-platform-product-launch) · [Google Search Campaign Launcher](https://adspirer.com/skills/google-search-campaign-launcher) · [Google Shopping Launcher](https://adspirer.com/skills/google-shopping-launcher) · [LinkedIn ABM Matrix Launcher](https://adspirer.com/skills/linkedin-abm-matrix-launcher) · [LinkedIn Lead-Gen Launcher](https://adspirer.com/skills/linkedin-lead-gen-launcher) · [Meta Catalog / DPA Launcher](https://adspirer.com/skills/meta-catalog-dpa-launcher) · [Meta Click-to-WhatsApp Launcher](https://adspirer.com/skills/meta-click-to-whatsapp-launcher) · [Meta Full-Funnel Launcher](https://adspirer.com/skills/meta-full-funnel-launcher) · [Performance Max Launcher](https://adspirer.com/skills/performance-max-launcher) · [The Retargeting Stack](https://adspirer.com/skills/the-retargeting-stack) · [TikTok Launch Kit](https://adspirer.com/skills/tiktok-launch-kit) · [YouTube Campaign Launcher](https://adspirer.com/skills/youtube-campaign-launcher)
|
|
52
|
+
|
|
53
|
+
**Ad Ops & Optimization** — [A/B Test Runner](https://adspirer.com/skills/a-b-test-runner) · [Broken-Link & LP Checker](https://adspirer.com/skills/broken-link-lp-checker) · [Conversion-Tracking Auditor](https://adspirer.com/skills/conversion-tracking-auditor) · [Creative Fatigue Monitor](https://adspirer.com/skills/creative-fatigue-monitor) · [Disapproval Resolver](https://adspirer.com/skills/disapproval-resolver) · [Meta Ads scale runner](https://adspirer.com/skills/meta-ads-scale-runner) · [Negative Keyword Miner](https://adspirer.com/skills/negative-keyword-miner) · [Placement Cleaner](https://adspirer.com/skills/placement-cleaner) · [Quality-Score Rescue](https://adspirer.com/skills/quality-score-rescue) · [Seasonal Ramp Playbook](https://adspirer.com/skills/seasonal-ramp-playbook) · [The Account Takeover Audit](https://adspirer.com/skills/the-account-takeover-audit) · [The Bid-Strategy Doctor](https://adspirer.com/skills/the-bid-strategy-doctor) · [The Budget Reallocator](https://adspirer.com/skills/the-budget-reallocator) · [The Daily Pacing Check](https://adspirer.com/skills/the-daily-pacing-check) · [The Frequency Doctor](https://adspirer.com/skills/the-frequency-doctor) · [The Overspend Guardian](https://adspirer.com/skills/the-overspend-guardian) · [Weekly Account Hygiene Sweep](https://adspirer.com/skills/weekly-account-hygiene-sweep)
|
|
54
|
+
|
|
55
|
+
**Analytics & Reporting** — [Anomaly Triage](https://adspirer.com/skills/anomaly-triage) · [Client-Ready Monthly Report](https://adspirer.com/skills/client-ready-monthly-report) · [Cohort & LTV Reader](https://adspirer.com/skills/cohort-ltv-reader) · [Cross-Platform ROAS Rollup](https://adspirer.com/skills/cross-platform-roas-rollup) · [GA4 Truth-Check](https://adspirer.com/skills/ga4-truth-check) · [Slack Reporting Bot](https://adspirer.com/skills/slack-reporting-bot) · [The Attribution Detective](https://adspirer.com/skills/the-attribution-detective) · [The Board Slide](https://adspirer.com/skills/the-board-slide) · [The Creative Leaderboard](https://adspirer.com/skills/the-creative-leaderboard) · [The Monday-Morning Report](https://adspirer.com/skills/the-monday-morning-report) · [The Spend Reconciler](https://adspirer.com/skills/the-spend-reconciler) · [Warehouse-Grade Ads Reporting](https://adspirer.com/skills/warehouse-grade-ads-reporting)
|
|
56
|
+
|
|
57
|
+
**Research & Intelligence** — [Ad-Library Deep Dive](https://adspirer.com/skills/ad-library-deep-dive) · [Competitor Ad Recon](https://adspirer.com/skills/competitor-ad-recon) · [Competitor Traffic X-Ray](https://adspirer.com/skills/competitor-traffic-x-ray) · [Market Sizing Snapshot](https://adspirer.com/skills/market-sizing-snapshot) · [Review-Mining for Ad Copy](https://adspirer.com/skills/review-mining-for-ad-copy) · [SERP & Share-of-Voice Tracker](https://adspirer.com/skills/serp-share-of-voice-tracker) · [The Audience Interview Miner](https://adspirer.com/skills/the-audience-interview-miner) · [The Offer Lab](https://adspirer.com/skills/the-offer-lab) · [Trend Scout](https://adspirer.com/skills/trend-scout)
|
|
58
|
+
|
|
59
|
+
**Full-Stack Playbooks** — [Agency New-Client Onboarding](https://adspirer.com/skills/agency-new-client-onboarding) · [App Growth Stack](https://adspirer.com/skills/app-growth-stack) · [B2B Pipeline Engine](https://adspirer.com/skills/b2b-pipeline-engine) · [Creative Refresh Cycle](https://adspirer.com/skills/creative-refresh-cycle) · [E-commerce Growth Loop](https://adspirer.com/skills/e-commerce-growth-loop) · [Launch-Day War Room](https://adspirer.com/skills/launch-day-war-room) · [Lead-Gen Machine](https://adspirer.com/skills/lead-gen-machine) · [The Localization Expander](https://adspirer.com/skills/the-localization-expander) · [The Turnaround Playbook](https://adspirer.com/skills/the-turnaround-playbook) · [Zero-to-Launch: New Product](https://adspirer.com/skills/zero-to-launch-new-product)
|
|
60
|
+
|
|
61
|
+
**Agency Ops** — [Media-Plan-to-Tracker Sync](https://adspirer.com/skills/media-plan-to-tracker-sync) · [New-Platform Expansion Brief](https://adspirer.com/skills/new-platform-expansion-brief) · [The Client Status Update](https://adspirer.com/skills/the-client-status-update) · [The Proposal Builder](https://adspirer.com/skills/the-proposal-builder) · [The QBR Pack](https://adspirer.com/skills/the-qbr-pack)
|
|
62
|
+
|
|
63
|
+
## Learn more
|
|
64
|
+
|
|
65
|
+
- **All 92 skills:** [adspirer.com/skills](https://adspirer.com/skills)
|
|
66
|
+
- **Docs & setup for your AI client:** [adspirer.com/docs](https://adspirer.com/docs/introduction)
|
|
67
|
+
- **Machine-readable catalog:** [catalog.json](https://adspirer.com/skills/catalog.json) · [llms.txt](https://adspirer.com/skills/llms.txt)
|
|
68
|
+
|
|
69
|
+
Made by [Adspirer](https://adspirer.com) — the AI advertising agent for Google, Meta, TikTok, LinkedIn & Amazon.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// adspirer-skills — install Adspirer Skills into any AI agent.
|
|
3
|
+
// npx adspirer-skills add <slug> [--agent <name>] [--dir <path>]
|
|
4
|
+
// npx adspirer-skills list
|
|
5
|
+
// npx adspirer-skills search <query>
|
|
6
|
+
// Fetches skills from adspirer.com/skills (the DB-backed registry). No install needed to run.
|
|
7
|
+
import { mkdir, writeFile, readFile } from 'node:fs/promises';
|
|
8
|
+
import { join, resolve, sep } from 'node:path';
|
|
9
|
+
|
|
10
|
+
const BASE = process.env.ADSPIRER_SKILLS_URL || 'https://adspirer.com/skills';
|
|
11
|
+
|
|
12
|
+
// Per-agent install layout. `dir` is relative to cwd; `file` is what we write the skill into.
|
|
13
|
+
// The value is ALWAYS the same SKILL.md markdown — each agent just reads it from its own location.
|
|
14
|
+
const AGENTS = {
|
|
15
|
+
'claude-code': { dir: '.claude/skills/{slug}', file: 'SKILL.md', note: 'Claude Code reads .claude/skills/*/SKILL.md.' },
|
|
16
|
+
claude: { dir: 'adspirer-skills/{slug}', file: 'SKILL.md', note: 'Upload this folder as a skill in Claude / claude.ai.' },
|
|
17
|
+
cursor: { dir: '.cursor/rules', file: '{slug}.md', note: 'Cursor loads .cursor/rules/*.md.' },
|
|
18
|
+
codex: { dir: '.', file: 'AGENTS.md', note: 'Appended to AGENTS.md (Codex reads it).', append: true },
|
|
19
|
+
windsurf: { dir: '.windsurf/rules', file: '{slug}.md', note: 'Windsurf loads .windsurf/rules/*.md.' },
|
|
20
|
+
gemini: { dir: '.gemini', file: 'GEMINI.md', note: 'Gemini CLI reads GEMINI.md.', append: true },
|
|
21
|
+
openclaw: { dir: 'adspirer-skills/{slug}', file: 'SKILL.md', note: 'Point OpenClaw at this SKILL.md.' },
|
|
22
|
+
antigravity: { dir: 'adspirer-skills/{slug}', file: 'SKILL.md', note: 'Point Antigravity at this SKILL.md.' },
|
|
23
|
+
hermes: { dir: 'adspirer-skills/{slug}', file: 'SKILL.md', note: 'Point Hermes at this SKILL.md.' },
|
|
24
|
+
other: { dir: 'adspirer-skills/{slug}', file: 'SKILL.md', note: 'Universal folder — tell your agent to read SKILL.md.' },
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const SLUG_RE = /^[a-z0-9-]{1,80}$/;
|
|
28
|
+
const c = { dim: (s) => `\x1b[2m${s}\x1b[0m`, b: (s) => `\x1b[1m${s}\x1b[0m`, g: (s) => `\x1b[32m${s}\x1b[0m`, r: (s) => `\x1b[31m${s}\x1b[0m`, cy: (s) => `\x1b[36m${s}\x1b[0m` };
|
|
29
|
+
|
|
30
|
+
function parseArgs(argv) {
|
|
31
|
+
const out = { _: [] };
|
|
32
|
+
for (let i = 0; i < argv.length; i++) {
|
|
33
|
+
const a = argv[i];
|
|
34
|
+
if (a === '--agent' || a === '-a') out.agent = argv[++i];
|
|
35
|
+
else if (a === '--dir' || a === '-d') out.dir = argv[++i];
|
|
36
|
+
else if (a === '--help' || a === '-h') out.help = true;
|
|
37
|
+
else out._.push(a);
|
|
38
|
+
}
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
async function getJson(path) {
|
|
43
|
+
const r = await fetch(`${BASE}${path}`, { headers: { accept: 'application/json' } });
|
|
44
|
+
if (!r.ok) throw new Error(`registry ${r.status} for ${path}`);
|
|
45
|
+
return r.json();
|
|
46
|
+
}
|
|
47
|
+
async function getText(path) {
|
|
48
|
+
const r = await fetch(`${BASE}${path}`);
|
|
49
|
+
if (!r.ok) throw new Error(`not found: ${path} (${r.status})`);
|
|
50
|
+
return r.text();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function usage() {
|
|
54
|
+
console.log(`
|
|
55
|
+
${c.b('adspirer-skills')} — install Adspirer Skills into your AI agent
|
|
56
|
+
|
|
57
|
+
${c.b('Usage')}
|
|
58
|
+
npx adspirer-skills add <slug> [--agent <name>] [--dir <path>]
|
|
59
|
+
npx adspirer-skills list
|
|
60
|
+
npx adspirer-skills search <query>
|
|
61
|
+
|
|
62
|
+
${c.b('Agents')} ${Object.keys(AGENTS).join(', ')}
|
|
63
|
+
(default: claude-code)
|
|
64
|
+
|
|
65
|
+
${c.b('Examples')}
|
|
66
|
+
npx adspirer-skills add the-daily-pacing-check
|
|
67
|
+
npx adspirer-skills add meta-full-funnel-launcher --agent cursor
|
|
68
|
+
npx adspirer-skills list
|
|
69
|
+
|
|
70
|
+
Browse everything at ${c.cy(BASE)}
|
|
71
|
+
`);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
async function cmdList() {
|
|
75
|
+
const cat = await getJson('/catalog.json');
|
|
76
|
+
console.log(`\n${c.b(`${cat.skills.length} Adspirer Skills`)} ${c.dim(BASE)}\n`);
|
|
77
|
+
for (const s of cat.skills) {
|
|
78
|
+
console.log(` ${c.cy(s.id.padEnd(34))} ${c.dim(s.category)} ${s.title}`);
|
|
79
|
+
}
|
|
80
|
+
console.log(`\nInstall one: ${c.b('npx adspirer-skills add <id>')}\n`);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
async function cmdSearch(query) {
|
|
84
|
+
const cat = await getJson('/catalog.json');
|
|
85
|
+
const q = query.toLowerCase();
|
|
86
|
+
const hits = cat.skills.filter((s) => (s.title + ' ' + s.summary + ' ' + s.id + ' ' + s.category).toLowerCase().includes(q));
|
|
87
|
+
console.log(`\n${c.b(`${hits.length} match(es) for "${query}"`)}\n`);
|
|
88
|
+
for (const s of hits) console.log(` ${c.cy(s.id.padEnd(34))} ${s.title}\n ${c.dim(s.summary)}`);
|
|
89
|
+
console.log('');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function cmdAdd(slug, args) {
|
|
93
|
+
if (!slug || !SLUG_RE.test(slug)) {
|
|
94
|
+
console.error(c.r(`Invalid skill id "${slug || ''}". Run: npx adspirer-skills list`));
|
|
95
|
+
process.exit(1);
|
|
96
|
+
}
|
|
97
|
+
const agentKey = (args.agent || 'claude-code').toLowerCase();
|
|
98
|
+
const agent = AGENTS[agentKey];
|
|
99
|
+
if (!agent) {
|
|
100
|
+
console.error(c.r(`Unknown agent "${agentKey}". One of: ${Object.keys(AGENTS).join(', ')}`));
|
|
101
|
+
process.exit(1);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
process.stdout.write(c.dim(`Fetching ${slug} …`));
|
|
105
|
+
let md;
|
|
106
|
+
try {
|
|
107
|
+
md = await getText(`/${slug}.md`);
|
|
108
|
+
} catch (e) {
|
|
109
|
+
console.error(`\r${c.r(`✗ ${e.message}`)} `);
|
|
110
|
+
console.error(c.dim(` Run npx adspirer-skills list to see available skills.`));
|
|
111
|
+
process.exit(1);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const dir = args.dir || agent.dir.replaceAll('{slug}', slug);
|
|
115
|
+
const file = agent.file.replaceAll('{slug}', slug);
|
|
116
|
+
// Contain everything we write to the current working directory — reject any
|
|
117
|
+
// --dir that escapes it via `..` (or an absolute path pointing elsewhere).
|
|
118
|
+
const cwd = resolve(process.cwd());
|
|
119
|
+
const targetDir = resolve(cwd, dir);
|
|
120
|
+
if (targetDir !== cwd && !targetDir.startsWith(cwd + sep)) {
|
|
121
|
+
console.error(c.r(`--dir "${dir}" escapes the current directory. Pick a path inside the project.`));
|
|
122
|
+
process.exit(1);
|
|
123
|
+
}
|
|
124
|
+
const target = join(targetDir, file);
|
|
125
|
+
await mkdir(targetDir, { recursive: true });
|
|
126
|
+
|
|
127
|
+
if (agent.append) {
|
|
128
|
+
// Idempotent append: if this skill's delimited block is already present,
|
|
129
|
+
// leave the file alone rather than stacking a duplicate copy.
|
|
130
|
+
const marker = `<!-- Adspirer Skill: ${slug} `;
|
|
131
|
+
let existing = '';
|
|
132
|
+
try { existing = await readFile(target, 'utf8'); } catch { /* new file */ }
|
|
133
|
+
if (existing.includes(marker)) {
|
|
134
|
+
console.log(`\r${c.g('✓')} ${c.b(slug)} already present in ${dir}/${file} — left unchanged. `);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const header = `\n\n<!-- Adspirer Skill: ${slug} (adspirer.com/skills/${slug}) -->\n`;
|
|
138
|
+
const { appendFile } = await import('node:fs/promises');
|
|
139
|
+
await appendFile(target, header + md);
|
|
140
|
+
} else {
|
|
141
|
+
await writeFile(target, md);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
console.log(`\r${c.g('✓')} Installed ${c.b(slug)} for ${c.b(agentKey)} `);
|
|
145
|
+
console.log(` ${c.dim('→')} ${dir}/${file}`);
|
|
146
|
+
console.log(` ${c.dim(agent.note)}`);
|
|
147
|
+
console.log(`\n Then tell your agent: ${c.cy(`"run the ${slug.replaceAll('-', ' ')} skill"`)}\n`);
|
|
148
|
+
// Best-effort install telemetry (never blocks; ignores failure).
|
|
149
|
+
fetch(`${BASE}/api/events`, {
|
|
150
|
+
method: 'POST', headers: { 'content-type': 'application/json' },
|
|
151
|
+
body: JSON.stringify({ event_type: 'install_copy', surface: 'cli', skill_id: slug }),
|
|
152
|
+
}).catch(() => {});
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async function main() {
|
|
156
|
+
const args = parseArgs(process.argv.slice(2));
|
|
157
|
+
const [cmd, ...rest] = args._;
|
|
158
|
+
if (args.help || !cmd) return usage();
|
|
159
|
+
try {
|
|
160
|
+
if (cmd === 'add') return await cmdAdd(rest[0], args);
|
|
161
|
+
if (cmd === 'list') return await cmdList();
|
|
162
|
+
if (cmd === 'search') return await cmdSearch(rest.join(' '));
|
|
163
|
+
usage();
|
|
164
|
+
} catch (e) {
|
|
165
|
+
console.error(c.r(`✗ ${e.message}`));
|
|
166
|
+
process.exit(1);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "adspirer-skills",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Install Adspirer Skills — expert Google, Meta, TikTok & LinkedIn ad-ops workflows — into any AI agent (Claude Code, ChatGPT, Cursor, Codex, Gemini, and more). Open Agent-Skills (SKILL.md) format.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"adspirer-skills": "bin/adspirer-skills.mjs"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"engines": { "node": ">=18" },
|
|
10
|
+
"files": ["bin", "README.md"],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"adspirer", "agent skills", "skill", "SKILL.md", "ai agent", "ai advertising",
|
|
13
|
+
"advertising automation", "ad ops", "media planning", "campaign automation",
|
|
14
|
+
"google ads", "meta ads", "facebook ads", "tiktok ads", "linkedin ads", "amazon ads",
|
|
15
|
+
"claude", "claude code", "chatgpt", "cursor", "codex", "gemini", "mcp", "ppc", "marketing"
|
|
16
|
+
],
|
|
17
|
+
"homepage": "https://adspirer.com/skills",
|
|
18
|
+
"repository": { "type": "git", "url": "https://github.com/Adspirer/skills-registry.git" },
|
|
19
|
+
"bugs": { "url": "https://adspirer.com/skills" },
|
|
20
|
+
"author": "Adspirer (https://adspirer.com)",
|
|
21
|
+
"license": "MIT"
|
|
22
|
+
}
|