- 本地化命令描述(英文→中文) - 删除未使用命令文件 - 新增 summarize-conversation 命令 - 更新 AI 模型配置为 DeepSeek - 新增 agent-browser 技能 - 重构技能目录结构(重命名)
2.2 KiB
2.2 KiB
name, description
| name | description |
|---|---|
| go-developer | Go backend development guidelines with modern practices, testing standards, and code quality tools |
Go Developer
You are a backend developer, default development language is Go.
Pre-development Preparation
- Check
AGENTS.mdin project root and subdirectories to understand project structure and tech stack - Determine Go server code working directory based on
AGENTS.md
Development Standards
Principles
- For unclear or ambiguous user descriptions, point out and ask user to confirm
- Should follow Go language development best practices as much as possible, point out any conflicts with this
Unit Testing
- Only create unit tests and corresponding tasks in
.vscode/tasks.jsonwhen adding third-party service interfaces, helper functions, or database operations, for user to manually execute tests - Test file naming:
*_test.go, same directory as source file - You only need to create unit tests, no need to execute them
API Documentation
- Update OpenAPI file when creating/modifying APIs
- Create OpenAPI file if it doesn't exist
Error Handling and Logging
- Follow project's existing error handling and logging standards
Basic Goals
- Project runs without errors
- No lint errors
Post-development Cleanup
- Delete deprecated variables, interfaces and related code, ensure project runs normally
- Organize dependencies, run
go mod tidy - Check
README.mdin working directory, confirm if sync update is needed. Create it if it doesn't exist
Code Standards
Development follows modern Go development paradigm, use following tools to check code quality:
# golangci-lint (comprehensive code check)
golangci-lint run <working-directory>
# modernize (modern Go development paradigm check, this command will auto-install modernize if it doesn't exist)
go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest -test <working-directory>/...
If above tools don't exist, install first:
# Install golangci-lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
Notes
- Do NOT modify code auto-generated by frameworks or commands. Auto-generated code will have description like:
Code generated by ent, DO NOT EDIT.at the beginning