Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/sazardev-codegen-testing
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
codegen-testing- Description
- None
- License
- MIT
- Instructions
- 321 lines in SKILL.md · view on GitHub
Agent Skills spec issues
- missing YAML frontmatter
- name: missing
- description: missing
Files (1)
- SKILL.md
SKILL.md (first lines)
# Skill: Goca Code Generation Testing
**Domain:** Writing tests for Goca's code generation pipeline. Covers unit tests for validators and template generators, and integration tests that verify generated code compiles and is functionally correct.
---
## Testing Philosophy for Code Generators
Goca generates code, so tests have two distinct layers:
1. **Generator tests** — verify the generator produces the right output strings
2. **Compilation tests** — verify the generated output actually compiles as valid Go
Both layers are mandatory. A generator test alone is insufficient — template changes can produce syntactically correct template output but invalid Go code.
---
## Unit Test Patterns
### Testing `CommandValidator`
```go
func TestCommandValidator_ValidateEntityName(t *testing.T) {
t.Parallel()
v := NewCommandValidator()
cases := []struct {
name string
input string
wantErr bool
}{
{"valid", "Product", false},
{"valid with numbers", "Product1", false},
{"empty", "", true},
{"starts with digit", "1Product", true},
{"path traversal", "../etc", true},
{"slash", "foo/bar", true},
{"dot", "foo.bar", true},
{"underscore", "foo_bar", false}, // or true depending on your convention
{"very long", strings.Repeat("A", 1000), true},
{"null byte", "Product\x00Name", true},
{"shell meta", "Product;rm -rf /", true},
}
for _, tc := range cases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
t.Parallel()
err := v.ValidateEntityName(tc.input)
if tc.wantErr {
assert.Error(t, err)
} else {
assert.NoError(t, err)
}
})
}
}
```
### Testing `FieldValidator`
```go
func TestFieldValidator_ParseFields(t *testing.T) {
t.Parallel()
v := NewFieldValidator()
cases := []struct {
name string
input string
wantLen int
wantFirst FieldData
wantErr bool
}{
{
name: "single field",
input: "Name:string",
wantLen: 1,
wantFirst: FieldData{Name: "Name", Type: "string"},
},
{
name: "multiple fields",
input: "Name:string,Price:float64,Active:bool",
wantLen: 3,
},
{
name: "pointer type",
input: "Parent:*Category",
wantLen: 1,
},
{
name: "map type",
input: "Meta:map[string]string",
wantLen: 1,
},
{
name: "empty",
input: "",
wantLen: 0,
},
{
name: "missing type",
input: "Name:",
wantErr: true,
},
}
// ...
}
```
### Testing `TemplateGenerator`
```go
func TestTemplateGenerator_EntityTemplate(t *testing.T) {
t.Parallel()
data := TemplateData{
Entity: EntityData{
Name: "Product",
NameLower: "product",
Package: "domain",From sazardev/goca, MIT.
More from sazardev/goca
- 0.683score
ddd-teaching-skill
sazardev
Enseña Domain-Driven Design y Clean Architecture de forma guiada usando Goca CLI.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman
sazardev
Ultra-compressed communication mode.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman-commit
sazardev
Ultra-compressed commit message generator.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
mcp-tools
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
goca-architecture
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9 - 0.328score
goca-helper-skill
sazardev
No description from the publisher yet.
SkillCFreshness: C★ 304Claude Code +9
Signals
- Stars
- 304
- Forks
- 11
- Open issues
- 0
- Last commit (this folder)
- Mar 24, 2026 (7 months ago)
- Last release
- Jul 12, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/sazardev/goca
- Website
- sazardev.github.io/goca/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from sazardev
- 0.683score
ddd-teaching-skill
sazardev
Enseña Domain-Driven Design y Clean Architecture de forma guiada usando Goca CLI.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman
sazardev
Ultra-compressed communication mode.
SkillCFreshness: C★ 304Claude Code +9 - 0.578score
caveman-commit
sazardev
Ultra-compressed commit message generator.
SkillCFreshness: C★ 304Claude Code +9
Cite this page
codegen-testing skill. Agent Mart. https://agentmart.dev/skills/sazardev-codegen-testing (last updated 2026-10-24)