Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add spf13/go-skills --skill aferogit clone --depth 1 https://github.com/spf13/go-skillsWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/spf13/go-skills/afero)<a href="https://agentmods.dev/skills/spf13/go-skills/afero"><img src="https://agentmods.dev/badge/skills/spf13/go-skills/afero/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/spf13/go-skills/afero"><img src="https://agentmods.dev/badge/skills/spf13/go-skills/afero.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00131 | $0.02387 |
| Opus 5.5 | $0.00052 | $0.00955 |
| Sonnet 5.5 | $0.00026 | $0.00477 |
| Haiku 4.5 | $0.00013 | $0.00239 |
Grade A, and why
afero scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 17d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 146 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Testable Filesystem Code: afero
Business logic that calls os directly can only be tested against a real disk. Inject the filesystem instead, so tests run in memory and production runs on the OS. github.com/spf13/afero is the interface for code that writes; io/fs is the interface for code that only reads.
Every behavior below was verified against afero v1.15.0 on Go 1.27.
When to Activate
- Go code reads, writes, creates, renames, or walks files and needs unit tests.
- A test writes temp files only to exercise file-handling logic.
- The code takes an
afero.Fs, or someone asks how to fake the filesystem. - A command needs a
--dry-runthat shows what would change without writing. - Code builds paths under a directory from names it does not control.
Choose the Interface by What the Code Does
| The code… | Accept | Test with | Production |
|---|---|---|---|
| only reads | fs.FS |
fstest.MapFS |
os.DirFS(dir) or root.FS() |
| reads and writes | afero.Fs |
afero.NewMemMapFs() |
afero.NewOsFs() |
| must stay inside a directory, whatever the names | *os.Root |
os.OpenRoot(t.TempDir()) |
os.OpenRoot(dir) |
Read-only code needs no dependency: io/fs and testing/fstest are the standard library. Reach for afero when the code writes.
The Pattern: Inject the Fs, Choose It in main
type Store struct {
fs afero.Fs
dir string
}
func NewStore(fs afero.Fs, dir string) *Store {
return &Store{fs: fs, dir: dir}
}
func (s *Store) Save(name string, data []byte) error {
if err := s.fs.MkdirAll(s.dir, 0o755); err != nil {
return err
}
return afero.WriteFile(s.fs, filepath.Join(s.dir, name), data, 0o644)
}
func TestSave(t *testing.T) {
fs := afero.NewMemMapFs()
s := NewStore(fs, "/data")
if err := s.Save("a.txt", []byte("hi")); err != nil {
t.Fatal(err)
}
got, err := afero.ReadFile(fs, "/data/a.txt")
if err != nil || string(got) != "hi" {
t.Fatalf("ReadFile = %q, %v", got, err)
}
}
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 17d ago Changed · +7 lines · +1 tokens per session e4efc725338b
- 26d ago First seen · 139 lines · 130 tokens per session scan A e785a12ac6f2
afero is a skill published in the GitHub repository spf13/go-skills (726 stars, last pushed 17d ago), licensed MIT. It adds 131 tokens to every session and 2,387 once invoked, about $0.0005 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-06.
afero compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| aferospf13/go-skills | Skill | 726 | 17d ago | MIT | A | 131 | Claude Code |
| golang-testingaffaan-m/ECC | Skill | 315k | today | MIT | A | 37 | Claude Code, Kiro |
| timeouts-and-asynconsi/ginkgo | Skill | 9.1k | today | MIT | A | 106 | Claude Code |
| setuponsi/ginkgo | Skill | 9.1k | today | MIT | A | 118 | Claude Code |
| golang-testingsamber/cc-skills-golang | Skill | 4.0k | today | MIT | A | 115 | Claude Code |
| golang-stretchr-testifysamber/cc-skills-golang | Skill | 4.0k | today | MIT | A | 97 | Claude Code |
| overviewonsi/ginkgo | Skill | 9.1k | today | MIT | A | 84 | Claude Code |