← 返回 Skills 市场
94
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install golang-code-writer-custom
功能描述
Golang 开发 SKILL 集合。包含日志规范(SKILL-logging.md)和项目代码梳理与 API 流程分析(SKILL-flow-analysis.md)。 适用于 zhaocaijianghu-skills 项目中所有 Golang 开发场景,包括 MCP 客户端、后端服务、数据处理等。
使用说明 (SKILL.md)
Golang SKILL 集合
本文件夹包含两个标准化的独立 SKILL 文档,用于指导 Golang 开发实践。
一、SKILL 导航
| SKILL 文档 | 适用场景 | 核心内容 |
|---|---|---|
| SKILL-logging.md | 添加日志 | xlogging 规范、日志 Level 选择、代码示例、禁止事项 |
| SKILL-flow-analysis.md | 流程梳理 | API 运行流程、Mermaid 流程图、Golang 代码示例、通用模式 |
二、快速开始
场景 1:需要添加日志
→ 打开 SKILL-logging.md
// 标准错误日志
if err != nil {
xlogging.D().Error(fmt.Sprintf("operation failed: %+v", err))
return err
}
场景 2:需要理解 API 流程
- 查看 Mermaid 流程图
- 参考 Golang 代码实现
- 了解错误处理和并发模式
三、通用原则
所有 Golang 开发必须遵守以下原则:
| 原则 | 说明 |
|---|---|
| 优先仿写 | 参考项目中现有 Golang 代码 |
| 强制规范 | 无法仿写时,严格遵循对应 SKILL 的规定形式 |
| 配置优先 | 必须先读取 mcp-config.json 获取服务地址 |
| 文档为准 | MCP 调用必须参考 references/tools/*.md |
| 完整日志 | 所有错误必须记录,禁止静默处理 |
四、相关资源
| 资源 | 路径 | 说明 |
|---|---|---|
| MCP 工具文档 | ../../supplier-sourcing-assistant/references/tools/ |
所有 MCP 工具接口定义 |
| MCP 配置 | ../../supplier-sourcing-assistant/mcp-config.json |
服务 URL 配置示例 |
| Python SKILL 参考 | ../../supplier-sourcing-assistant/SKILL.md |
业务流程参考 |
五、更新记录
| 日期 | 更新内容 |
|---|---|
| 2026/04/08 | 优化为标准 SKILL 格式(统一 front matter、规范结构、添加导航) |
提示:如需在实际 Golang 项目中应用、添加更多示例或修改具体部分,请提供具体场景。
安全使用建议
This skill is internally consistent for Golang/MCP development: it directs you to read project config files and follow a specific xlogging pattern and call MCP endpoints from the configured URL. Before installing/using it, check the referenced mcp-config.json and references/tools/* files in your repository to ensure they don't contain sensitive credentials or tokens you don't want the agent to read. The skill will not itself download or run code, but any agent using these instructions will access repository files and may make network calls to the configured MCP service—ensure those endpoints and configs are intended for development/testing and that logging rules (avoid printing tokens) are followed.
功能分析
Type: OpenClaw Skill
Name: golang-code-writer-custom
Version: 1.0.2
The skill bundle provides standardized instructions and code templates for Golang development, specifically focusing on logging and interacting with MCP services. It includes defensive coding practices such as mandatory error logging, configuration-driven service discovery (via mcp-config.json), and explicit prohibitions against leaking sensitive information in logs. No indicators of data exfiltration, malicious execution, or prompt injection were found across the analyzed files (SKILL.md, SKILL-flow-analysis.md, SKILL-logging.md).
能力评估
Purpose & Capability
Name/description (Golang logging and flow-analysis for MCP clients and backend) align with the content: logging guidelines, MCP call patterns, and reading project config are appropriate for this purpose. There are no unrelated credentials, binaries, or external tooling requested.
Instruction Scope
SKILL.md and the two documents instruct the agent/developer to read repository files (e.g., mcp-config.json and references/tools/*) and to follow a fixed logging format. Reading project config and interface docs is coherent for code/flow analysis, but those instructions do require access to repository files outside the skill folder—verify that those files do not contain sensitive secrets you don't want read.
Install Mechanism
Instruction-only skill with no install spec and no code files. Nothing is downloaded or written to disk by the skill itself.
Credentials
The skill declares no required environment variables or credentials. It references reading a local mcp-config.json for service URLs (expected for MCP client code). No unrelated secrets or cloud credentials are requested.
Persistence & Privilege
always is false and the skill is user-invocable. It does not request persistent privileges or modify other skills or global agent settings.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install golang-code-writer-custom - 安装完成后,直接呼叫该 Skill 的名称或使用
/golang-code-writer-custom触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- 优化为标准 SKILL 格式,统一 front matter 与结构,提升可读性。
- 增加快速导航与应用场景说明,便于查找和使用相关 SKILL 文档。
- 明确列出 Golang 开发的通用原则,要求日志、配置与文档规范。
- 新增相关资源链接,便于查阅接口定义与配置文件。
- 规范更新记录,便于后续追踪文档变更。
v1.0.1
No changes detected in this version.
- No updates or modifications were made to documentation or code in version 1.0.1.
v1.0.0
新增
元数据
常见问题
个人SKILL 是什么?
Golang 开发 SKILL 集合。包含日志规范(SKILL-logging.md)和项目代码梳理与 API 流程分析(SKILL-flow-analysis.md)。 适用于 zhaocaijianghu-skills 项目中所有 Golang 开发场景,包括 MCP 客户端、后端服务、数据处理等。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 94 次。
如何安装 个人SKILL?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install golang-code-writer-custom」即可一键安装,无需额外配置。
个人SKILL 是免费的吗?
是的,个人SKILL 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
个人SKILL 支持哪些平台?
个人SKILL 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 个人SKILL?
由 L2yf(@l2yf)开发并维护,当前版本 v1.0.2。
推荐 Skills