bundle-and-verify
Skill8 starsChanged 7 months agoApache-2.0View on GitHub
Do not build a bundle from code that fails syntax checks. bundle.sh embeds files as heredocs with __EOF_LIB_<name>__ delimiters. If any embedded file contains this exact pattern on a line, the heredoc terminates early: If any matches are found, the files with those matches cannot be safely bundled until the pattern is removed. Critical: bundle.sh must write ONLY bundle content to stdout. Any echo, log_*, or debug output in bundle.sh corrupts the bundle. The release.yml workflow does bash bundle.sh >…
- Deletes or force-pushes
In this repository22 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/workflows/CLAUDE.mdCLAUDE.md
- lib/CLAUDE.mdCLAUDE.md
- prompts/CLAUDE.mdCLAUDE.md
- schemas/CLAUDE.mdCLAUDE.md
- scripts/CLAUDE.mdCLAUDE.md
- tests/CLAUDE.mdCLAUDE.md
- add-bats-testSkill
- add-edge-testSkill
- add-gather-agentSkill
- add-integration-testSkill
- add-synthesis-fixtureSkill
- audit-prompt-schema-syncSkill
- check-ci-locallySkill
- debug-agent-failureSkill
- fixture-syncSkill
- pre-pr-checklistSkill
- rebuild-test-imageSkill
- release-ultrainitSkill
- run-testsSkill
- tune-synthesis-contextSkill
- validate-generated-artifactSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Do not build a bundle from code that fails syntax checks.
- Distinctive: line 36
If any matches are found, the files with those matches cannot be safely bundled until the pattern is removed.
≈ “Common” is an estimate: at least 1 in 5 of the 372,429 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
Before You Start
bundle.sh— the bundler; embeds alllib/,prompts/,schemas/,scripts/as heredocsMakefile—bundleandcleantargetsdist/ultrainit.sh— the output artifact (gitignored).github/workflows/release.yml— runsbash bundle.sh > dist/ultrainit.shat release time
Steps
1. Run quality checks first
make checkDo not build a bundle from code that fails syntax checks.
2. Check for delimiter conflicts
bundle.sh embeds files as heredocs with __EOF_LIB_<name>__ delimiters. If any embedded file contains this exact pattern on a line, the heredoc terminates early:
grep -rn '__EOF_LIB_' lib/ scripts/ prompts/ schemas/ 2>/dev/nullIf any matches are found, the files with those matches cannot be safely bundled until the pattern is removed.
3. Build the bundle
mkdir -p dist
bash bundle.sh > dist/ultrainit.sh
chmod +x dist/ultrainit.shCritical: bundle.sh must write ONLY bundle content to stdout. Any echo, log_*, or debug output in bundle.sh corrupts the bundle. The release.yml workflow does bash bundle.sh > dist/ultrainit.sh — spurious stdout becomes part of the script.
4. Syntax-check the bundle
bash -n dist/ultrainit.sh && echo "syntax OK"Failure here usually means a heredoc delimiter collision or a syntax error introduced during bundling.
5. Check bundle size
du -sh dist/ultrainit.sh
wc -l dist/ultrainit.shExpected range: 2,000-8,000 lines depending on prompt and schema content. A dramatically smaller bundle (< 1,000 lines) suggests a delimiter collision truncated the output.
6. Test self-extraction
# Test --help in an isolated tmpdir
tmpdir=$(mktemp -d)
bash dist/ultrainit.sh --help
rm -rf "$tmpdir"Self-extraction should emit the usage message without error.
7. Clean up
make clean # removes dist/ultrainit.shOr keep dist/ultrainit.sh if you need it for manual testing.
Verify
bash -n dist/ultrainit.sh # syntax
du -sh dist/ultrainit.sh # size sanity
bash dist/ultrainit.sh --help # self-extractionCommon Mistakes
- Forgetting
stdoutpurity inbundle.sh— any diagnostic output inbundle.shcorrupts the artifact. The bundle is always produced via stdout redirect (bash bundle.sh > dist/ultrainit.sh), so stdout is the output. - Skipping the delimiter conflict check — low probability but high impact. A match produces a silently truncated bundle that passes
bash -non the truncated portion but fails at runtime when trying to source missing content. - Not running
make checkfirst —bash -n dist/ultrainit.shonly checks the bundle's wrapper script syntax, not the syntax of embedded files. Catch embedded syntax errors withmake checkbefore bundling.
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.

