common-accessibility
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Write unit tests with table-driven patterns and interface mocking in Go. Use when writing Go unit tests, table-driven tests, or using mock interfaces.
Claude Code
$ npx -y skills add hoangnguyen0403/agent-skills-standard --skill golang-testing --agent claude-code
Codex
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a codex -y
Cursor
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a cursor -y
Gemini CLI
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a github-copilot -y
OpenCode
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a opencode -y
Windsurf
$ npx skills add hoangnguyen0403/agent-skills-standard --skill golang-testing -a windsurf -y
name: golang-testing
description: Write unit tests with table-driven patterns and interface mocking in Go. Use when writing Go unit tests, table-driven tests, or using mock interfaces.
metadata:
triggers:
files:
- '**/*_test.go'
keywords:
- testing
- unit tests
- go test
- mocking
- testify1. **Write failing test first** — Follow Red-Green-Refactor TDD workflow (`[BE-TEST-05]`). 2. **Table-driven tests for equivalent inputs** — For parameterized cases sharing setup, define test cases as a slice of structs with `t.Run` (`[BE-TEST-01]`). 3. **Zero Volatile Fields for Struct Comparison** — When asserting struct equality, zero out timestamps, dynamic IDs, or generated tokens before `assert.Equal` to prevent flaky assertions. 4. **Mock via interfaces** — Use DI and small, consumer-centric interfaces (1-3 methods) (`[BE-TEST-04]`). Prefer `mockery` for auto-generated mocks or manual mocks for simple cases. 5. **Run parallel** — Use `t.Parallel()` for non-sequential tests to speed up CI. 6. **Clean up resources** — Use `t.Cleanup()` to restore state or release DB/file resources. 7. **Check coverage** — Coverage is diagnostic and project-configured; verify risk-weighted critical paths rather than padding code for an arbitrary percentage.
See [table-driven test examples](references/table-driven-tests.md)
The portable standards layer for AI coding agents. Sync once, then work in your own runtime.
Enforce WCAG 2.2 AA compliance with semantic HTML, ARIA roles, keyboard navigation, and color contrast standards for web UIs. Use…
Define deterministic guardrails for agent tool calls — protected paths, test-file locks during bug fixes, post-edit formatters,…
Apply REST API conventions — HTTP semantics, status codes, versioning, pagination, and OpenAPI standards for any framework. Use…
Audit structural debt, logic leakage, and monolithic components across Web, Mobile, and Backend codebases. Use when reviewing…
Draws architecture diagrams as editable draw.io files with a fixed house style, C4 levels, evidence-tagged shapes, and optional…
Enforce SOLID principles, guard-clause style, function size limits, and intention-revealing naming across all languages. Use when…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.