cli-generated-files
Skill221 starsChanged 6 days agoMITView on GitHub
Regenerate the committed files that come from the CLI. Use after changing anything under packages/cli/src (colors, tokens, schemas, figma), designsystemet.config.json or internal/digdir/digdir.config.json.
In this repository4 other files it gives its agents.
- designsystemetSkill
- figmaSkill
- webSkill
- www-contentSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 17
If the config schema changed, the unit tests fail on its snapshot.
- Very specific: line 19
Only when sizes, typography, colors or semantic tokens change.
- Distinctive: line 21
If a step gives no diff, there is nothing to commit for it.
- Very specific: line 27
Do not edit apps/www/app/content/schemas/config/*.json by hand.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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
Regenerate the files the CLI generates
Several generated files are committed, and CI does not check that they are up to date. After a change to the CLI's colors, tokens or schemas, run these from the repo root, in this order, and include the resulting diff in the same pull request.
pnpm build:cli- The apps and the Figma plugin use the CLI's built
dist, not its source, so build first. - Also rewrites
packages/cli/docs/designsystemet.config.defaults.json.
- The apps and the Figma plugin use the CLI's built
pnpm update:theme- Rewrites
packages/css/theme/(designsystemet.css,designsystemet.tailwind.css,types.d.ts,colors.d.ts) andinternal/digdir/themes/.
- Rewrites
pnpm test:cli- Rewrites the fixtures in
packages/cli/tests/config/design-tokens/andpackages/cli/tests/config/build/, then runs the unit tests. - If the config schema changed, the unit tests fail on its snapshot. Check that the schema diff is what you meant, update the snapshot with
pnpm --filter @digdir/designsystemet test:unit -u, and go on to step 4. See "Config schema changes" below.
- Rewrites the fixtures in
pnpm update:preview-tokens- Only when sizes, typography, colors or semantic tokens change. Rewrites
internal/components/src/tokens/design-tokens/, which the token tables in the docs use.
- Only when sizes, typography, colors or semantic tokens change. Rewrites
If a step gives no diff, there is nothing to commit for it. A diff you did not expect means the change affects more output than intended; look at it before committing.
Config schema changes
- The JSON schema is a snapshot:
packages/cli/src/schemas/__snapshots__/config.schema.json. The unit tests fail when it differs. Update it on purpose withpnpm --filter @digdir/designsystemet test:unit -u. - A breaking change to the shape of the config needs a migration in
packages/cli/src/migrations/, registered inindex.ts. - Do not edit
apps/www/app/content/schemas/config/*.jsonby hand. They are copied from the CLI at release.
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.

