Agent skill
apireference
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/apireference
SKILL.md
skill
import "mind/core/framework/skill"
Package skill provides an interface to be implemented by the robot part of a Skill.
This function must be implemented in your skill package:
func NewSkill() skill.Interface
Usage
func SkillDataPath
func SkillDataPath() (string, error)
Get skill's data path on robot.
type Base
type Base struct{}
struct Base implements the base Skill interface
func (*Base) OnClose
func (b *Base) OnClose()
func (*Base) OnConnect
func (b *Base) OnConnect()
func (*Base) OnDisconnect
func (b *Base) OnDisconnect()
func (*Base) OnRecvJSON
func (b *Base) OnRecvJSON(data []byte)
func (*Base) OnRecvString
func (b *Base) OnRecvString(data string)
func (*Base) OnStart
func (b *Base) OnStart()
type Interface
type Interface interface {
OnStart() // Called when Skill is started.
OnConnect() // OnConnect is called when robot has connected to remote.
OnClose() // OnClose is called when Skill is closed. You have 1 second to do clean up before Skill is force terminated.
OnRecvJSON([]byte) // OnRecvJSON is called when remote send JSON data to robot. Use json.Unmarshal to parse.
OnRecvString(string) // OnRecvString will be called when remote send string data ro robot.
OnDisconnect() // OnDisconnect is called when remote disconnected from robot.
}
Interface must be implemented in every skill.
type Robotinfo
type Robotinfo struct {
Battery float32 `json:"battery"` // Battery is during 0~1 and 1 means the battery is full of power.
Temperature float32 `json:"temperature"` // The unit of temperature is centigrade.
DiskSpace uint64 `json:"disk_space"` // The unit of diskspace is byte(B).
IsCharging bool `json:"is_charging"`
SN string `json:"sn"`
Nickname string `json:"nickname"`
Owner string `json:"owner"`
Version string `json:"version"`
}
Robotinfo is the information of robot.
func RobotInfo
func RobotInfo() (Robotinfo, error)
Function RobotInfo is used to get the robot's information.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?