Documentation
¶
Overview ¶
Package agentskill renders the agent skill that teaches coding agents to work with the daemon, and installs it where Claude Code and Codex look for skills (dirs.go locates their directories). An installed copy is refreshed when the daemon starts, so it follows the binary that serves it.
Index ¶
- Constants
- Variables
- func Getenv(key string) string
- func Install(path, content string, force bool) (bool, error)
- func Refresh(port int, cfgPath string) error
- func Render(port int, cfgPath string) string
- func ShellEnv() []string
- func State(path, content string) string
- func Targets() []string
- type Dirs
- type Target
Constants ¶
const ( Missing = "missing" Current = "current" Outdated = "outdated" Foreign = "foreign" // a file with this name this package did not write )
Installed states of a skill file.
Variables ¶
var ErrForeign = errors.New("a skill with this name exists and was not installed by " + app.Name)
ErrForeign means a skill with the same name exists that this package did not write.
Functions ¶
func Getenv ¶
Getenv returns key from this process's environment. A process started outside a terminal (the daemon under launchd or systemd, the app's helper) lacks the variables set in shell startup files, so there it falls back to the login shell's environment, read once.
func Install ¶
Install writes the skill to path. An existing file is replaced only if this package wrote it, unless force is set; a symlinked file is updated where it points. It reports whether the file changed.
func Refresh ¶
Refresh rewrites installed copies that are out of date. Agents without the skill installed are left alone.
Types ¶
type Dirs ¶
type Dirs struct {
Home string
Claude string // CLAUDE_CONFIG_DIR, else ~/.claude
Codex string // CODEX_HOME, else ~/.codex
Gemini string // GEMINI_CLI_HOME/.gemini, else ~/.gemini
}
Dirs are the configuration directories of the coding agents.
type Target ¶
Target is the skill file one agent reads. Agent is "claude" or "codex".
func AgentTargets ¶
func AgentTargets() []Target
AgentTargets are the skill files of the agents installed for this account: Claude Code (<config dir>/skills) and Codex (~/.agents/skills, or <CODEX_HOME>/skills where an earlier install put the skill, which Codex still reads). Directories linked to one another count once, for the first agent.