code-generation
Regenerate code after generator input, implementation, configuration, or tool-version changes.
来源信息
- 仓库
- block/proto-fleet
- 最近来源活动
- 2026年10月1日 22:59
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 58
- Forks
- 18
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
文件资源管理器
4 个文件正在显示 SKILL.md
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).
在 GitHub 查看