Documentation
¶
Overview ¶
Package agentskill carries the Agent Skill that teaches coding agents how to use mcp-tester, and installs it where each harness looks for skills.
The skill is embedded in the binary, so the installed instructions always match the installed tester. Skills belong to the user's harness, not to a project, so they go into the user-level skill directories.
Index ¶
Constants ¶
const Name = "mcp-tester"
Name is the skill's directory name and frontmatter name.
Variables ¶
var Harnesses = []Harness{ { Name: "claude", Label: "Claude Code", Marker: func(e Env) string { return filepath.Join(e.Home, ".claude") }, Primary: claudeSkills, AlsoReads: noOthers, }, { Name: "codex", Label: "OpenAI Codex", Marker: func(e Env) string { return e.CodexHome }, Primary: agentsSkills, AlsoReads: noOthers, }, { Name: "gemini", Label: "Gemini CLI", Marker: func(e Env) string { return filepath.Join(e.Home, ".gemini") }, Primary: func(e Env) string { return filepath.Join(e.Home, ".gemini", "skills") }, AlsoReads: func(e Env) []string { return []string{agentsSkills(e)} }, }, { Name: "opencode", Label: "OpenCode", Marker: func(e Env) string { return filepath.Join(e.ConfigHome, "opencode") }, Primary: func(e Env) string { return filepath.Join(e.ConfigHome, "opencode", "skills") }, AlsoReads: func(e Env) []string { return []string{claudeSkills(e), agentsSkills(e)} }, }, }
Harnesses in planning order: those that read one directory only come first, so the others can share their targets.
Functions ¶
func Content ¶
Content returns the skill (skills/mcp-tester/SKILL.md) with the running tester's version in metadata.mcp-tester-version, so a development build installs a skill that names it.
func InstalledVersion ¶
InstalledVersion reads the tester version from an installed skill file, or "" if it has none.
Types ¶
type Env ¶
type Env struct {
Home string
// ConfigHome is $XDG_CONFIG_HOME, default ~/.config.
ConfigHome string
// CodexHome is $CODEX_HOME, default ~/.codex.
CodexHome string
}
Env holds the directories the harness locations derive from.
type Harness ¶
type Harness struct {
Name string
Label string
// Marker is the directory whose existence shows the harness is installed.
Marker func(Env) string
// Primary is where the skill goes if no other target covers the harness.
Primary func(Env) string
// AlsoReads lists further skill directories the harness loads; a skill
// written there for another harness reaches this one too.
AlsoReads func(Env) []string
}
Harness is a coding agent that loads skills from user-level directories.
type Result ¶
type Result struct {
Path string
// Previous is the tester version of the replaced skill; "" for a new
// install or a file without version.
Previous string
Existed bool
}
Result reports one written skill file.