pre
Skill1 starsChanged 2 months agoMITView on GitHub
Package and play `.pre` slide+audio container files using the `pre` CLI. `pre package` turns a directory of single-page HTML slides and matching audio files into a portable `.pre` file (a ZIP with an embedded browser player). `pre play` serves it locally and opens the browser player. Use when the user asks to "package slides", "make a .pre", "play a .pre", "打包幻灯片", "播放 .pre", or otherwise bundle HTML slides + audio into a single playable file. The CLI does NOT generate content, synthesize speech, or convert PDF/PPTX — produce slides/ and audio/ yourself first, then call `pre package`.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- t-maniteja/codex-failsafetheir own version, first seen Aug 20, 2026
- victor-hac-work/ai-unknowns-resolvertheir own version, first seen Jul 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- t-maniteja/codex-failsafe★ 0same name
- victor-hac-work/ai-unknowns-resolver★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
If pre is not found, ensure $(go env GOPATH)/bin is on PATH:
- Very specific: line 170
Do NOT ask pre to write copy, synthesize speech, or convert PDF/PPTX.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
pre — slide + audio container CLI
pre is a small CLI that does exactly two things:
pre package— bundle aslides/directory (one HTML file per page) and anaudio/directory (one audio file per page, matching basename) into a single.prefile. A browser player is embedded automatically.pre play— extract a.pre, serve it on a local 127.0.0.1 port, and open the browser player. The server shuts itself down when the browser goes away.
It never generates content, runs TTS, calls an LLM, or converts PDF/PPTX.
Produce the slides/ and audio/ inputs yourself (write HTML, export from
tools, or use other skills/agents), THEN call pre package.
Install
Recommended: grab a prebuilt binary from Releases, or use Homebrew:
brew install --cask Z-Mackintosh/tap/pre # macOSBuild from source instead (requires Go 1.23+):
go install github.com/Z-Mackintosh/pre@latest
# or: git clone https://github.com/Z-Mackintosh/pre.git && cd pre && go build -o pre .The binary lands in $(go env GOPATH)/bin (%USERPROFILE%\go\bin on
Windows) — make sure it is on PATH.
Verify:
pre -h
# pre — slide + audio container
# pre package --slides <dir> --audio <dir> -o <file.pre> [--title T] [--author A] [--notes notes.md]
# pre play <file.pre>If pre is not found, ensure $(go env GOPATH)/bin is on PATH:
case ":$PATH:" in *":$(go env GOPATH)/bin:"*) ;; *) export PATH="$(go env GOPATH)/bin:$PATH";; esacInstalling this skill into an agent
This skill is just this SKILL.md file — the repo is the pre CLI
project, not a skill repo. Do not clone the whole repo into your skills
directory (that pulls in main.go, internal/, samples/, etc.). Place
skill/SKILL.md into your agent's skills directory as pre/SKILL.md.
Common skills directories: Claude Code ~/.claude/skills/, Codex
~/.codex/skills/, Cursor .cursor/skills/ (project-level). See your
agent's docs for others.
A. download the single file (recommended)
mkdir -p ~/.<agent>/skills/pre
curl -fsSL https://raw.githubusercontent.com/Z-Mackintosh/pre/main/skill/SKILL.md \
-o ~/.<agent>/skills/pre/SKILL.mdB. copy from a local clone (if you cloned the repo to build the CLI)
mkdir -p ~/.<agent>/skills/pre
cp /path/to/pre/skill/SKILL.md ~/.<agent>/skills/pre/SKILL.mdC. ask the agent to install it
Install the
preskill. The repo is a CLI project, not a skill repo — onlyskill/SKILL.mdis the skill. Do NOT clone the whole repo. Downloadhttps://raw.githubusercontent.com/Z-Mackintosh/pre/main/skill/SKILL.mdto~/.<agent>/skills/pre/SKILL.md, verify it, then confirm.
To update later, re-run the download command.
This skill assumes the pre CLI is already installed and on PATH.
Input conventions (critical)
pre package takes two directories. Files are paired by basename:
slides/ audio/
01.html <--> 01.mp3
02.html <--> 02.m4a
intro.html <--> intro.wavslides/: one.htmlfile per page. Order is by filename sort. Each HTML is a complete standalone page (it will be loaded in an<iframe>).audio/: one audio file per slide, basename must match the HTML exactly. Supported formats:wav,mp3,m4a,ogg. Formats can be mixed across slides. Audio duration is probed to build the timeline — there is no trimming, splitting, or transcoding.- A slide with no matching audio (or vice versa) is an error. Use the same
basename for every pair (e.g.
03.html+03.ogg, NOT03.html+slide3.ogg).
The CLI copies inputs verbatim into the container. It never modifies them.
Commands
pre package
pre package --slides <slides-dir> --audio <audio-dir> -o <out.pre> \
[--title "Talk title"] [--author "Name"] [--notes notes.md]Produces <out.pre> (a ZIP) containing manifest.json, slides/, audio/,
the embedded player/, and optional notes.md.
Example:
pre package --slides ./slides --audio ./audio -o talk.pre \
--title "Q3 roadmap" --author "me" --notes script.mdpre play
pre play <file.pre>Extracts to a temp dir, serves on http://127.0.0.1:<random-port>/, opens
the browser at the player. The local server auto-shuts-down once the browser
stops sending heartbeats (~5s of inactivity), and cleans up temp files.
Listens only on 127.0.0.1 (never exposed to the LAN).
Player controls (no visible UI — keyboard only)
| Key | Action |
→ / ← | next / previous slide (+ sync audio, autoplay) |
Space | play / pause current slide audio |
Esc | enter overview; in overview Esc/Enter returns |
Typical agent workflow
- Generate
slides/01.html, 02.html, …(write HTML yourself, export from a tool, or use another skill). Each file is a full standalone HTML page. - Generate
audio/01.<fmt>, 02.<fmt>, …with matching basenames (record, TTS, etc.). Any of wav/mp3/m4a/ogg, mixable. pre package --slides slides --audio audio -o out.pre --title "...".- To verify:
pre play out.pre(opens a browser; close the tab to stop).
Do NOT ask pre to write copy, synthesize speech, or convert PDF/PPTX. Do
those upstream and hand the resulting files to pre package.
Container layout (for reference)
out.pre (ZIP)
├── manifest.json # version, title, author, timeline (start/end per slide)
├── slides/NN.html
├── audio/NN.<fmt>
├── player/ # player.html, app.js, style.css (embedded by CLI)
└── notes.md # optional, only if --notes givenmanifest.json example:
{
"version": "1.0.0",
"title": "...",
"author": "...",
"slides": [
{ "id": "01", "file": "slides/01.html", "audio": "audio/01.mp3",
"start": 0.0, "end": 12.5 }
]
}Troubleshooting
pre: command not found→$(go env GOPATH)/binnot onPATH(see Install).package: no audio matching slide "01"→ basename mismatch; the audio file for01.htmlmust be named01.*(same basename, any supported ext).play: container has no player/player.html→ the file is not a.preproduced bypre package.
License
MIT. Source: https://github.com/Z-Mackintosh/pre
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

