Skip to content
Back to skills

Code Generation

ASecurity

Regenerate code after generator input, implementation, configuration, or tool-version changes.

  • 56 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 20, 2026
databasespythongosql

Works with

  • cli

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned October 7, 2026

npx -y skills add block/proto-fleet --skill code-generation --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Code Generation?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Code Generation
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/block-code-generation/badge)](https://www.skillsdirectory.com/skills/block-code-generation)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: code-generation
description: Regenerate code after generator input, implementation, configuration, or tool-version changes.
---

# Code generation

After source edits are complete, use scoped commands for generator inputs and
full generation for generator implementation, configuration, or tool-version
changes, or inputs spanning generators. Run the selected command from the
repo root. Keep source and generated output together; never patch generated
files by hand. Inspect the pre-existing diff before generation so user changes
remain identifiable.

| Source changes | Command |
| --- | --- |
| Protobuf contracts in `proto/` or `server/sdk/v1/pb/` | `just gen-protos` |
| SQL schema in `server/migrations/` or queries in `server/sqlc/queries/` | `just gen-db-queries` |
| Fleet CLI manifest (`server/tools/generate-fleet-cli/commands.json`) or templates (`server/tools/generate-fleet-cli/templates/`) | `just gen-fleet-cli` |
| Inputs to the server's `go:generate` directives | `just gen-go` |
| Generator implementations, configuration/tool versions (including Buf and sqlc configuration), or inputs spanning generators | `just gen` |

The scoped commands avoid unrelated generators and full client/server
formatting. `just gen-protos` includes SDK protobufs and the protobuf-driven
Fleet CLI.

Read only the reference relevant to the change:

- [Protobuf](references/protobuf.md): proto contracts and generated consumers.
- [SQL](references/sql.md): migrations, queries, and sqlc bindings.
- [Generator upgrades](references/generator-upgrades.md): Buf dependencies
  or generator versions; combine with protobuf guidance when both apply.

Inspect the resulting diff and validate affected consumers. Investigate
unexpected output using source changes, generator configuration, and tool
versions; do not assume it proves the branch was stale. Resolve generation
failures caused by the requested change and rerun; report external blockers.

`just gen` does not rebuild the Python generator distribution. Source changes
there or to bundled `scripts/pip-config.sh` require the
[packaging skill](../python-gen-tarball/SKILL.md).

Files in this skill

  • SKILL.md1.2 KB
  • references/generator-upgrades.md630 B
  • references/protobuf.md652 B
  • references/sql.md531 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…