@hermoso/skills 0.0.0-stage → 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/LICENSE +202 -0
- package/README.md +18 -2
- package/employees/brand-strategist.md +11 -0
- package/employees/copywriter.md +11 -0
- package/employees/creative-director.md +11 -0
- package/employees/growth-marketer.md +11 -0
- package/employees/performance-marketer.md +11 -0
- package/employees/research-analyst.md +11 -0
- package/employees/social-media-manager.md +11 -0
- package/employees/youtube-producer.md +11 -0
- package/package.json +50 -4
- package/playbooks/ad-creative.md +9 -0
- package/playbooks/audience-insight.md +9 -0
- package/playbooks/brand-voice.md +9 -0
- package/playbooks/commercial-direction.md +9 -0
- package/playbooks/competitive-edge.md +9 -0
- package/playbooks/content-strategy.md +9 -0
- package/playbooks/copywriting.md +9 -0
- package/playbooks/cro-landing.md +9 -0
- package/playbooks/hook-writing.md +9 -0
- package/playbooks/marketing-ideas.md +9 -0
- package/playbooks/marketing-psychology.md +9 -0
- package/playbooks/offer-design.md +9 -0
- package/playbooks/paid-ads.md +9 -0
- package/playbooks/platform-copy.md +9 -0
- package/playbooks/positioning.md +9 -0
- package/playbooks/product-photography.md +9 -0
- package/playbooks/retention-edit.md +9 -0
- package/playbooks/retention-skeleton.md +9 -0
- package/playbooks/scriptwriting.md +9 -0
- package/playbooks/social-content.md +9 -0
- package/playbooks/storytelling.md +9 -0
- package/playbooks/visual-design.md +9 -0
- package/playbooks/youtube-script.md +9 -0
- package/skills/ad-hooks/SKILL.md +55 -0
- package/skills/ad-library-research/SKILL.md +50 -0
- package/skills/campaign-analyst/SKILL.md +73 -0
- package/skills/hermoso/SKILL.md +66 -0
- package/skills/hermoso-ad-from-brand/SKILL.md +59 -0
- package/skills/hermoso-approval-checkpoints/SKILL.md +78 -0
- package/skills/hermoso-article-everywhere/SKILL.md +166 -0
- package/skills/hermoso-edit-timeline/SKILL.md +120 -0
- package/skills/hermoso-generate/SKILL.md +58 -0
- package/skills/hermoso-lock-presenter/SKILL.md +91 -0
- package/skills/hermoso-product-photoshoot/SKILL.md +94 -0
- package/skills/hermoso-research/SKILL.md +39 -0
- package/skills/hermoso-setup-check/SKILL.md +70 -0
- package/skills/local-seo-audit/SKILL.md +208 -0
- package/skills/motion-design/SKILL.md +193 -0
- package/skills/recreate-edit/SKILL.md +141 -0
- package/skills/singing-ad/SKILL.md +105 -0
- package/src/index.js +101 -0
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: singing-ad
|
|
3
|
+
description: Make a singing ad (a music ad) for a product by writing short catchy lyrics around it, picking a genre and a singer (a realistic AI singer, a saved creator, or an animated character or product mascot), and getting a 15 to 30 second video of the singer performing the song on camera with product shots. Use when the user asks for a jingle, a music ad or a singing ad; captions and an end card only when asked.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Singing ad
|
|
7
|
+
|
|
8
|
+
A singing ad is a short song about one product, sung on camera by one person, cut with a shot or two of the product in
|
|
9
|
+
use. It works because a melody gets remembered and the product name is sung in the chorus. You write the lyrics, then
|
|
10
|
+
the video model films the singer singing them, in sync, with the product in the frame. Use a video model that
|
|
11
|
+
generates native audio and can sing written lyrics in one take of up to 30 seconds; `hermoso_capabilities` says which
|
|
12
|
+
models support audio and how long a take they hold.
|
|
13
|
+
|
|
14
|
+
## Tools you use
|
|
15
|
+
|
|
16
|
+
| Step | Tool |
|
|
17
|
+
|---|---|
|
|
18
|
+
| What we know about the brand, its product photos | `get_brand`, `list_product_photos` |
|
|
19
|
+
| A local photo to a URL | `upload_file` |
|
|
20
|
+
| The saved cast (to star a creator) | `list_creators` |
|
|
21
|
+
| An animated singer's character still (only for the animated look) | `generate_image` (prompt, refImages: the product photo or logo for a mascot) |
|
|
22
|
+
| Which video models sing, per length | `hermoso_capabilities` |
|
|
23
|
+
| Film the singer singing, with the product | `generate_video` (model, prompt, refImages, durationSeconds, aspectRatio, resolution, optional creator) |
|
|
24
|
+
| Check the words came out right | `analyze_video` (the transcript) |
|
|
25
|
+
| Lyric captions, only when asked | `add_subtitles` (video, cues) |
|
|
26
|
+
| End card, only when asked | `post_edit` (videoUrl, ops `[{op:'append_card', seconds:3}]`) |
|
|
27
|
+
|
|
28
|
+
The table names hosted Hermoso (`HERMOSO_API_KEY`, MCP at `https://app.hermoso.ai/mcp`) tools. In the open
|
|
29
|
+
`@hermoso/mcp` server, `get_brand` is the same, `add_subtitles` is `add_captions` (`video`, `cues`) and `post_edit` is
|
|
30
|
+
`apply_video_edits` (`video`, the same `ops`). `list_product_photos`, `upload_file`, `list_creators`,
|
|
31
|
+
`generate_image`, `hermoso_capabilities`, `generate_video` and `analyze_video` run on hosted Hermoso only.
|
|
32
|
+
|
|
33
|
+
## Checkpoints before any render
|
|
34
|
+
Every render waits for three yeses, one at a time (the hermoso-approval-checkpoints skill has the detail):
|
|
35
|
+
1. **The script.** Show the concept, the lyrics and the timed shot list in full. Edits come back here.
|
|
36
|
+
2. **The pictures.** Show what the render will be built from (the product photo, the character still for an animated
|
|
37
|
+
look) and let the user pick.
|
|
38
|
+
3. **The go-ahead.** Generation runs on hosted Hermoso by default, or on your own model keys. Show the render plan
|
|
39
|
+
(`dryRun: true`: model, length, resolution) and run only after a yes, with an `idempotency_key` you reuse on any
|
|
40
|
+
retry. If the user says to skip a checkpoint or sets limits up front, do that.
|
|
41
|
+
|
|
42
|
+
## The workflow
|
|
43
|
+
|
|
44
|
+
### 1. Intake (one message)
|
|
45
|
+
Ask only for what is missing: the product and its name, a product photo (`list_product_photos`; else ask for one), the
|
|
46
|
+
idea in one line (who it is for, the problem it fixes, the mood), the genre (pop, country, hip-hop, rock, R&B,
|
|
47
|
+
musical, 80s synth, acoustic), the look (a realistic singer: an AI singer described in a few words or a saved creator;
|
|
48
|
+
or animated: 3D, cartoon, claymation or anime, a character or the product or logo as the mascot), the voice (female or
|
|
49
|
+
male: always the singer's own, so a man never sings in a woman's voice), the length (15, 20 or 30 seconds) and the
|
|
50
|
+
language. Never ask about anything technical.
|
|
51
|
+
|
|
52
|
+
### 2. Write the lyrics and show them
|
|
53
|
+
One section per 6 to 10 seconds: a 15 s song is a hook and a chorus; 20 s is a verse and a chorus; 30 s is a verse, a
|
|
54
|
+
pre-chorus, a chorus and a short tag. The rules:
|
|
55
|
+
- The first sung line is the hook and lands in the first two seconds: a problem, a wish or a funny truth the buyer
|
|
56
|
+
knows. Never open with the brand name, "Introducing" or a greeting.
|
|
57
|
+
- The product name is sung in the chorus, ideally twice, at the start or end of a line.
|
|
58
|
+
- Three to eight everyday words a line, rhymes that sound natural when sung, one concrete picture per section.
|
|
59
|
+
- About two sung words a second, so the singer sings the whole song (far fewer and they mime an empty backing track;
|
|
60
|
+
far more and the words get swallowed).
|
|
61
|
+
- Numbers spelled out. No amounts of money, percentages, web addresses, claims or reviews the brief does not give.
|
|
62
|
+
- The last sung line is the payoff: the name and the reason to get it.
|
|
63
|
+
- In another language, write it as a native songwriter would, never a translation.
|
|
64
|
+
Show the lyrics with the section names and get the OK (or the edits) before anything is rendered.
|
|
65
|
+
|
|
66
|
+
### 3. Film it
|
|
67
|
+
One `generate_video` call on a model that sings in one take (so the song never breaks), with the product photo in
|
|
68
|
+
`refImages` and `durationSeconds` = the song length. To star a saved creator pass `creator`. The prompt, in this
|
|
69
|
+
shape:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
A vertical music-video ad for <name>, <genre> style, filmed like real footage: natural light, real skin texture,
|
|
73
|
+
natural blinks, a handheld camera with a little movement.
|
|
74
|
+
The singer sings this song, word for word, in a <genre> melody (<two or three style words: e.g. acoustic guitar, hand
|
|
75
|
+
claps, 100 bpm>), lips in sync with every word, moving on the beat:
|
|
76
|
+
[Verse] <line> / <line>
|
|
77
|
+
[Chorus] <line> / <line>
|
|
78
|
+
THE SINGER: <age range, look, hair, wardrobe, energy> (or: the person in Image 1).
|
|
79
|
+
SETTING: <one location for the whole song>.
|
|
80
|
+
Shot 1 (0-6s): the singer sings to camera ...
|
|
81
|
+
Shot 2 (6-9s): cutaway to the product in Image 1 being used: <what we see> ...
|
|
82
|
+
Shot 3 (9-15s): the singer sings the chorus holding the product ...
|
|
83
|
+
Keep the product's shape, colours and label exactly as in the reference image.
|
|
84
|
+
No on-screen text, captions, logos or watermarks other than the product's own label.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
The singer is on camera most of the time and always on the first shot and the last line; one or two short product
|
|
88
|
+
shots show the product in real use. Name the voice in the prompt ("a man sings", "a warm female voice") so it matches
|
|
89
|
+
the singer. Never lay a separate voice or a dub over the finished clip: the video model sings it, so the lips match.
|
|
90
|
+
|
|
91
|
+
**Animated look.** First draw the character once with `generate_image` (9:16): for a mascot, pass the product photo
|
|
92
|
+
(or the logo file) in `refImages` and ask for the product itself as the character's body, label and colours exactly as
|
|
93
|
+
in the photo, with cartoon eyes, a singing mouth, small arms and legs; for a character, describe it in the chosen
|
|
94
|
+
style (3D animated feature film, bright 2D cartoon, claymation stop-motion, or anime). Then film it as above with the
|
|
95
|
+
still as Image 1 and the product photo as Image 2, and open the prompt with the style ("An animated music-video ad in
|
|
96
|
+
the style of claymation stop-motion...") instead of "filmed like real footage".
|
|
97
|
+
|
|
98
|
+
### 4. Check it, then finish only what was asked
|
|
99
|
+
Run `analyze_video` on the result and compare the transcript with the lyrics. Tell the user honestly if a word or the
|
|
100
|
+
product name came out wrong; offer to re-film only if they ask (a new take is a full new render). Captions and an end
|
|
101
|
+
card are off unless the user asked: then `add_subtitles` with `cues` (one cue per lyric line, timed from the
|
|
102
|
+
transcript) and `post_edit` with `append_card`.
|
|
103
|
+
|
|
104
|
+
### 5. Hand it over
|
|
105
|
+
Give the video link and the lyrics. Suggest a second genre or a different hook as a variation to test.
|
package/src/index.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
|
|
2
|
+
import { readdirSync, readFileSync, existsSync } from 'node:fs';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
|
|
6
|
+
export const ROOT = join(dirname(fileURLToPath(import.meta.url)), '..');
|
|
7
|
+
|
|
8
|
+
/** Minimal frontmatter reader: `key: value`, JSON-quoted strings, and `[a, b]` lists. */
|
|
9
|
+
export function parseFrontmatter(text) {
|
|
10
|
+
const m = String(text).match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);
|
|
11
|
+
if (!m) return { meta: {}, body: String(text) };
|
|
12
|
+
const meta = {};
|
|
13
|
+
for (const line of m[1].split(/\r?\n/)) {
|
|
14
|
+
const kv = line.match(/^([A-Za-z][\w-]*):\s*(.*)$/);
|
|
15
|
+
if (!kv) continue;
|
|
16
|
+
let v = kv[2].trim();
|
|
17
|
+
if (/^\[.*\]$/.test(v)) v = v.slice(1, -1).split(',').map((s) => s.trim().replace(/^["']|["']$/g, '')).filter(Boolean);
|
|
18
|
+
else if (/^".*"$/.test(v)) { try { v = JSON.parse(v); } catch { v = v.slice(1, -1); } } else if (/^'.*'$/.test(v)) v = v.slice(1, -1);
|
|
19
|
+
meta[kv[1]] = v;
|
|
20
|
+
}
|
|
21
|
+
return { meta, body: m[2].trim() };
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function readDir(kind, { root = ROOT } = {}) {
|
|
25
|
+
const dir = join(root, kind);
|
|
26
|
+
if (!existsSync(dir)) return [];
|
|
27
|
+
const out = [];
|
|
28
|
+
for (const name of readdirSync(dir).sort()) {
|
|
29
|
+
const file = kind === 'skills' ? join(dir, name, 'SKILL.md') : join(dir, name);
|
|
30
|
+
if (kind === 'skills' ? !existsSync(file) : !name.endsWith('.md')) continue;
|
|
31
|
+
const { meta, body } = parseFrontmatter(readFileSync(file, 'utf8'));
|
|
32
|
+
const id = meta.name || name.replace(/\.md$/, '');
|
|
33
|
+
out.push({ kind: kind.replace(/s$/, ''), name: id, title: meta.title || id, summary: meta.summary || meta.description || '', meta, body, file });
|
|
34
|
+
}
|
|
35
|
+
return out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
let cache = null;
|
|
39
|
+
export function library({ root = ROOT, fresh = false } = {}) {
|
|
40
|
+
if (!cache || fresh || root !== ROOT) {
|
|
41
|
+
const lib = { skills: readDir('skills', { root }), playbooks: readDir('playbooks', { root }), employees: readDir('employees', { root }) };
|
|
42
|
+
if (root !== ROOT) return lib;
|
|
43
|
+
cache = lib;
|
|
44
|
+
}
|
|
45
|
+
return cache;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const brief = ({ kind, name, title, summary }) => ({ kind, name, title, summary });
|
|
49
|
+
|
|
50
|
+
export const listSkills = () => library().skills.map(brief);
|
|
51
|
+
export const listPlaybooks = () => library().playbooks.map(brief);
|
|
52
|
+
export const listEmployees = () => library().employees.map((e) => ({ ...brief(e), playbooks: e.meta.playbooks || [], skills: e.meta.skills || [] }));
|
|
53
|
+
|
|
54
|
+
/** Any entry by name (a skill, playbook or employee), with its full text. */
|
|
55
|
+
export function getEntry(name) {
|
|
56
|
+
const n = String(name || '').trim().toLowerCase().replace(/_/g, '-');
|
|
57
|
+
const lib = library();
|
|
58
|
+
return [...lib.skills, ...lib.playbooks, ...lib.employees].find((e) => e.name === n) || null;
|
|
59
|
+
}
|
|
60
|
+
export const getSkill = (name) => library().skills.find((e) => e.name === name) || null;
|
|
61
|
+
export const getPlaybook = (name) => library().playbooks.find((e) => e.name === name) || null;
|
|
62
|
+
export const getEmployee = (name) => library().employees.find((e) => e.name === name) || null;
|
|
63
|
+
|
|
64
|
+
/** The instructions an agent takes on to work as an employee: the role plus its playbooks. */
|
|
65
|
+
export function employeeInstructions(name) {
|
|
66
|
+
const e = getEmployee(name);
|
|
67
|
+
if (!e) throw new Error(`No employee "${name}". Choose one of: ${library().employees.map((x) => x.name).join(', ')}.`);
|
|
68
|
+
const plays = (e.meta.playbooks || []).map(getPlaybook).filter(Boolean);
|
|
69
|
+
return [`ROLE: ${e.title}\n${e.body.replace(/^#.*\n+/, '')}`, ...plays.map((p) => `PLAYBOOK: ${p.title}\n${p.body.replace(/^#.*\n+/, '')}`)].join('\n\n');
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** Tools in the shared open shape. */
|
|
73
|
+
export function getTools() {
|
|
74
|
+
const READ = { readOnlyHint: true };
|
|
75
|
+
return [
|
|
76
|
+
{
|
|
77
|
+
name: 'list_skills', group: 'skills',
|
|
78
|
+
description: 'List the skills (step-by-step agent workflows), playbooks (marketing expertise) and AI employees (roles that bundle them).',
|
|
79
|
+
inputSchema: { type: 'object', properties: { kind: { type: 'string', enum: ['skill', 'playbook', 'employee', 'all'] } }, additionalProperties: false },
|
|
80
|
+
annotations: READ,
|
|
81
|
+
run: async ({ kind = 'all' } = {}) => ({
|
|
82
|
+
...(kind === 'all' || kind === 'skill' ? { skills: listSkills() } : {}),
|
|
83
|
+
...(kind === 'all' || kind === 'playbook' ? { playbooks: listPlaybooks() } : {}),
|
|
84
|
+
...(kind === 'all' || kind === 'employee' ? { employees: listEmployees() } : {}),
|
|
85
|
+
}),
|
|
86
|
+
summarize: (o) => Object.entries(o).map(([k, list]) => `${k}: ${list.map((e) => e.name).join(', ')}`).join('\n'),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
name: 'get_skill', group: 'skills',
|
|
90
|
+
description: 'Read one skill, playbook or employee in full by name, to follow it.',
|
|
91
|
+
inputSchema: { type: 'object', properties: { name: { type: 'string' } }, required: ['name'], additionalProperties: false },
|
|
92
|
+
annotations: READ,
|
|
93
|
+
run: async ({ name }) => {
|
|
94
|
+
const e = getEntry(name);
|
|
95
|
+
if (!e) throw new Error(`No skill, playbook or employee named "${name}". Use list_skills.`);
|
|
96
|
+
return { kind: e.kind, name: e.name, title: e.title, summary: e.summary, ...(e.kind === 'employee' ? { instructions: employeeInstructions(e.name) } : { body: e.body }) };
|
|
97
|
+
},
|
|
98
|
+
summarize: (o) => `${o.kind} ${o.name}:\n${o.instructions || o.body}`,
|
|
99
|
+
},
|
|
100
|
+
];
|
|
101
|
+
}
|