code-generation

matt-riley's avatarfrom matt-riley

Run and troubleshoot project code generation (sqlc + templ).

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 2, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates and troubleshoots the code generation workflow for Go projects utilizing sqlc and templ. It streamlines the development process by ensuring that database access layers and UI components are perfectly synchronized with their source SQL and template files, effectively eliminating manual command execution and resolving common compilation errors related to missing generated code.

Use Cases

  • Database Schema Synchronization: Automatically regenerating Go database access code in the repository layer whenever SQL queries or migration files are modified.
  • Frontend Component Updates: Seamlessly converting .templ files into Go code to ensure UI changes are immediately reflected in the application build.
  • Build Error Resolution: Identifying and fixing 'missing generated code' compile errors by executing standardized make generate or tool-specific commands within the agent environment.
  • Workflow Automation: Reducing developer friction by handling the repetitive task of running code generators during the iterative development of Go-based web applications.
namecode-generation
descriptionRun and troubleshoot project code generation (sqlc + templ).
licenseMIT
compatibilityRequires bash, git, Go, make, sqlc v1.30.0+, and templ.
repomjrwtf
runnergithub-copilot-cli
version1.2
allowed-toolsBash(git:*) Bash(make:*) Bash(go:*) Bash(sqlc:*) Bash(templ:*) Bash(curl:*) Read

What this skill covers

This repo relies on generated code for:

  • sqlc: generates DB access code into internal/adapters/repository/sqlc/sqlite/
  • templ: generates Go code from .templ templates

Standard commands

make generate

Manual equivalents:

sqlc generate
templ generate

When to run generation

Run make generate when you change:

  • internal/adapters/repository/sqlc/sqlite/queries.sql
  • sqlc.yaml
  • migration files referenced by sqlc.yaml under schema:
  • any .templ files

Troubleshooting

If you see compile errors referencing missing generated code, re-run:

make generate