Documentation
¶
Overview ¶
Claude scanner. Ports ClaudeSkillsScanner.swift.
Roots (precedence: custom > plugin root skill > plugin sub-skill > builtin-command):
- $HOME/.claude/skills/<name>/SKILL.md (custom)
- $HOME/.claude/plugins/cache/<plugin>/SKILL.md (builtin, plugin root)
- $HOME/.claude/plugins/cache/<plugin>/skills/<name>/SKILL.md (builtin, plugin sub-skill)
Built-in slash commands use a static fallback list (no outbound HTTPS — remote hosts may block docs fetches; Mac fetches from code.claude.com with 24h cache. Static list updated via PR when Claude adds new commands).
Codex scanner. Ports CodexSkillsScanner.swift.
Roots (precedence: AgentKit/custom > Codex user > bundled system > plugins):
- $HOME/.agents/skills/<name>/SKILL.md (custom)
- $HOME/.codex/skills/<name>/SKILL.md (custom)
- $HOME/.codex/skills/.system/<name>/SKILL.md (builtin)
- $HOME/.codex/plugins/cache/{openai-bundled,openai-primary-runtime}/... (builtin)
No outbound HTTPS. Static built-in slash command list matches Codex CLI.
Grok scanner. Ports GrokSkillsScanner.swift.
Roots:
- $HOME/.grok/skills/<name>/SKILL.md (custom)
- $HOME/.grok/bundled/skills/<name>/SKILL.md (builtin)
Skills surface as slash commands (`/<name>`). No outbound HTTPS.
Shared filesystem scanning helpers used by all three agent scanners. Each scanner (Claude/Codex/Grok) configures its own roots + built-in command list, but the SKILL.md YAML-frontmatter parse + dedup-by-name + sort are identical across all three.
Package skills scans agent CLI installs for skill catalogs.
Providers normalize SKILL.md metadata into a shared response with stable category values ("custom", "builtin", and "builtin-command").
Index ¶
- Constants
- func CodexInstalled() bool
- func FindClaudeSkillContent(name string) (string, error)
- func GrokInstalled() bool
- func InvalidateAgent(id string) bool
- func InvalidateClaudeCache()
- func InvalidateCodexCache()
- func InvalidateGrokCache()
- func InvalidatePiCache()
- func PiInstalled() bool
- type Provider
- type Skill
Constants ¶
const ( // CategoryCustom = user-authored skills under ~/.{agent}/skills/. CategoryCustom = "custom" // CategoryBuiltin = agent-bundled skills (Claude plugins, Codex .system, Grok bundled). CategoryBuiltin = "builtin" // CategoryBuiltinCommand = hardcoded slash commands baked into the // scanner (no SKILL.md). Mac fetches these from docs.claude.com; the // daemon ships a static fallback list because remote hosts may not have // outbound HTTPS to Anthropy's docs (proxy / air-gap). CategoryBuiltinCommand = "builtin-command" )
Category constants. Same vocabulary across all three scanners so iOS's grouped rendering works regardless of agent.
Variables ¶
This section is empty.
Functions ¶
func CodexInstalled ¶
func CodexInstalled() bool
CodexInstalled reports whether a Codex CLI install is present. Heuristic: ~/.codex exists. Session scanning is intentionally best-effort.
func FindClaudeSkillContent ¶
FindClaudeSkillContent returns the SKILL.md content for the named Claude skill, or "" with a nil error if no skill by that name exists (caller returns 404). Walks custom roots first, then plugin roots — same order as ScanClaude so name resolution is consistent with the catalog.
func GrokInstalled ¶
func GrokInstalled() bool
GrokInstalled reports whether a Grok CLI install is present. Heuristic: ~/.grok exists. Session scanning is intentionally best-effort.
func InvalidateAgent ¶
func InvalidateClaudeCache ¶
func InvalidateClaudeCache()
InvalidateClaudeCache forces the next Scan() to walk the filesystem.
func InvalidateCodexCache ¶
func InvalidateCodexCache()
InvalidateCodexCache forces the next ScanCodex() to walk the filesystem.
func InvalidateGrokCache ¶
func InvalidateGrokCache()
InvalidateGrokCache forces the next ScanGrok() to walk the filesystem.
func InvalidatePiCache ¶
func InvalidatePiCache()
InvalidatePiCache forces the next ScanPi() to walk the filesystem.
func PiInstalled ¶
func PiInstalled() bool
PiInstalled reports whether a pi CLI install is present. Heuristic: the ~/.pi/agent state dir exists. Authoritative binary detection lives in the agents catalog (BinaryNames=["pi"]); this only gates skills-surface badges.
Types ¶
type Provider ¶
func ProviderFor ¶
type Skill ¶
type Skill struct {
Name string `json:"name"`
Description string `json:"description"`
Category string `json:"category"`
}
Skill is a single catalog entry returned to clients. Categories are scanner-assigned (never plugin-provided) so iOS can group chips deterministically.
func ScanClaude ¶
ScanClaude returns the Claude skill catalog (custom + builtin + commands). 5-minute in-memory cache; caller should not cache further.