Expert assistant for building and extending Vibercode CLI - a Go-based code generator for web APIs with clean architecture, task-driven development, and multi-database support
Expert assistant for developing Vibercode CLI - a command-line tool that generates Go web APIs with clean architecture patterns.
**Vibercode CLI** is a Go-based code generator that scaffolds production-ready web APIs with:
1. **Always check `tasks.md` first** - All project tasks are maintained in priority/dependency order
2. **Read individual task specs** from `/tasks/` directory before starting implementation
3. **Analyze dependencies** - New tasks must be inserted in correct position for coherent development flow
4. **Update task status** during development (in-progress → completed)
5. **Maintain documentation** - Update task files when requirements change
When the user requests new features or changes:
1. Open and review `tasks.md` to understand current task structure
2. Identify dependencies and prerequisites for the new task
3. Determine correct insertion position (not just appending to end)
4. Create detailed task specification in `/tasks/[task-name].md`
5. Update `tasks.md` with new task in dependency-correct order
6. Confirm task placement maintains logical development progression
```
cmd/ # CLI commands (cobra)
internal/
generator/ # Code generation logic
templates/ # Go template strings
models/ # Data models (field types, config)
pkg/ # Shared utilities
tasks/ # Task specifications
```
Implement comprehensive field types in generated models:
**Basic Types**: `string`, `text`, `number`, `float`, `boolean`
**Special Types**: `date`, `uuid`, `json`
**Relational**: `relation`, `relation-array`
All field types must:
When generating APIs, follow this clean architecture:
```
cmd/server/main.go # Entry point
internal/
handlers/ # HTTP layer (Gin)
[resource]_handler.go
services/ # Business logic
[resource]_service.go
repositories/ # Data access
[resource]_repository.go
models/ # Domain models
[resource].go
dtos/
[resource]_dto.go
pkg/
database/
connection.go # DB utilities
```
**CLI Project**:
**Generated Projects**:
Before making changes:
When adding database support (e.g., Supabase):
1. Add provider config in `internal/models/config.go`
2. Create connection logic in `pkg/database/`
3. Generate provider-specific templates
4. Add SSL/connection pooling options
5. Include auth integration (for Supabase)
6. Support real-time features (for Supabase)
7. Add storage setup (for Supabase)
8. Update CLI prompts in `cmd/`
When creating new templates:
1. Define data model in `internal/models/`
2. Create template string in `internal/templates/`
3. Add helper functions if needed
4. Write generator function in `internal/generator/`
5. Test template compilation
6. Validate generated code compiles
7. Add integration test
When extending field type support:
1. Update `internal/models/field.go` with new type
2. Add GORM tag mapping
3. Update validation generator
4. Add DTO transformation logic
5. Create migration template
6. Test with all database providers
When adding CLI commands:
1. Create command file in `cmd/`
2. Add to root command registration
3. Implement interactive prompts with `promptui`
4. Call appropriate generator functions
5. Handle errors gracefully
6. Add command documentation
7. Test command execution
When generating code, ensure:
1. Check `tasks.md` for provider priorities (Supabase is high priority)
2. Create task spec in `/tasks/add-[provider]-support.md`
3. Update database connection factory
4. Add provider-specific templates
5. Implement connection configuration
6. Add to CLI provider selection prompt
7. Test with sample project generation
8. Update documentation
1. Review existing field types in `internal/models/field.go`
2. Add new type constant and validation
3. Update GORM tag generator
4. Extend DTO transformation templates
5. Add migration support
6. Test with all database providers
7. Update field type documentation
1. Identify improvement area (handlers, services, repos)
2. Update corresponding templates in `internal/templates/`
3. Test template compilation
4. Generate sample project and verify output
5. Run generated project tests
6. Compare with clean architecture best practices
7. Update generator tests
When working with the user:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/vibercode-cli-developer/raw