agentleFS
jamesdebattyjamesdebatty/skills/skills/release-export/SKILL.md

release-export

Skill0 starsChanged 3 months agoMITView on GitHub

Export a lab repository's committed tree to its public release repository through its release manifest. Use when asked to dry-run, export, or publish a repo that carries a release-manifest.json.

  • Installs packages

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 2 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run it from inside the lab repo.

    line 18
  2. Distinctive:

    Never flip a lab repo public.

    line 65
  3. Distinctive:

    Every export replaces the whole release tree, so a deletion in the lab is a deletion in the release on the next run.

    line 67

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Release export

One export reads the lab repo at HEAD, keeps what release-manifest.json allows, lays the overlay directory over the root, runs the post commands, gates the staged tree, and replaces the release branch's tree with one commit. The manifest is read from HEAD too, so an export is a function of one lab commit: commit the manifest before a dry run. Nothing from the lab's history travels, and nothing uncommitted can ship.

Run it from inside the lab repo. Brain's own copy is ./bin/export; for another lab repo, call brain's bin/export with the current directory inside that repo.

./bin/export --dry-run   # list what ships and run the gate; nothing is written
./bin/export             # one commit pushed to target.repo on target.branch

Options: --target-url <url> overrides the clone and push URL, which defaults to https://github.com/<target.repo>.git. Use it to rehearse against a local bare repository.

Prerequisites: git, tar, and gitleaks (brew install gitleaks). Without gitleaks the gate cannot run and every export is refused.

Manifest

release-manifest.json at the lab root, with no other fields:

fieldmeaning
target{ "repo": "owner/name", "branch": "main" }
sourcemust be "HEAD"; the committed tree is the only source
allowglobs for what ships, one skill directory each; ** crosses directories and matches dotfiles, * stays inside one segment, every glob anchors at the root
denyglobs; deny beats allow
overlaya lab directory whose files land at the release root, overriding copies; they are never shipped at their lab path
forbid[{ "name", "pattern" }] literal strings; any hit in any staged file refuses the export
post[{ "run", "produces" }] commands run inside the staged tree after copy and overlay; every produces path must exist afterwards and no undeclared file may appear

Reading a run

  • Ship lists every staged file with its lab origin: copied files, overlay files as README.md <- release/README.md, regenerated files as catalog.json <- post: ./bin/build-index.
  • Denied files matched a deny glob.
  • Unmatched files matched nothing and stay private. This is a warning, not a failure: read it every run so a new directory is noticed rather than silently kept back or, worse, added to the allow list without a decision.
  • Gate reports the forbidden-pattern sweep and gitleaks over every staged file. A refusal names the release path, the lab path, and the pattern or rule.
  • Refused means nothing was written. Fix the content in the lab, commit, and run again. Never edit a staged tree or widen allow to get past the gate.

Exit codes: 0 passed, 1 refused or failed, 2 usage or manifest error.

Rules

  • Never flip a lab repo public. A release repo is a fresh repository that only ever receives exports.
  • Every export replaces the whole release tree, so a deletion in the lab is a deletion in the release on the next run.
  • One export is one commit, Export from lab <short sha> on <date>. When the release already matches HEAD, no commit is made.
  • Anything that ships passes the gate, test fixtures included. Assemble a fake secret or a forbidden literal at runtime rather than writing it into a file.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.