允许执行任意 git 子命令,超出 Go 类型设计所需范围
原文依据:3 处工具声明允许 `Bash(git:*)`,没有限制为只读命令;但技能所述任务是设计和修改 Go 类型,诊断步骤只需要 Go 工具。
如果技能指令被误用,代理可能暂存或提交用户改动、切换分支、改写历史,甚至在已有凭据和网络权限时推送到远端。仅有该权限声明不证明这些操作会发生。
该技能面向 Go 类型与接口设计,但声明允许所有 `git` 子命令,而不是仅限读取状态。若宿主按此权限执行模型生成的命令,技能可运行修改历史、删除分支或向远端推送等命令,影响用户的代码库和远端账户;这些能力并非所述类型设计任务的必要条件。用户可要求作者移除该权限或仅允许明确的只读 git 子命令。
name: golang-structs-interfacesdescription: 'Golang struct and interface design patterns — composition, embedding, type assertions, type switches, interface segregation, dependency injection via interfaces, struct field tags, and pointer vs value receivers. Use this skill when designing Go types, defining or implementing interfaces, embedding structs or interfaces, writing type assertions or type switches, adding struct field tags for JSON/YAML/DB serialization, or choosing between pointer and value receivers. Also use when the user asks about "accept interfaces, return structs", compile-time interface checks, or composing small interfaces into larger ones.'user-invocable: true查看另外 2 个位置
install: []allowed-tools: Read Edit Write Glob Grep Bash(go:*) Bash(golangci-lint:*) Bash(git:*) Agent AskUserQuestionpaths:**Diagnose:** 1- `go vet ./...` — `copylocks` reports every value copy of a lock-bearing struct 2- `go test -race ./...` — surfaces the data races a silent copy introduces