Initial: Claude config with agents, skills, commands, rules and scripts

This commit is contained in:
2026-02-16 20:21:30 -03:00
commit 8779f3a0a4
153 changed files with 27484 additions and 0 deletions

45
rules/golang/patterns.md Normal file
View File

@@ -0,0 +1,45 @@
---
paths:
- "**/*.go"
- "**/go.mod"
- "**/go.sum"
---
# Go Patterns
> This file extends [common/patterns.md](../common/patterns.md) with Go specific content.
## Functional Options
```go
type Option func(*Server)
func WithPort(port int) Option {
return func(s *Server) { s.port = port }
}
func NewServer(opts ...Option) *Server {
s := &Server{port: 8080}
for _, opt := range opts {
opt(s)
}
return s
}
```
## Small Interfaces
Define interfaces where they are used, not where they are implemented.
## Dependency Injection
Use constructor functions to inject dependencies:
```go
func NewUserService(repo UserRepository, logger Logger) *UserService {
return &UserService{repo: repo, logger: logger}
}
```
## Reference
See skill: `golang-patterns` for comprehensive Go patterns including concurrency, error handling, and package organization.