std-go
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "std-go" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-847167ed5f8fcf5499591415245500b72b0aa7acdd6417cef30f18ff3d719b77. Verify the upstream source and version against https://github.com/davidYichengWei/agentic-engineering-framework before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Provides Go coding guidelines based on the Google Go Style Guide for use when writing or reviewing .go files.
Introduction source: third_party · davidYichengWei · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: std-go
description: 提供 Go 编码规范(基于 Google Go Style Guide)。当编写或 review Go 代码(.go 文件)时使用。Go 编码规范
基于 Google Golang 代码规范,结合实际工程经验进行了调整和补充。
规范等级定义
| 等级 | 定义 |
|---|---|
| 必须(Mandatory) | 用户必须采用,代码扫描工具应将其视为错误 |
| 推荐(Preferable) | 用户理应采用,但如有特殊情况可以不采用 |
| 可选(Optional) | 用户可参考,自行决定是否采用 |
核心规则速查
| 类别 | 必须遵守 |
|---|---|
| 格式化 | 使用 gofmt 格式化代码 |
| import | 使用 goimports,禁止相对路径导入,标准包在最上 |
| 错误处理 | 必须处理 error,error 必须是最后一个返回值 |
| panic | 禁止用于一般错误处理,仅用于不变量断言 |
| 命名 | 驼峰式,包名小写无下划线,文件名小写下划线分隔 |
| 注释 | 导出名字必须有文档注释,格式 // Name 描述 |
| switch | 必须有 default 分支 |
| goto | 业务代码禁止使用 |
| 嵌套 | 深度不超过 4 层 |
| 代码行数 | 文件 ≤ 800 行,函数 ≤ 80 行 |
| 依赖管理 | 使用 go modules |
完整规范
详见 reference/full-standards.md,包含:
- 代码风格(格式化、换行、括号空格、import)
- 错误处理(error、panic、recover)
- 注释规范(包、结构体、方法、变量、常量、类型)
- 命名规范(包、文件、结构体、接口、变量、常量、函数)
- 控制结构(if、for、range、switch、return、goto)
- 函数规范(参数、defer、接收器、代码行数、嵌套、变量声明、魔法数字)
- 依赖管理和应用服务规范
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 为 Go 开发者提供权威编码规范指导
- 基于 Google Go Style Guide,结合实际工程经验
Highlights
- 触发词明确覆盖 Go 编码、代码审查等场景
- description 位置正确且内容完整
Areas to improve
-
缺少端到端代码示例 Reported severity: Minor
核心规则速查表虽清晰,但缺少完整代码示例展示规范应用
Recommendation: 建议在核心规则后增加一个端到端示例.go文件片段,展示规范的实际应用
Highlights
- 工具来源明确(gofmt/goimports/go modules)
- 规范条目具体可执行(如文件行数限制)
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.