skillscan

package
v0.1.5555 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package skillscan reads a skill's files for what its user would want to know before an agent follows them (狮子座 on Discord): instructions to advertise links or products, or to send data home; install steps that download a program and run it; scripts that reach the network or read credentials; and text a reader of the rendered page doesn't see (zero-width, bidi and tag characters, HTML comments that speak to the model). It reads only the bytes it is given: nothing goes to a network or a model, and the same files always give the same findings.

A finding is something to look at, not a verdict: the page shows each with its file, line and words, and the user decides to install, keep or remove the skill. Nothing here changes a file.

Index

Constants

View Source
const (
	Promo       = "promo"       // tells the agent to show links or products to the user
	Telemetry   = "telemetry"   // sends data home, or turns telemetry on
	Download    = "download"    // downloads a program and runs it
	Credentials = "credentials" // reads credential files, or the whole environment
	Hidden      = "hidden"      // text the rendered page doesn't show
	Network     = "network"     // a script reaches the network
	Program     = "program"     // a compiled program, which can't be read
	Secret      = "secret"      // a script reads a secret from the environment
)

The kinds of finding.

View Source
const (
	Warn = "warn"
	Note = "note"
)

The levels: a warning is what the check is for; a note is worth knowing but ordinary in a skill that calls an API.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finding

type Finding struct {
	Kind  string `json:"kind"`
	Level string `json:"level"`
	File  string `json:"file"`           // its place in the skill's folder, with /
	Line  int    `json:"line,omitempty"` // from 1; 0 for the file as a whole
	Text  string `json:"text"`           // the line, shortened, what can't be seen shown
}

Finding is one thing found: where, and the words that say it.

func File

func File(rel string, b []byte) []Finding

File is what one file holds: rel is its place in the skill's folder.

type Report

type Report struct {
	Findings []Finding `json:"findings"`
	More     int       `json:"more,omitempty"` // findings past the ones listed
}

Report is what was found in one skill.

func (*Report) Kinds

func (r *Report) Kinds() []string

Kinds is each kind found, warnings' first, in the order found.

func (*Report) Warns

func (r *Report) Warns() int

Warns is how many of the findings listed are warnings.

type Scanner

type Scanner struct {
	// contains filtered or unexported fields
}

Scanner gathers the findings of one skill's files, given one at a time.

func New

func New() *Scanner

New is a Scanner with nothing read yet.

func (*Scanner) Add

func (s *Scanner) Add(rel string, b []byte)

Add reads one file of the skill: rel is its place in the skill's folder, with /.

func (*Scanner) Report

func (s *Scanner) Report() *Report

Report is what was found: warnings first, SKILL.md's first among them, then by file and line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL