fileflow-pathologize

fileflow-pathologize is a skill for Claude Code from spf13/go-skills. It costs 110 tokens per session (2,238 once invoked), scanned A, original, MIT.

A guide for handling files safely in Go with fileflow and pathologize. It covers moving, copying, renaming, downloading, extracting, and creating files across different operating systems.

In plain words
What is it for?
Use it when Go code works with files or directories, especially when moving files between disks or generating paths from user or external data.
Why use it?
It helps prevent filename conflicts and invalid paths when file operations behave differently between operating systems.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the fileflow-pathologize plugin — 1 skill shipped together

Good fit Use it when Go code works with files or directories, especially when moving files between disks or generating paths from user or external data.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/spf13/go-skills/fileflow-pathologize
Install

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.

Any agent
npx skills add spf13/go-skills --skill fileflow-pathologize
Clone the repo
git clone --depth 1 https://github.com/spf13/go-skills

Made for: Claude Code.

Or install fileflow-pathologize, the plugin that ships this one along with the rest of its 1 skill.

Wrote 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.

agentmods badge for fileflow-pathologize

README.md
[![agentmods](https://agentmods.dev/badge/skills/spf13/go-skills/fileflow-pathologize/github.svg)](https://agentmods.dev/skills/spf13/go-skills/fileflow-pathologize)
Your own site
<a href="https://agentmods.dev/skills/spf13/go-skills/fileflow-pathologize"><img src="https://agentmods.dev/badge/skills/spf13/go-skills/fileflow-pathologize/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.

agentmods 80×15 button for fileflow-pathologize

Your own site · 80×15
<a href="https://agentmods.dev/skills/spf13/go-skills/fileflow-pathologize"><img src="https://agentmods.dev/badge/skills/spf13/go-skills/fileflow-pathologize.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,238 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00110 $0.02238
Opus 5.5 $0.00044 $0.00895
Sonnet 5.5 $0.00022 $0.00448
Haiku 4.5 $0.00011 $0.00224

Measured 18d ago against content hash c94e594a5991, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fileflow-pathologize 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 18d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

fileflow-pathologize/SKILL.md · 175 lines

How it starts

The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Safe File Operations

Two rules decide whether file code is safe. spf13/fileflow and spf13/pathologize are one reference implementation of them — the rules hold whether or not you use those packages, and the code below is what correct call sites look like.

  1. A destination is a trusted root plus sanitized parts. Untrusted input never chooses a path level or a separator.
  2. Never assume the file landed where you asked. Conflict handling picks the real name; act on the path the operation returns.

If you have neither package, the stdlib path is: os.OpenRoot (Go 1.24+) for kernel-enforced containment, rename-then-copy for EXDEV, and your own suffix loop. The same two rules still decide whether that code is correct.

Signatures, Flow options, the naming matrix, and error types live in references/fileflow-api.md.

When to Activate

  • Moving, copying, or renaming files, especially across drives/volumes
  • invalid cross-device link / EXDEV from os.Rename
  • "destination already exists" where clobbering loses data
  • Building a destination from a filename, user input, or a regex capture
  • Downloaders, extractors, importers, organizers, upload handlers
  • About to write os.Rename + io.Copy + filepath.Clean by hand

When NOT to Use This Skill

For general file I/O patterns use go. For CLI file commands use cobra-viper. For desktop file dialogs use wails. This skill is for cross-filesystem moves and untrusted filename sanitization.

Rule 1: Trusted root, sanitized parts

pathologize.Join takes the root verbatim (separators, drive and UNC prefixes preserved, never sanitized) and runs every untrusted part through Clean: split on / and \, drop empty/./.. segments, cap each at 255 bytes, defuse reserved device names (CON → CON_), strip control characters and the characters illegal on any OS (\ / : * ? " < > |), and keep the result lexically under the root. A part cannot inject an absolute path or ../ its way out. The root must come from configuration, never from the request.

Read the full file on GitHub · 175 lines

Files

What ships with it

2 files 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.

Changes

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.

  1. 18d ago Changed · -161 lines · -41 tokens per session c94e594a5991
  2. 1mo ago Changed · +30 lines 844463d49014
  3. 3mo ago First seen · 306 lines · 151 tokens per session scan A 46737a2f2bd1

Subscribe to this mod's changes

fileflow-pathologize is a skill published in the GitHub repository spf13/go-skills (727 stars, last pushed 19d ago), licensed MIT. It adds 110 tokens to every session and 2,238 once invoked, about $0.0004 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-08-30.

Related

fileflow-pathologize compared with skills from other repositories

fileflow-pathologize next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fileflow-pathologizespf13/go-skillsSkill72719d agoMITA110Claude Code
golang-testingaffaan-m/ECCSkill315kyesterdayMITA37Claude Code, Kiro
golang-patternsaffaan-m/ECCSkill315kyesterdayMITA45Claude Code, Kiro
golang-testingsamber/cc-skills-golangSkill4.0k2d agoMITA115Claude Code
golang-samber-oopssamber/cc-skills-golangSkill4.0k2d agoMITA74Claude Code
golang-uber-fxsamber/cc-skills-golangSkill4.0k2d agoMITA122Claude Code
ax-go-agent-optimizeax-llm/axSkill3.0kyesterdayApache-2.0A51Claude Code, Codex