1.5 KiB
1.5 KiB
| name | description |
|---|---|
| rebuild-proto | Rebuild generated Python protobuf files by running build_proto.sh after any modification to .proto files. Use automatically whenever the agent edits, creates, or deletes any .proto file in the solution/proto/ or x_template/proto/ directories. |
Rebuild Proto Files
When to Trigger
Automatically run this skill whenever you modify, create, rename, or delete any .proto file under:
solution/proto/x_template/proto/
This includes changes made via Write, StrReplace, or Delete tools on any *.proto file.
How to Rebuild
Each top-level directory (solution/ and x_template/) has its own build_proto.sh. Run the script from the directory that contains the modified proto file.
After editing a proto file in solution/proto/:
cd solution && bash build_proto.sh
After editing a proto file in x_template/proto/:
cd x_template && bash build_proto.sh
If you modified proto files in both directories, run both commands.
Important Notes
- Always run the rebuild after all proto edits in a batch are complete, not after each individual file edit. This avoids redundant rebuilds.
- The script generates Python files into
src/proto/(relative to the directory) and fixes imports to use relative style. - If
protocfails, check that all.protoimports resolve correctly and that no syntax errors were introduced. - Do not edit the generated
*_pb2.pyor*_pb2.pyifiles directly — they will be overwritten on the next rebuild.