CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

golang-safety

Defensive Golang coding against accidental bugs — nil panics, typed-nil interfaces, `append` backing-array aliasing, silent int64-to-int32 truncation, float `==` comparison, `defer` inside loops, defensive copies of slices and maps, and usable zero values. Use when a Go program panics on a nil map write or nil pointer dereference, when reviewing code for nil-safety, numeric conversion overflow, or resource lifecycle, or when designing a type whose zero value must be safe. Not for designing concurrent access with goroutines, channels, or sync primitives (→ See `samber/cc-skills-golang@golang-concurrency` skill), not for exploitable vulnerabilities such as injection, weak crypto, or leaked secrets (→ See `samber/cc-skills-golang@golang-security` skill), and not for debugging an already-failing program (→ See `samber/cc-skills-golang@golang-troubleshooting` skill).

70

Quality

88%

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 strong reference-style skill body: concrete executable ✗/✓ examples for every pitfall, real one-level-deep deep-dive references, and clear cross-references to sibling skills. The main weakness is redundancy — the 11 pitfalls are restated three times (summary list, sections, mistakes table) — and deep dives exist for only two of the eight topics.

Suggestions

Collapse the triple restatement: either drop the 'Best Practices Summary' numbered list or the 'Common Mistakes' table, keeping whichever format is more useful as a quick checklist — the detailed sections already carry the same content.

Extend the progressive-disclosure pattern to the remaining topics (numeric, resource, immutability, initialization safety) by moving their longer code examples into reference files, leaving only the trap statement and one-line fix inline.

Add a short ordered review procedure (e.g., 'run golangci-lint with the listed linters, then sweep the checklist by topic, then check cross-referenced sibling skills for boundary topics') so the catalog translates into an unambiguous workflow.

DimensionReasoningScore

Conciseness

The same 11 pitfalls are covered three times within the body: the 'Best Practices Summary' numbered list, the detailed sections, and the 'Common Mistakes' table — the table's Fix column largely restates the section guidance. This is more than minor trimming, matching 'mostly efficient but includes some unnecessary explanation or could be tightened' rather than the anchor-4 'minor instances'. It is not a 2 because the individual code examples are compact, idiomatic ✗/✓ pairs with no padding.

3 / 5

Actionability

Every pitfall comes with a concrete, executable ✗/✓ Go code pair (e.g., the full slice expression `append(a[:len(a):len(a)], 4)`, the bounds check against `math.MaxInt32`, the extracted `processOne` function for defer-in-loop), plus a nil-behavior table and named linters. Code is copy-paste ready and covers the common cases; not a 4 because no example is pseudocode or missing key details.

5 / 5

Workflow Clarity

This is a reference/catalog skill, and the structure (summary → topic sections → mistake table → cross-references) makes it unambiguous what to check and how to apply each fix, with linter enforcement as a verification backstop. It falls short of 5 because there is no explicit procedure for conducting a review (e.g., an ordered checklist or how to sequence manual checks with `golangci-lint`), and no validation feedback loop, though the domain is non-destructive so the cap-3 rule does not apply.

4 / 5

Progressive Disclosure

Both referenced files exist (`references/nil-safety.md`, `references/slice-map-safety.md`) and are clearly signaled as bold one-level-deep 'Deep Dive' links, matching good structure. It is not a 5 because only 2 of roughly 8 topics are split out — numeric, resource, immutability, and initialization safety live entirely inline — so the split is partial rather than 'content appropriately split' across the whole skill.

4 / 5

Total

16

/

20

Passed

Description

100%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.

An exemplary description: dense with concrete capabilities, explicit multi-scenario 'Use when' triggers, and explicit 'Not for' boundaries that disambiguate it from sibling Go skills. Third-person voice is maintained and there is no filler despite the length.

DimensionReasoningScore

Specificity

The description lists eight concrete capabilities ('nil panics, typed-nil interfaces, `append` backing-array aliasing, silent int64-to-int32 truncation, float `==` comparison, `defer` inside loops, defensive copies of slices and maps, usable zero values'), matching the 'multiple specific concrete actions; comprehensive coverage' anchor. It is not a 4 because there are no meaningful coverage gaps — every major defensive-coding category is named.

5 / 5

Completeness

It explicitly answers both questions: the 'what' is the enumerated list of defensive-coding capabilities, and the 'when' is a concrete 'Use when...' clause with multiple trigger scenarios, plus explicit 'Not for...' exclusions. This matches the anchor-5 example structure exactly.

5 / 5

Trigger Term Quality

Natural user phrases are covered with synonyms: 'panics on a nil map write or nil pointer dereference', 'reviewing code for nil-safety', 'numeric conversion overflow', 'resource lifecycle', 'designing a type whose zero value must be safe'. These are exactly what a user would say when needing this skill, matching the comprehensive-synonyms anchor; there is no missing common variation.

5 / 5

Distinctiveness Conflict Risk

It carves a clear niche (accidental-bug safety, 'Security handles attackers; safety handles ourselves' implied via the exclusion list) and explicitly redirects adjacent intents to sibling skills ('→ golang-concurrency', '→ golang-security', '→ golang-troubleshooting'). Conflict risk is minimal because the boundaries are stated, not left implicit.

5 / 5

Total

20

/

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: 2 missing

Warning

Total

14

/

16

Passed

Repository

samber/cc-skills-golang

Path

skills/golang-safety/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.