Skip to content
This repository was archived by the owner on Dec 17, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions cmd/skills/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,21 @@ import (

"github.com/sleuth-io/skills/internal/autoupdate"
"github.com/sleuth-io/skills/internal/buildinfo"
"github.com/sleuth-io/skills/internal/clients"
"github.com/sleuth-io/skills/internal/clients/claude_code"
// "github.com/sleuth-io/skills/internal/clients/cursor" // TODO: Uncomment after thorough testing
"github.com/sleuth-io/skills/internal/commands"
"github.com/sleuth-io/skills/internal/git"
"github.com/sleuth-io/skills/internal/logger"
"github.com/spf13/cobra"
)

func init() {
// Register all clients
clients.Register(claude_code.NewClient())
// clients.Register(cursor.NewClient()) // TODO: Uncomment after thorough testing
}

func main() {
// Log command invocation
log := logger.Get()
Expand Down
10 changes: 0 additions & 10 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require (
github.com/BurntSushi/toml v1.5.0
github.com/Masterminds/semver/v3 v3.4.0
github.com/creativeprojects/go-selfupdate v1.5.1
github.com/gen2brain/beeep v0.11.1
github.com/gofrs/flock v0.13.0
github.com/google/uuid v1.6.0
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c
Expand All @@ -17,29 +16,20 @@ require (

require (
code.gitea.io/sdk/gitea v0.22.0 // indirect
git.sr.ht/~jackmordaunt/go-toast v1.1.2 // indirect
github.com/42wim/httpsig v1.2.3 // indirect
github.com/davidmz/go-pageant v1.0.2 // indirect
github.com/esiqveland/notify v0.13.3 // indirect
github.com/go-fed/httpsig v1.1.0 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/godbus/dbus/v5 v5.2.0 // indirect
github.com/google/go-github/v30 v30.1.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.8 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jackmordaunt/icns/v3 v3.0.1 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rogpeppe/go-internal v1.14.1 // indirect
github.com/sergeymakinen/go-bmp v1.0.0 // indirect
github.com/sergeymakinen/go-ico v1.0.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af // indirect
github.com/ulikunitz/xz v0.5.14 // indirect
github.com/xanzy/go-gitlab v0.115.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
Expand Down
29 changes: 0 additions & 29 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
code.gitea.io/sdk/gitea v0.22.0 h1:HCKq7bX/HQ85Nw7c/HAhWgRye+vBp5nQOE8Md1+9Ef0=
code.gitea.io/sdk/gitea v0.22.0/go.mod h1:yyF5+GhljqvA30sRDreoyHILruNiy4ASufugzYg0VHM=
git.sr.ht/~jackmordaunt/go-toast v1.1.2 h1:/yrfI55LRt1M7H1vkaw+NaH1+L1CDxrqDltwm5euVuE=
git.sr.ht/~jackmordaunt/go-toast v1.1.2/go.mod h1:jA4OqHKTQ4AFBdwrSnwnskUIIS3HYzlJSgdzCKqfavo=
github.com/42wim/httpsig v1.2.3 h1:xb0YyWhkYj57SPtfSttIobJUPJZB9as1nsfo7KWVcEs=
github.com/42wim/httpsig v1.2.3/go.mod h1:nZq9OlYKDrUBhptd77IHx4/sZZD+IxTBADvAPI9G/EM=
github.com/BurntSushi/toml v1.5.0 h1:W5quZX/G/csjUnuI8SUYlsHs9M38FC7znL0lIO+DvMg=
Expand All @@ -14,24 +12,14 @@ github.com/cpuguy83/go-md2man/v2 v2.0.6/go.mod h1:oOW0eioCTA6cOiMLiUPZOpcVxMig6N
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/creativeprojects/go-selfupdate v1.5.1 h1:fuyEGFFfqcC8SxDGolcEPYPLXGQ9Mcrc5uRyRG2Mqnk=
github.com/creativeprojects/go-selfupdate v1.5.1/go.mod h1:2uY75rP8z/D/PBuDn6mlBnzu+ysEmwOJfcgF8np0JIM=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidmz/go-pageant v1.0.2 h1:bPblRCh5jGU+Uptpz6LgMZGD5hJoOt7otgT454WvHn0=
github.com/davidmz/go-pageant v1.0.2/go.mod h1:P2EDDnMqIwG5Rrp05dTRITj9z2zpGcD9efWSkTNKLIE=
github.com/esiqveland/notify v0.13.3 h1:QCMw6o1n+6rl+oLUfg8P1IIDSFsDEb2WlXvVvIJbI/o=
github.com/esiqveland/notify v0.13.3/go.mod h1:hesw/IRYTO0x99u1JPweAl4+5mwXJibQVUcP0Iu5ORE=
github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/gen2brain/beeep v0.11.1 h1:EbSIhrQZFDj1K2fzlMpAYlFOzV8YuNe721A58XcCTYI=
github.com/gen2brain/beeep v0.11.1/go.mod h1:jQVvuwnLuwOcdctHn/uyh8horSBNJ8uGb9Cn2W4tvoc=
github.com/go-fed/httpsig v1.1.0 h1:9M+hb0jkEICD8/cAiNqEB66R87tTINszBRTjwjQzWcI=
github.com/go-fed/httpsig v1.1.0/go.mod h1:RCMrTZvN1bJYtofsG4rd5NaO5obxQ5xBkdiS7xsT7bM=
github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE=
github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78=
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/godbus/dbus/v5 v5.2.0 h1:3WexO+U+yg9T70v9FdHr9kCxYlazaAXUhx2VMkbfax8=
github.com/godbus/dbus/v5 v5.2.0/go.mod h1:3AAv2+hPq5rdnr5txxxRwiGjPXamgoIHgz9FPBfOp3c=
github.com/gofrs/flock v0.13.0 h1:95JolYOvGMqeH31+FC7D2+uULf6mG61mEZ/A8dRYMzw=
github.com/gofrs/flock v0.13.0/go.mod h1:jxeyy9R1auM5S6JYDBhDt+E2TCo7DkratH4Pgi8P+Z0=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
Expand All @@ -54,8 +42,6 @@ github.com/hashicorp/go-version v1.7.0 h1:5tqGy27NaOTB8yJKUZELlFAS/LTKJkrmONwQKe
github.com/hashicorp/go-version v1.7.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jackmordaunt/icns/v3 v3.0.1 h1:xxot6aNuGrU+lNgxz5I5H0qSeCjNKp8uTXB1j8D4S3o=
github.com/jackmordaunt/icns/v3 v3.0.1/go.mod h1:5sHL59nqTd2ynTnowxB/MDQFhKNqkK8X687uKNygaSQ=
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
Expand All @@ -68,8 +54,6 @@ github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6T
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ=
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ=
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -81,25 +65,13 @@ github.com/rogpeppe/go-internal v1.14.1/go.mod h1:MaRKkUm5W0goXpeCfT7UZI6fk/L7L7
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/schollz/progressbar/v3 v3.18.0 h1:uXdoHABRFmNIjUfte/Ex7WtuyVslrw2wVPQmCN62HpA=
github.com/schollz/progressbar/v3 v3.18.0/go.mod h1:IsO3lpbaGuzh8zIMzgY3+J8l4C8GjO0Y9S69eFvNsec=
github.com/sergeymakinen/go-bmp v1.0.0 h1:SdGTzp9WvCV0A1V0mBeaS7kQAwNLdVJbmHlqNWq0R+M=
github.com/sergeymakinen/go-bmp v1.0.0/go.mod h1:/mxlAQZRLxSvJFNIEGGLBE/m40f3ZnUifpgVDlcUIEY=
github.com/sergeymakinen/go-ico v1.0.0 h1:uL3khgvKkY6WfAetA+RqsguClBuu7HpvBB/nq/Jvr80=
github.com/sergeymakinen/go-ico v1.0.0/go.mod h1:wQ47mTczswBO5F0NoDt7O0IXgnV4Xy3ojrroMQzyhUk=
github.com/spf13/cobra v1.10.1 h1:lJeBwCfmrnXthfAupyUTzJ/J4Nc1RsHC/mSRU2dll/s=
github.com/spf13/cobra v1.10.1/go.mod h1:7SmJGaTHFVBY0jW4NXGluQoLvhqFQM+6XSKD+P4XaB0=
github.com/spf13/pflag v1.0.9/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af h1:6yITBqGTE2lEeTPG04SN9W+iWHCRyHqlVYILiSXziwk=
github.com/tadvi/systray v0.0.0-20190226123456-11a2b8fa57af/go.mod h1:4F09kP5F+am0jAwlQLddpoMDM+iewkxxt6nxUQ5nq5o=
github.com/ulikunitz/xz v0.5.14 h1:uv/0Bq533iFdnMHZdRBTOlaNMdb1+ZxXIlHDZHIHcvg=
github.com/ulikunitz/xz v0.5.14/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14=
github.com/xanzy/go-gitlab v0.115.0 h1:6DmtItNcVe+At/liXSgfE/DZNZrGfalQmBRmOcJjOn8=
Expand Down Expand Up @@ -136,6 +108,5 @@ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntN
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
19 changes: 19 additions & 0 deletions internal/artifact/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,22 @@ func (t *Type) UnmarshalText(text []byte) error {
*t = FromString(string(text))
return nil
}

// AllTypes returns all defined artifact types
func AllTypes() []Type {
return []Type{
TypeMCP,
TypeMCPRemote,
TypeSkill,
TypeAgent,
TypeCommand,
TypeHook,
}
}

// Artifact represents a simple artifact with just name, version, and type
type Artifact struct {
Name string
Version string
Type Type
}
54 changes: 54 additions & 0 deletions internal/artifacts/detectors/agent.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package detectors

import (
"github.com/sleuth-io/skills/internal/artifact"
"github.com/sleuth-io/skills/internal/metadata"
)

// AgentHandler handles agent artifact installation
type AgentDetector struct{}

// Compile-time interface checks
var (
_ ArtifactTypeDetector = (*AgentDetector)(nil)
_ UsageDetector = (*AgentDetector)(nil)
)

// DetectType returns true if files indicate this is an agent artifact
func (h *AgentDetector) DetectType(files []string) bool {
for _, file := range files {
if file == "AGENT.md" || file == "agent.md" {
return true
}
}
return false
}

// GetType returns the artifact type string
func (h *AgentDetector) GetType() string {
return "agent"
}

// CreateDefaultMetadata creates default metadata for an agent
func (h *AgentDetector) CreateDefaultMetadata(name, version string) *metadata.Metadata {
return &metadata.Metadata{
MetadataVersion: "1.0",
Artifact: metadata.Artifact{
Name: name,
Version: version,
Type: artifact.TypeAgent,
},
Agent: &metadata.AgentConfig{
PromptFile: "AGENT.md",
},
}
}

// DetectUsageFromToolCall detects agent usage from tool calls
func (h *AgentDetector) DetectUsageFromToolCall(toolName string, toolInput map[string]interface{}) (string, bool) {
if toolName != "Task" {
return "", false
}
agentName, ok := toolInput["subagent_type"].(string)
return agentName, ok
}
61 changes: 61 additions & 0 deletions internal/artifacts/detectors/command.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package detectors

import (
"strings"

"github.com/sleuth-io/skills/internal/artifact"
"github.com/sleuth-io/skills/internal/metadata"
)

// CommandHandler handles command artifact installation
type CommandDetector struct{}

// Compile-time interface checks
var (
_ ArtifactTypeDetector = (*CommandDetector)(nil)
_ UsageDetector = (*CommandDetector)(nil)
)

// DetectType returns true if files indicate this is a command artifact
func (h *CommandDetector) DetectType(files []string) bool {
for _, file := range files {
if file == "COMMAND.md" || file == "command.md" {
return true
}
}
return false
}

// GetType returns the artifact type string
func (h *CommandDetector) GetType() string {
return "command"
}

// CreateDefaultMetadata creates default metadata for a command
func (h *CommandDetector) CreateDefaultMetadata(name, version string) *metadata.Metadata {
return &metadata.Metadata{
MetadataVersion: "1.0",
Artifact: metadata.Artifact{
Name: name,
Version: version,
Type: artifact.TypeCommand,
},
Command: &metadata.CommandConfig{
PromptFile: "COMMAND.md",
},
}
}

// DetectUsageFromToolCall detects command usage from tool calls
func (h *CommandDetector) DetectUsageFromToolCall(toolName string, toolInput map[string]interface{}) (string, bool) {
if toolName != "SlashCommand" {
return "", false
}
command, ok := toolInput["command"].(string)
if !ok {
return "", false
}
// Strip leading slash: "/my-command" -> "my-command"
commandName := strings.TrimPrefix(command, "/")
return commandName, true
}
54 changes: 54 additions & 0 deletions internal/artifacts/detectors/detector.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
package detectors

import (
"github.com/sleuth-io/skills/internal/metadata"
)

// ArtifactTypeDetector detects artifact types from file structures
type ArtifactTypeDetector interface {
// DetectType returns true if the file list matches this artifact type
DetectType(files []string) bool

// GetType returns the artifact type string
GetType() string

// CreateDefaultMetadata creates default metadata for this type
CreateDefaultMetadata(name, version string) *metadata.Metadata
}

// UsageDetector provides methods to detect artifact usage from tool calls
type UsageDetector interface {
// DetectUsageFromToolCall checks if this handler's artifact type was used in a tool call
// Returns (artifact_name, detected)
DetectUsageFromToolCall(toolName string, toolInput map[string]interface{}) (string, bool)
}

// detectorRegistry holds all registered detectors
var detectorRegistry []func() ArtifactTypeDetector

// RegisterDetector registers a detector factory function
func RegisterDetector(factory func() ArtifactTypeDetector) {
detectorRegistry = append(detectorRegistry, factory)
}

// DetectArtifactType detects the artifact type from a list of files
func DetectArtifactType(files []string, name, version string) *metadata.Metadata {
for _, factory := range detectorRegistry {
detector := factory()
if detector.DetectType(files) {
return detector.CreateDefaultMetadata(name, version)
}
}

// Default to skill if nothing detected
return (&SkillDetector{}).CreateDefaultMetadata(name, version)
}

func init() {
// Register all detectors
RegisterDetector(func() ArtifactTypeDetector { return &SkillDetector{} })
RegisterDetector(func() ArtifactTypeDetector { return &AgentDetector{} })
RegisterDetector(func() ArtifactTypeDetector { return &CommandDetector{} })
RegisterDetector(func() ArtifactTypeDetector { return &HookDetector{} })
RegisterDetector(func() ArtifactTypeDetector { return &MCPDetector{} })
}
52 changes: 52 additions & 0 deletions internal/artifacts/detectors/hook.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package detectors

import (
"github.com/sleuth-io/skills/internal/artifact"
"github.com/sleuth-io/skills/internal/metadata"
)

// HookHandler handles hook artifact installation
type HookDetector struct{}

// Compile-time interface checks
var (
_ ArtifactTypeDetector = (*HookDetector)(nil)
_ UsageDetector = (*HookDetector)(nil)
)

// DetectType returns true if files indicate this is a hook artifact
func (h *HookDetector) DetectType(files []string) bool {
for _, file := range files {
if file == "hook.sh" || file == "hook.py" || file == "hook.js" {
return true
}
}
return false
}

// GetType returns the artifact type string
func (h *HookDetector) GetType() string {
return "hook"
}

// CreateDefaultMetadata creates default metadata for a hook
func (h *HookDetector) CreateDefaultMetadata(name, version string) *metadata.Metadata {
return &metadata.Metadata{
MetadataVersion: "1.0",
Artifact: metadata.Artifact{
Name: name,
Version: version,
Type: artifact.TypeHook,
},
Hook: &metadata.HookConfig{
Event: "pre-commit",
ScriptFile: "hook.sh",
},
}
}

// DetectUsageFromToolCall detects hook usage from tool calls
// Hooks are not detectable from tool usage, so this always returns false
func (h *HookDetector) DetectUsageFromToolCall(toolName string, toolInput map[string]interface{}) (string, bool) {
return "", false
}
Loading