@heart-of-gold/toolkit 0.1.40 → 0.1.41
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
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Don't Panic.**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
31 skills for AI coding agents. Five plugins. Works with **Claude Code, Codex, OpenCode, Pi**, and any tool supporting the [agentskills.io](https://agentskills.io) standard. Named after *The Hitchhiker's Guide to the Galaxy* because the universe is absurd and your tools should at least have personality.
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
@@ -136,14 +136,15 @@ Configurable sources (RSS, Gmail, HN, web search), narrative briefs, LinkedIn dr
|
|
|
136
136
|
|
|
137
137
|
### [Babel Fish](plugins/babel-fish/) — Universal Translator
|
|
138
138
|
|
|
139
|
-
Turn words into audio. Turn ideas into images. Visualize anything as a terminal mind map.
|
|
139
|
+
Turn words into audio. Turn ideas into images. Visualize anything as a terminal mind map. Stitch screenshots into a LinkedIn-ready carousel PDF.
|
|
140
140
|
|
|
141
|
-
|
|
141
|
+
4 skills
|
|
142
142
|
|
|
143
143
|
```
|
|
144
|
-
/babel-fish:audio
|
|
145
|
-
/babel-fish:image
|
|
146
|
-
/babel-fish:visualize
|
|
144
|
+
/babel-fish:audio # TTS, podcasts, voice cloning, sound effects
|
|
145
|
+
/babel-fish:image # AI image generation and editing
|
|
146
|
+
/babel-fish:visualize # terminal mind maps from any structured content
|
|
147
|
+
/babel-fish:linkedin-carousel # screenshots → LinkedIn document-post PDF with matched backgrounds
|
|
147
148
|
```
|
|
148
149
|
|
|
149
150
|
### [Quellis](plugins/quellis/) — AI Coaching Companion
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> "The Babel fish is small, yellow, leathery, and probably the oddest thing in the universe."
|
|
4
4
|
> It also translates your words into audio and your ideas into images.
|
|
5
5
|
|
|
6
|
-
A media generation plugin for Claude Code. Turns text into audio, ideas into images,
|
|
6
|
+
A media generation plugin for Claude Code. Turns text into audio, ideas into images, structured content into terminal mind maps, and screenshots into LinkedIn-ready carousel PDFs.
|
|
7
7
|
|
|
8
8
|
## Security & Trust
|
|
9
9
|
|
|
@@ -36,10 +36,14 @@ Supports Gemini and FLUX models via OpenRouter API.
|
|
|
36
36
|
### `/babel-fish:visualize`
|
|
37
37
|
Render mind maps and tree visualizations directly in the terminal using Unicode box-drawing characters and ANSI colors. Works over SSH — no browser needed. Use it on brainstorm docs, plan docs, markdown files, or any structured content.
|
|
38
38
|
|
|
39
|
+
### `/babel-fish:linkedin-carousel`
|
|
40
|
+
Turn an ordered set of screenshots or images into a LinkedIn document-post PDF (carousel). Auto-samples each source's corner pixel so per-page padding blends invisibly into the image, picks a sensible canvas aspect from the source dimensions, and renders at 2× with Lanczos resampling. Powered by ImageMagick.
|
|
41
|
+
|
|
39
42
|
## Requirements
|
|
40
43
|
|
|
41
44
|
- ElevenLabs API key (for audio)
|
|
42
45
|
- OpenRouter API key (for image generation)
|
|
46
|
+
- ImageMagick (`magick` on PATH) — for `linkedin-carousel`
|
|
43
47
|
|
|
44
48
|
## Install
|
|
45
49
|
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: linkedin-carousel
|
|
3
|
+
description: >
|
|
4
|
+
Turn a set of screenshots or images into a LinkedIn document-post PDF (carousel)
|
|
5
|
+
with per-page background matching so padding disappears into the source.
|
|
6
|
+
Triggers: linkedin carousel, carousel pdf, document post, slide pdf, screenshots to pdf, linkedin pdf, carousel from images.
|
|
7
|
+
allowed-tools:
|
|
8
|
+
- Read
|
|
9
|
+
- Write
|
|
10
|
+
- Bash
|
|
11
|
+
- Glob
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# LinkedIn Carousel — Babel Fish
|
|
15
|
+
|
|
16
|
+
Translating a stack of screenshots into a feed-ready document post. The trick isn't the PDF — it's making the padding invisible.
|
|
17
|
+
|
|
18
|
+
## Boundaries
|
|
19
|
+
|
|
20
|
+
- **MAY:** read source images, run `magick`, write PNGs and PDFs to the requested output path.
|
|
21
|
+
- **MAY NOT:** upload to LinkedIn, post on the user's behalf, or modify the source images in place.
|
|
22
|
+
|
|
23
|
+
## Prerequisites
|
|
24
|
+
|
|
25
|
+
- ImageMagick installed (`magick` on PATH). Check with `which magick`.
|
|
26
|
+
- Sources are raster images (PNG/JPG). For non-image inputs, ask the user to export first.
|
|
27
|
+
|
|
28
|
+
## Phase 0 — Understand
|
|
29
|
+
|
|
30
|
+
**Entry:** User asked for a LinkedIn carousel.
|
|
31
|
+
|
|
32
|
+
Gather, asking only what's missing:
|
|
33
|
+
|
|
34
|
+
- **Sources**: ordered list of image paths (order = page order in the carousel).
|
|
35
|
+
- **Slug**: kebab-case filename for the PDF (e.g. `harness-lab-carousel`). If the user gives a topic, derive it; otherwise ask.
|
|
36
|
+
- **Output path**: default `thoughts/social-media/carousels/<slug>.pdf` if the repo has that dir; otherwise ask.
|
|
37
|
+
- **Aspect preference**: portrait (best feed performance), square, or landscape. If the user has no preference, **infer from sources** in Phase 1.
|
|
38
|
+
|
|
39
|
+
**Exit:** Source list, output path, and aspect intent are known.
|
|
40
|
+
|
|
41
|
+
## Phase 1 — Plan
|
|
42
|
+
|
|
43
|
+
**Entry:** Inputs gathered.
|
|
44
|
+
|
|
45
|
+
Reason step-by-step before generating:
|
|
46
|
+
|
|
47
|
+
1. Run `magick identify` on each source to get width × height.
|
|
48
|
+
2. **Pick canvas aspect** to minimize padding:
|
|
49
|
+
- User asked for portrait → `1080×1350` (×2 = `2160×2700`).
|
|
50
|
+
- User asked for square → `1080×1080` (×2 = `2160×2160`).
|
|
51
|
+
- **No preference** → if the sources cluster around one aspect, pick the **median** w/h ratio — this minimizes total padding across the deck. If sources span a wide range (e.g. 1.6:1 → 2.6:1), pick the aspect that makes the *most* pages padding-free, and accept that the outliers will get bands.
|
|
52
|
+
3. **Sample background color per page** — the move that makes seams invisible. Need the dimensions first, then sample three corners:
|
|
53
|
+
```bash
|
|
54
|
+
read W H < <(magick identify -format "%w %h" "$src")
|
|
55
|
+
magick "$src" -format \
|
|
56
|
+
"tl=%[pixel:p{5,5}] tr=%[pixel:p{$((W-5)),5}] bl=%[pixel:p{5,$((H-5))}]\n" \
|
|
57
|
+
info:
|
|
58
|
+
```
|
|
59
|
+
If all three corners agree, use that color. If they disagree, the source has no clean border — fall back to `#F4EFE3` (or another neutral the user prefers) and tell them.
|
|
60
|
+
4. Render at **2× target resolution** with Lanczos resampling. 300 DPI in the final PDF.
|
|
61
|
+
|
|
62
|
+
**Exit:** Canvas dimensions chosen, per-page background colors sampled.
|
|
63
|
+
|
|
64
|
+
## Phase 2 — Build
|
|
65
|
+
|
|
66
|
+
**Entry:** Plan complete.
|
|
67
|
+
|
|
68
|
+
Write the build script to a temp file (avoids shell quoting traps), then run it:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
#!/bin/bash
|
|
72
|
+
set -e
|
|
73
|
+
OUT=/path/to/output/dir
|
|
74
|
+
SLUG=harness-lab-carousel # from Phase 0
|
|
75
|
+
CANVAS=2160x2700 # from Phase 1
|
|
76
|
+
declare -a SRCS=(/path/1.png /path/2.png /path/3.png)
|
|
77
|
+
declare -a BGS=('#EFF1F5' '#EFF1F5' '#F2ECEB') # from Phase 1 sampling
|
|
78
|
+
|
|
79
|
+
mkdir -p "$OUT"
|
|
80
|
+
PAGES=()
|
|
81
|
+
for i in "${!SRCS[@]}"; do
|
|
82
|
+
# Zero-pad page number so glob ordering survives 10+ pages.
|
|
83
|
+
n=$(printf "%02d" $((i+1)))
|
|
84
|
+
page="$OUT/page${n}.png"
|
|
85
|
+
magick "${SRCS[$i]}" \
|
|
86
|
+
-filter Lanczos \
|
|
87
|
+
-resize "$CANVAS" \
|
|
88
|
+
-background "${BGS[$i]}" \
|
|
89
|
+
-gravity center \
|
|
90
|
+
-extent "$CANVAS" \
|
|
91
|
+
-quality 95 \
|
|
92
|
+
"$page"
|
|
93
|
+
PAGES+=("$page")
|
|
94
|
+
done
|
|
95
|
+
|
|
96
|
+
# Pass pages explicitly in array order — never rely on shell glob ordering.
|
|
97
|
+
magick "${PAGES[@]}" -density 300 -quality 95 "$OUT/${SLUG}.pdf"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Notes:**
|
|
101
|
+
- `-resize WxH` (without `>` or `!`) fits inside the box preserving aspect; `-extent` then pads to exact canvas using `-background`.
|
|
102
|
+
- Pages are passed to the final `magick` call from the `PAGES` array, not via glob — `page*.png` would put `page10.png` before `page2.png` lexicographically and reorder the carousel.
|
|
103
|
+
- Keep the intermediate `page*.png` files — useful for spot fixes without rebuilding everything.
|
|
104
|
+
- LinkedIn document posts cap at **100 MB** and **300 pages**. A 3–10 page carousel at 2× is typically 1–5 MB.
|
|
105
|
+
|
|
106
|
+
**Exit:** PDF and page PNGs exist at the output path.
|
|
107
|
+
|
|
108
|
+
## Phase 3 — Review
|
|
109
|
+
|
|
110
|
+
**Entry:** PDF built.
|
|
111
|
+
|
|
112
|
+
Open the PDF for the user (`open <path>` on macOS). Report:
|
|
113
|
+
|
|
114
|
+
- Output path
|
|
115
|
+
- Page count, canvas dimensions, file size
|
|
116
|
+
- Per-page background colors used
|
|
117
|
+
- Any fallbacks (e.g., "page 2's corners disagreed — used neutral cream")
|
|
118
|
+
|
|
119
|
+
Ask whether any page needs a different aspect or a tighter crop. Common follow-ups:
|
|
120
|
+
|
|
121
|
+
- "Page X has too much padding" → re-sample with a different canvas aspect, or crop that source before rebuilding.
|
|
122
|
+
- "Backgrounds don't match" → the source likely has anti-aliased edges; sample further from the corner (`{20,20}`).
|
|
123
|
+
- "Quality looks soft" → confirm 2× and Lanczos; check the source isn't already low-res.
|
|
124
|
+
|
|
125
|
+
## Constraints
|
|
126
|
+
|
|
127
|
+
- Never modify source images in place.
|
|
128
|
+
- Never upload, share, or post the output. Hand the file to the user.
|
|
129
|
+
- Default to per-page background sampling. Single-color fallback only when sources disagree.
|
|
130
|
+
- Always render at 2× target and downsample at PDF assembly time — not the other way around.
|
|
131
|
+
- Keep the intermediate PNGs unless the user asks to clean them up.
|
|
132
|
+
|
|
133
|
+
## Output
|
|
134
|
+
|
|
135
|
+
The user receives:
|
|
136
|
+
|
|
137
|
+
- `<output-dir>/<slug>.pdf` — the carousel, ready to upload via LinkedIn's "Add a document".
|
|
138
|
+
- `<output-dir>/page1.png`, `page2.png`, … — per-page renders for inspection.
|
|
139
|
+
- A short summary message with path, dimensions, page count, and any fallbacks taken.
|