go-dt-filepath-refactorer

Refactor Go string-based file paths to use go-dt domain types.

1|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/mikeschinkel/ai-agent-depot --skill go-dt-filepath-refactorer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: go-dt-filepath-refactorer
Source: https://github.com/mikeschinkel/ai-agent-depot/tree/main/skills/go-dt-filepath-refactorer
Command: npx skills add https://github.com/mikeschinkel/ai-agent-depot --skill go-dt-filepath-refactorer

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Go projects often rely on string-based path and filename handling, which leads to scattered validations and brittle APIs. This skill provides a structured approach to migrate those concerns to go-dt domain types (e.g., Filepath, DirPath), reducing boilerplate and improving safety.

Core Features & Use Cases

  • Introduces go-dt types and helpers to standardize path handling.
  • Rewrites internal APIs to operate on dt types while preserving behavior.
  • Common use cases include replacing filepath.Join, os.ReadFile(string), and string paths with dt wrappers in libraries, services, and CLIs.

Quick Start

Refactor the target module to replace string-based path handling with go-dt types across files while preserving behavior.

Frequently Asked Questions about go-dt-filepath-refactorer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I refactor string-based file paths in Go to use domain types?

To refactor string-based file paths in Go to domain types, this Skill rewrites internal APIs to operate on go-dt types like Filepath and DirPath. It enforces boundary conversions and replaces filepath joins while preserving existing behavior.

Why does my Go codebase have scattered path validation and brittle APIs?

Scattered path validation and brittle APIs in Go codebases stem from relying on raw string-based path handling. Migrating to go-dt domain types standardizes path manipulation, reducing boilerplate and improving safety across libraries and CLI tools.

What's the best way to migrate os.ReadFile and filepath.Join to typed wrappers in Go?

The best way to migrate os.ReadFile and filepath.Join to typed wrappers is by applying structured boundary conversions. This Skill replaces string path reads and joins with go-dt equivalents, updating tests to ensure behavior is preserved.

Can I use this refactoring approach for Go CLI tools and services that manipulate I/O?

Yes, you can use this refactoring approach for Go CLI tools, services, and libraries that manipulate file paths and I/O. The Skill applies go-dt domain types across these codebases to safely standardize filesystem operations.

Does migrating to go-dt types preserve the original behavior of my Go path logic?

Migrating to go-dt types preserves the original behavior of your Go path logic. The Skill rewrites internal APIs to operate on domain types while maintaining existing functionality and updating tests to verify consistent execution.

When do I need to replace string paths with go-dt Filepath and DirPath types?

You need to replace string paths with go-dt Filepath and DirPath types when your Go project suffers from scattered validations and brittle APIs. This migration enforces boundary conversions and standardizes path handling to improve safety.