CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

golang-structs-interfaces

Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user asks about "accept interfaces, return structs", compile-time interface checks, or composing small interfaces into larger ones.

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Passed

No findings from the security scan

SKILL.md
Quality
Evals
Security

Quality

Content

75%Weight 40%Scale 1-5

Reviews the quality of instructions and guidance provided to agents. Good implementation is clear, handles edge cases, and produces reliable results.

A well-crafted reference skill: dense with concrete Go patterns, decision tables, and vet-based diagnostics, with genuine edge-case detail correctly pushed into two real, one-level-deep reference files. The weaknesses are minor — a few `{ ... }` stub snippets, occasional redundant restatements, and a body long enough that some sections could move to references.

Suggestions

Remove redundant restatements (e.g. drop "Interfaces Belong to Consumers." or the sentence that repeats it; merge the ReadWriter/ReadWriteCloser examples into one) and trim other doubled explanations to tighten conciseness toward the score-5 anchor.

Replace `{ ... }` stub snippets (NewService, Contains) with complete, compilable examples so all code is copy-paste ready, lifting actionability from 4 to 5.

Move the "Key Standard Library Interfaces" table and the struct-embedding walkthrough into a reference file (linked with the same "→ See" signal) so SKILL.md reads as a true overview and progressive disclosure reaches the score-5 anchor.

DimensionReasoningScore

Conciseness

The body is largely lean, rule-first, and free of teaching Go basics, with tight code blocks. It is not a 5 because of minor padding: "Interfaces Belong to Consumers." is immediately restated as "Interfaces MUST be defined where consumed", and the two consecutive composition examples (ReadWriter, then ReadWriteCloser) make the same point twice. Not a 3 because these are isolated instances, not sections of unnecessary explanation.

4 / 5

Actionability

Guidance is mostly executable: copy-paste snippets like `var _ io.ReadWriter = (*MyBuffer)(nil)`, decision tables for embed-vs-named-field and pointer-vs-value receivers, `go vet ./...` diagnostic commands, and a Mistakes→Fix table. It is not a 5 because several illustrative snippets are `{ ... }` stubs (e.g. `func NewService(store UserStore) *Service { ... }`) rather than complete, runnable code; not a 3 because the stubs are minor and the tables/commands are fully concrete.

4 / 5

Workflow Clarity

As a design-pattern reference rather than a sequential process, it provides clear decision structure (MUST/SHOULD rules, a mistakes checklist, a "Diagnose: go vet ./..." step for copylocks), and it involves no destructive or batch operations so the validation cap does not apply. It sits between anchors: better organized than a 3 (checkpoints are present via vet diagnostics and the fix table) but lacks the explicit validate→fix→retry loop of a 5.

4 / 5

Progressive Disclosure

References are well signaled and exactly one level deep — "→ See [Type Assertions & Type Switches](references/type-assertions.md)" and "→ See [Struct Fields: Tags and Copy Safety](references/struct-fields.md)" — and both files exist and are self-contained, so edge-case detail is correctly deferred. It is not a 5 because the ~280-line body inlines substantial material (the full stdlib interface table, both embedding walkthroughs) that could be split out, leaving SKILL.md less of an overview than the anchor describes.

4 / 5

Total

16

/

20

Passed

Description

96%Weight 40%Scale 1-5

Based on the skill's description, can an agent find and select it at the right time? Clear, specific descriptions lead to better discovery.

A strong description: concrete, comprehensive, third-person, with an explicit and detailed two-part trigger clause covering both task-shaped and idiom-shaped requests. The only weakness is minor overlap with sibling Go skills (dependency injection, naming) that share some of its trigger surface.

DimensionReasoningScore

Specificity

The description enumerates eight concrete capabilities — "composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers" — comprehensive coverage of the Go type-design domain, matching the score-5 anchor for multiple specific concrete actions. It is not a 4 because there are no meaningful gaps in coverage of the skill's declared scope.

5 / 5

Completeness

It explicitly answers both questions: the "what" is the enumerated pattern list, and the "when" is a concrete double trigger — "Use this skill when designing Go types, defining or implementing interfaces, ..." and "Also use when the user asks about ...". This matches the score-5 anchor verbatim and exceeds anchor 4's weaker "when".

5 / 5

Trigger Term Quality

Natural phrases a user would actually say are comprehensively covered: "designing Go types", "defining or implementing interfaces", "embedding structs or interfaces", "writing type assertions or type switches", "adding struct field tags for JSON/YAML/DB serialization", "choosing between pointer and value receivers", plus quoted idioms ("accept interfaces, return structs", "compile-time interface checks"). Not a 4 because no commonly used phrasing in this domain is missing.

5 / 5

Distinctiveness Conflict Risk

The niche is clear (Go struct/interface type design) with distinct technical triggers, but the description claims territory that overlaps closely related sibling skills it itself cross-references — "dependency injection via interfaces" vs a golang-dependency-injection skill, and naming/idiom territory. Minor overlap with closely related skills is exactly the score-4 anchor; not a 5 ("minimal conflict risk") because DI and naming requests could plausibly trigger those siblings instead.

4 / 5

Total

19

/

20

Passed

Validation

87%

Checks the skill against the spec for correct structure and formatting. All validation checks must pass before discovery and implementation can be scored.

Validation — 14 / 16 Passed

Validation for skill structure

CriteriaDescriptionResult

metadata_field

'metadata' should map string keys to string values

Warning

relative_links

Relative link issues: 1 missing

Warning

Total

14

/

16

Passed

Repository

samber/cc-skills-golang

Path

skills/golang-structs-interfaces/SKILL.md

Reviewed

Table of Contents

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.