@synapta/skills 2.4.6 → 2.5.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@synapta/skills",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Agent Skills loader + bundled default skill pack",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"yaml": "^2.5.0",
|
|
28
28
|
"zod": "^3.23.0",
|
|
29
|
-
"@synapta/schemas": "2.
|
|
29
|
+
"@synapta/schemas": "2.5.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"tsup": "^8.3.0",
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asset-generator
|
|
3
|
+
description: Generate image + video assets for a Synapta build using Higgsfield (default). Users can override this skill with their own provider (Replicate, fal, Stable Diffusion, etc.).
|
|
4
|
+
triggers:
|
|
5
|
+
- visual_identity
|
|
6
|
+
- asset
|
|
7
|
+
- hero
|
|
8
|
+
- logo
|
|
9
|
+
- favicon
|
|
10
|
+
- demo-video
|
|
11
|
+
- og-card
|
|
12
|
+
requires:
|
|
13
|
+
capability: text
|
|
14
|
+
network: on
|
|
15
|
+
tools:
|
|
16
|
+
- higgsfield.submit
|
|
17
|
+
- higgsfield.status
|
|
18
|
+
- higgsfield.download
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# Asset generator — image + video for the running app
|
|
22
|
+
|
|
23
|
+
You're operating during Synapta's Plan-mode discovery (`visual_identity` category) and again during roadmap execution when a step has `kind: 'asset'`. Your job is twofold:
|
|
24
|
+
|
|
25
|
+
1. **In planning** — turn the user's brand/style answers into a concrete prompt-per-preset for every asset the app needs. The user supplies the concept (mood, references, hero shot). You decide composition, lighting, color references, lens, camera move (for video).
|
|
26
|
+
2. **In execution** — when the runner hits a `kind: 'asset'` step, submit the prompt to the configured provider, poll until terminal, place files on disk under the framework-correct folder, and emit a markup snippet (`<Image>` for Next, `<video>` with all sources) the agent can paste into JSX.
|
|
27
|
+
|
|
28
|
+
## Provider contract
|
|
29
|
+
|
|
30
|
+
This skill is **provider-agnostic**. The default implementation calls Higgsfield's official REST API (`platform.higgsfield.ai`) via `@synapta/assets`. To override, the user creates `~/.synapta/skills/asset-generator/SKILL.md` plus a `generate.mjs` (or `.ts`) that exports `generate(input)` matching the `AssetSkill` interface in `@synapta/assets/dist/types.d.ts`.
|
|
31
|
+
|
|
32
|
+
The input is:
|
|
33
|
+
|
|
34
|
+
```ts
|
|
35
|
+
{
|
|
36
|
+
request: { id, presetId, concept, prompt, styleReferences? },
|
|
37
|
+
preset: { id, label, kind, model, aspect, dim?, duration?, camera?, outputs, ... },
|
|
38
|
+
framework: 'next' | 'vite' | 'astro' | 'static',
|
|
39
|
+
cwd: string,
|
|
40
|
+
higgsfield?: { apiKey, secret } // present iff `synapta auth higgsfield` was run
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The output must be:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
{ request, preset, files: string[], markupSnippet?, creditsUsed? }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
`files` are paths relative to `cwd` that were actually written.
|
|
51
|
+
|
|
52
|
+
## Preset playbook
|
|
53
|
+
|
|
54
|
+
Synapta ships with these built-in presets — your prompts should respect each preset's aspect, kind, and output formats:
|
|
55
|
+
|
|
56
|
+
| Preset id | Kind | Use |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `hero.landing.desktop` | image | Wide 16:9 landing hero |
|
|
59
|
+
| `hero.landing.mobile` | image | 4:5 mobile hero crop |
|
|
60
|
+
| `hero.loop` | video | 8s cinematic loop from the desktop still (Higgsfield DoP) |
|
|
61
|
+
| `og.card` | image | 1200×630 social card |
|
|
62
|
+
| `favicon` | image | 512×512 source → favicon set |
|
|
63
|
+
| `product.catalog` | image | 4:5 photoreal product shots |
|
|
64
|
+
| `demo.video` | video | 8s product explainer |
|
|
65
|
+
| `social.ad.vertical` | video | 15s 9:16 ad for TikTok/Reels/Shorts |
|
|
66
|
+
| `illustration.empty-state` | image | 1:1 empty-state illustration |
|
|
67
|
+
|
|
68
|
+
## Prompt-crafting rules
|
|
69
|
+
|
|
70
|
+
- Lock to brand mood from the visual_identity discovery answers.
|
|
71
|
+
- Include physical concreteness: lens, lighting, color story, time of day, surface materials.
|
|
72
|
+
- For video, name the camera move from Higgsfield's vocabulary: `bullet-time`, `super-dolly-out`, `dolly-in`, `robotic-arm`, `drone-push-in`, `orbit`, `static`.
|
|
73
|
+
- Avoid text in images — generative models still render text badly. The framework will layer real text via the markup.
|
|
74
|
+
- Refuse NSFW / disallowed content per Higgsfield's policy.
|
|
75
|
+
|
|
76
|
+
## Soft-fail behavior
|
|
77
|
+
|
|
78
|
+
If credentials are missing OR the provider call fails, skip the asset and emit a TODO comment in the markup so the code build never blocks on a missing asset. The runner surfaces a `synapta asset regenerate <id>` hint so the user can retry after fixing credentials.
|