Skip to content
Agentmart
Submit a tool

go-cache

Reclaim Go disk by clearing the build, test, fuzz, and module caches.

Skill by lexfrei

IndexedBSD-3-Clause★ 11
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/lexfrei-go-cache

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Reclaim Go disk by clearing the build, test, fuzz, and module caches. Measures each cache first, then cleans the user-chosen scope after approval. TRIGGER when the user wants to free Go cache space ("clean go cache", "почисти go кеши", "reclaim GOMODCACHE"). DO NOT trigger for cleaning a specific module or running go mod tidy.

Use cases: testing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/go-cache

What's inside

Skill name
go-cache
Description
Reclaim Go disk by clearing the build, test, fuzz, and module caches. Measures each cache first, then cleans the user-chosen scope after approval. TRIGGER when the user wants to free Go cache space ("clean go cache", "почисти go кеши", "reclaim GOMODCACHE"). DO NOT trigger for cleaning a specific module or running go mod tidy.
License
BSD-3-Clause
Instructions
45 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

Reclaim Go cache disk space, then report what was freed.

Operates in **report → confirm → execute** order. The scope is chosen through an interactive question, not flags. After approval, run the cleanup autonomously.

## Step 1: Locate and measure the caches

```bash
go env GOCACHE GOMODCACHE
```

- `GOCACHE` holds the build, test, and fuzz caches — fully regenerated on the next build.
- `GOMODCACHE` holds downloaded module sources — re-downloaded on the next `go build`/`go mod download`. It is usually the largest, often tens of GB.

Measure both: `du -sh "$GOCACHE"` and `du -sh "$GOMODCACHE"`. If `go` is not installed, stop and say so.

## Step 2: Report and ask (interactive)

Show the size of each cache and the total reclaimable, then **ask the user** (interactive question) which scope to clear:

- **build + test + fuzz only** — keeps the module cache, so the next build does not re-download dependencies.
- **everything, including the module cache** — frees the most, but the next build re-downloads all modules.

Note that either way the next build is slower while caches repopulate.

## Step 3: Execute (after approval)

Build, test, and fuzz caches:

```bash
go clean -cache -testcache -fuzzcache
```

Module cache (only if the user chose to include it):

```bash
go clean -modcache
```

`go clean -modcache` handles the read-only permission bits that Go sets on cached module files — no manual `chmod` needed.

## Step 4: Report

Re-measure `GOCACHE` and `GOMODCACHE` and report the space reclaimed, plus what was kept (the module cache, if the user kept it).

From lexfrei/ccc, BSD-3-Clause.

More from lexfrei/ccc

Signals

Stars
11
Forks
3
Open issues
2
Last commit (this folder)
Jun 3, 2026 (4 months ago)
Last release
Oct 4, 2026 (24 days ago)

From GitHub (fetched Oct 24, 2026).

Details

License
BSD-3-Clause
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from lexfrei

Cite this page

go-cache skill. Agent Mart. https://agentmart.dev/skills/lexfrei-go-cache (last updated 2026-10-24)