write-file

Create new files at absolute paths with required parameters and parent directories.

23|2|Updated Jun 9, 2025
One-click install
npx skills add https://github.com/kaptinlin/gozod --skill write-file-kaptinlin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-file
Source: https://github.com/kaptinlin/gozod/tree/main/.agents/skills/write-file
Command: npx skills add https://github.com/kaptinlin/gozod --skill write-file-kaptinlin

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the safe creation of new files by enforcing required parameters, absolute paths, directory creation, and support for multi-line content and large-file chunking, preventing edits to existing files.

Core Features & Use Cases

  • Enforces required parameters and absolute paths for new file creation
  • Creates parent directories automatically and supports multi-line content via template strings
  • Supports chunking for large files and provides robust error troubleshooting
  • Guidance to avoid editing existing files and to use appropriate tools for reads and edits

Quick Start

Create a new file at a specified absolute path with the desired multi-line content using the Write tool.

Frequently Asked Questions about write-file

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

FAQPage Schema
How do I safely create a new file and ensure parent directories exist automatically?

To safely create a new file, you must provide an absolute path and the required parameters. The file creation process automatically generates any missing parent directories and validates inputs before writing the content.

What is the best way to write large files with multi-line content without encountering errors?

Writing large files with multi-line content is handled through automatic chunking and template strings. This approach breaks down the content into manageable pieces to prevent errors and ensure predictable file creation outcomes.

Can I use this file creation method to edit or append to existing files?

No, this file creation method explicitly prevents edits to existing files. It is designed strictly for generating new source files, configuration files, or documentation, and directs you to use appropriate tools for reads and edits instead.

Why does file creation fail when I provide a relative path instead of an absolute path?

File creation fails with relative paths because the validation rules enforce absolute paths to guarantee predictable outcomes. Providing a validated absolute path ensures the system can accurately locate or create the necessary directory structure.

How do I troubleshoot validation errors when automating file creation?

Troubleshooting validation errors during file creation involves checking the enforced required parameters and ensuring your absolute path is correctly formatted. The system provides clear error handling and guidance to correct any missing or invalid inputs.

When do I need to use chunked writes for creating configuration files or source code?

Chunked writes are needed for file creation when dealing with large multi-line content that exceeds standard processing limits. This technique ensures safe, automated creation of large source files or documentation without memory issues.