skills/rst_go_base_guide/SKILL.md
Guides Go development to follow project architecture and code style rules. Use when implementing or reviewing Go code, adding features, refactoring, or when the user asks to follow project rules or standards. Ensures compliance with ai_go/v1/rules (project_architecture.md, code_style.md) and .cursor/rules.
npx skillsauth add hicker-kin/ai-context rst_go_base_guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Guides development so that all Go code and structure follow the project rules (architecture and code style).
Apply this skill when:
This skill may run in a global context (e.g. from ~/.cursor/skills), where paths like .cursor/rules/*.mdc are relative and may not point to the current project. Resolve rule files in this order:
ai_go/v1/rules/core_principles.md (MUST follow in every interaction).ai-context/rules/core_principles.md, .ai-context/rules/core_principles_zh.mdai_go/v1/rules/project_architecture.md, ai_go/v1/rules/code_style.md.ai-context/rules/project_architecture.md, .ai-context/rules/code_style.md (三方项目)ai_go/v1/rules/project_architecture_zh.md, ai_go/v1/rules/code_style_zh.md (中文版).ai-context/rules/project_architecture_zh.md, .ai-context/rules/code_style_zh.md (中文版,三方项目).cursor/rules/go-project-architecture.mdc, .cursor/rules/go-code-style.mdc~/.cursor/skills/ or ~/.claude/rules/ (or equivalent rule locations under the user’s home).Always try the project root first; only fall back to the user directory when the project does not contain the rule files.
When guiding implementation or review, read the relevant full rule file(s) (or the Cursor rule summary) using the lookup order above, and apply them; do not guess.
| Source | Path (relative to project root or user dir) |
|--------|---------------------------------------------|
| Full architecture | ai_go/v1/rules/project_architecture.md, .ai-context/rules/project_architecture.md |
| Full architecture (中文) | ai_go/v1/rules/project_architecture_zh.md, .ai-context/rules/project_architecture_zh.md |
| Full code style | ai_go/v1/rules/code_style.md, .ai-context/rules/code_style.md |
| Full code style (中文) | ai_go/v1/rules/code_style_zh.md, .ai-context/rules/code_style_zh.md |
| Cursor architecture summary | .cursor/rules/go-project-architecture.mdc |
| Cursor code style summary | .cursor/rules/go-code-style.mdc |
For more detail on what each file covers, see reference.md.
When writing or generating code, MUST follow the Formatting and Naming sections in code_style.md (resolve path via the Rule lookup order above). These are mandatory (gofmt/goimports, import grouping, line length, package/file/identifier naming, abbreviations, receiver names, etc.). Do not skip or relax them. If code_style.md cannot be found, report the failure to the user as in the lookup order section.
Before suggesting structure or code
Check against the rules:
internal/ layering (domain, dao or storage, server/handler, infra, router, service, service/dto); docs under docs/changelog (SDD, etc.) and docs/design (PRD, etc.).%w, no panic in service/handler), context first param, DTO tags (json; Gin binding or framework equivalent), interfaces in consuming layer.When the user asks “how should I do X?”
Answer in line with the rules and point to the specific rule or section when it matters (e.g. “per project_architecture.md, handlers must not call dao/infra directly”).
Use this checklist when implementing or reviewing; details remain in the rule files.
json tags; validation per framework (e.g. Gin binding).docs/changelog; PRD and design docs under docs/design.docs/design.development
Use when adding or configuring structured logging in Go projects, integrating zap-based log with request context, or when the user asks about logging. Places log package under pkg/logs for new projects.
development
Use when implementing JWT token signing or verification in Go projects. Covers ES256 (ECDSA, recommended), PS256/RS256 (RSA asymmetric), and HS256 (HMAC symmetric) signing methods, with keys loaded from file path or inline string. Places the jwt package under pkg/jwt for new projects.
tools
Use when writing or reviewing Go imports, especially when a repository has existing formatting automation or import-grouping conventions that must be preserved.
development
Recommends and scaffolds frontend technology stack for new projects. Use when starting a new frontend project, selecting a framework, setting up a web app from scratch, or when the user asks about frontend tech stack, scaffolding, or architecture selection. Covers React/Next.js/Astro/Vue, TypeScript, Tailwind CSS, state management, data fetching, UI components, testing, and monorepo setup.