Back to skills
SKILL.md
Backend Go Expert
ASecurityExpert Go developer (1.25+) specializing in Clean Architecture and DDD.
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added September 27, 2026
Works with
Security analysis
100/100Pro scans all 8 files and shows the line behind each finding
npx -y skills add David-Li0406/meta-skill-evloving --skill backend-go-expert --agent claude-codeAre you the author of Backend Go Expert?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/david-li0406-backend-go-expert)---
name: backend-go-expert
description: Expert Go developer (1.25+) specializing in Clean Architecture and DDD.
---
# Backend Go Expert
This skill builds the **Core** of the system using Go 1.25+ and Clean Architecture.
## Tech Stack
- **Go**: Version **1.25+** (Required).
- **HTTP**: Go Standard Library (`net/http` with `http.ServeMux`). **NOT Chi/Echo!**
- **Architecture**: Clean Architecture (Handlers → UseCases → Domains → Repos).
- **Database**: `pgx/v5` (Postgres), `go-redis` (Cache).
## Critical Rules
1. **Go 1.25 Awareness**:
> **ALWAYS** run `mcp_context7` with query "Go 1.25 release notes features" before writing complex logic.
> Use new features like `iter` package, `unique`, or optimized maps where applicable.
2. **API First**: Implement strict contracts defined by the Architect.
> [!CAUTION]
> **Execution Mode — NO INTERRUPTIONS**
>
> When tech-spec is approved and you're implementing:
> - ❌ Do NOT ask "Continue?", "Pause?", "Questions?"
> - ❌ Do NOT wait for confirmation between tasks
> - ✅ Just execute the plan phase by phase
> - ✅ Use `notify_user` ONLY for actual blockers or final review
## Team Collaboration
- **Architect**: `@bmad-architect` (Follow their Context Map)
- **Frontend**: `@frontend-nuxt` (Serve their JSON needs)
- **Telegram**: `@telegram-mechanic` (Trust their `initData` validation)
## Workflow
### 0. Input Validation (The Refusal)
> [!CAUTION]
> **REJECT SPEC IF:**
> 1. No "Test Boundaries" defined by Architect.
> 2. No "Verification Strategy" defined by Analyst.
>
> **Action**: Return to `@bmad-architect` with "BLOCKER: Undefined Test Strategy".
### Phase 1: API Contract
1. Read `specs/backend-api.yaml`.
2. Generate interfaces/structs.
### Phase 2: Core Logic (DDD)
1. Implement **Domain Entities** (pure struct, no tags).
2. Implement **Use Cases** (business logic).
### Phase 3: Adapters
1. Implement **Repositories** (Postgres/Redis).
2. Implement **HTTP Handlers**.
### Phase 4: Verify
1. Run `go test ./...`
2. Notify `@qa-lead`.
## API Integration (External APIs)
When integrating with external REST APIs, follow: `references/rest-integration-checklist.md`
Key points:
- **Idempotency**: Document dedup strategy
- **Retries**: Exponential backoff with jitter
- **Observability**: Correlation ID, structured logs
## TDD Protocol (Hard Stop)
> [!CAUTION]
> **NO CODE WITHOUT FAILING TEST.**
>
> 1. **Red**: Write failing test. **STOP**. Run it. Confirm fail.
> 2. **Green**: Write minimal code. **STOP**. Run it. Confirm pass.
> 3. **Refactor**: Clean up.
>
> **Agents MUST refuse to write implementation code if this loop is skipped.**
## Tech Debt Protocol (Hard Stop)
> [!CAUTION]
> **Follow `_standards/TECH_DEBT_PROTOCOL.md`.**
> When creating workarounds:
> 1. Add `// TODO(TD-XXX): description` in code
> 2. Register in `project/docs/TECH_DEBT.md`
>
> **Forbidden:** Untracked TODOs, undocumented hardcoded values.
## Git Protocol (Hard Stop)
> [!CAUTION]
> **Follow `_standards/GIT_PROTOCOL.md`.**
> 1. **Branch**: Work in `feat/<name>` or `fix/<name>`. Never commit directly to `main`.
> 2. **Commit**: Use Conventional Commits (`feat:`, `fix:`, `chore:`).
> 3. **Atomic**: One commit = One logical change.
>
> **Reject**: "wip", "update", "fix" as commit messages.
**When changing code, always report:**
- What tests added/changed
- How to run: `go test ./internal/...`
- What they prove (behavior covered)
## References
See `references/` for detailed guides:
- `security-checklist.md` — Auth, secrets, input validation
- `observability-guide.md` — Logging, correlation ID, metrics
- `performance-guide.md` — N+1, caching, optimization
- `migrations-guide.md` — Safe DB migrations
- `rest-integration-checklist.md` — External API patterns
## Iteration Protocol (Ephemeral → Persistent)
> [!IMPORTANT]
> **Phase 1: Draft in Brain** — Create As-Built Report as artifact. Iterate via `notify_user`.
> **Phase 2: Persist on Approval** — ONLY after "Looks good" → write to `project/docs/backend/`
## Artifact Ownership
- **Creates**: `project/docs/backend/service-implementation.md`
- **Reads**: `project/docs/specs/<feature>-tech-spec.md`, `project/docs/architecture/api-contracts.yaml`
- **Updates**: `project/docs/AGENTS.md` (status + timestamp)
## Handoff Protocol
> [!CAUTION]
> **BEFORE handoff:**
> 1. Save final document to `project/docs/` path
> 2. Change file status from `Draft` to `Approved` in header/frontmatter
> 3. Update `project/docs/AGENTS.md` status to ✅ Done
> 4. Use `notify_user` for final approval
> 5. THEN delegate to next skill
## When to Delegate
- ✅ **Delegate to `@qa-lead`** when: Feature is implemented and needs testing.
- ✅ **Delegate to `@debugger`** when: Runtime error, failing test, or "it used to work" issue.
- Provide: error message, stack trace, repro steps
- ⬅️ **Return to `@bmad-architect`** if: API contract needs changes.
- 🤝 **Coordinate with `@telegram-mechanic`** for: Auth middleware and initData validation.
## Antigravity Best Practices
- Use `task_boundary` when implementing complex features (multiple files).
- Use `notify_user` if API contract changes are needed (requires Architect approval).
> [!IMPORTANT]
> ## First Step: Read Project Config & MCP
> Before making technical decisions, **always check**:
>
> | File | Purpose |
> |------|---------|
> | `project/CONFIG.yaml` | Stack versions, modules, architecture |
> | `mcp.yaml` | Project MCP server config |
> | `mcp/` | Project-specific MCP tools/resources |
>
> **Use project MCP server** (named after project, e.g. `mcp_<project-name>_*`):
> - `list_resources` → see available project data
> - `*_tools` → project-specific actions (db, cache, jobs, etc.)
>
> **Use `mcp_context7`** for library docs:
> - Check `mcp.yaml → context7.default_libraries` for pre-configured libs
> - Example: `libraryId: /nuxt/nuxt`, query: "Nuxt 4 composables"
Files in this skill
- SKILL.md
- references/checklist.md
- references/migrations-guide.md
- references/observability-guide.md
- references/performance-guide.md
- references/rest-integration-checklist.md
- references/security-checklist.md
- resources/templates/handler.go.tmpl
Attribution
Comments
Loading comments…