code-gen
Skill0 starsChanged 57 days agoApache-2.0View on GitHub
Regenerate the committed generated files, such as the JSON Schemas under docs/schemas/, after changing the package types they are rendered from or a gen-* recipe in the justfile. Use after editing such a type or recipe, before running tests or committing, or when CI's `gen-check` job fails with "Generated code is out of date". Not for formatting or linting; see /code-format and /code-check.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- botlearn-ai/botlearn-skillstheir own version, first seen Mar 2, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- botlearn-ai/botlearn-skills★ 9same 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 repository16 other files it gives its agents.
- AGENTS.mdAGENTS.md
- code-checkSkill
- code-formatSkill
- code-reviewSkill
- code-testSkill
- commitSkill
- feat-discoverySkill
- feat-statusSkill
- feat-validateSkill
- releaseSkill
- code-rules-checkSkill
- code-rulesSkill
- docs-rules-checkSkill
- docs-rules-creatorSkill
- docs-rulesSkill
- skills-checkSkill
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
- could be automatic: a setting could enforce it
- Very specific: line 16
Run just gen when a change touches:
- Very specific: line 63
Run it after /code-format and /code-check, and before /code-test: the schema tests read the committed schemas, so a stale one fails them …
≈ “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.
Files
Code Generation Skill
Some files in this repository are generated and committed: the JSON Schemas under docs/schemas/, which
editors validate the specification files against. Each is rendered from types the package declares, so
a change to those types leaves the committed file stale until it is regenerated.
When to Run
Run just gen when a change touches:
A type a generator imports. The generators are the
gen-*recipes in thejustfile. Each is auvscript that imports what it renders from the packages, so its imports are its inputs:grep -n '^ from lorecraft' justfileA change to a module those lines import, or to anything that module's types are built from, changes the output. Their field docstrings and their
SchemaInfometadata are rendered too, so a reworded docstring is a change to the output.- A
gen-*recipe itself.
Nothing else needs it. When unsure, run it: a generator with nothing to change leaves the tree as it was.
Commands
just sync # first, when the environment may be stale: the generators import the package
just gen # every generator; `just gen-schemas` runs the schema generator aloneThen look at what changed, and read the diff as a review of the change that caused it:
git status --short docs/schemas
git diff docs/schemasA description that reads badly in the diff reads badly in an editor too: fix the docstring, not the output.
Rules
- Commit the output with the change that caused it. CI's
gen-checkjob runsjust genand fails on any difference from the committed tree, a new file included. - Never edit a generated file by hand. The next
just genundoes it, and CI rejects it before that. - A generator restates nothing. It imports the types it renders; a field, a description or an example written into a recipe is a second copy that drifts. Add it to the package's type instead.
- A schema is rendered from the model that validates the file. The package deserializes each file with the
same pydantic model the generator renders, so the schema an editor applies and the check's validation cannot
disagree about a shape. A test beside each model, such as
tests/it/test_structure_spec_schema.py, holds the committed schema to every file this repository writes. When it fails, fix the model or the file. Never loosen the test.
Where It Fits
Run it after /code-format and /code-check, and before /code-test: the schema tests read the committed
schemas, so a stale one fails them for a reason that has nothing to do with the code under test.
Common Mistakes to Avoid
- Fixing a failed
gen-checkjob by hand-editing the file to match what CI printed. Runjust gen. - Running a generator's code another way, such as a copy of it in a scratch script. The recipe is the one place that writes the output, and the one CI checks.
Next Steps
After regenerating:
- Run targeted tests → use
/code-test; the schema tests are in the integration tier,just test-it - Commit the generated files with the change → use
/commit
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.

