tools-file-ops

Write files atomically and manage directories for CUI workflow scripts.

4|Updated Jan 11, 2026
One-click install
npx skills add https://github.com/cuioss/plan-marshall --skill tools-file-ops
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tools-file-ops
Source: https://github.com/cuioss/plan-marshall/tree/main/marketplace/bundles/plan-marshall/skills/tools-file-ops
Command: npx skills add https://github.com/cuioss/plan-marshall --skill tools-file-ops

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Atomic, safe file writing and directory management for CUI workflow scripts.

Core Features & Use Cases

  • Base directory configuration and path helpers for .plan workflows
  • Atomic_write_file and ensure_directory for reliable script I/O
  • JSON output helpers and Markdown metadata parsing/generation

Quick Start

Use atomic_write_file to persist content into the workflow base directory after constructing the target path with base_path.

Frequently Asked Questions about tools-file-ops

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

FAQPage Schema
How do I prevent file corruption during atomic file writes in workflow scripts?

Atomic file writes prevent corruption by writing to a temporary file and then renaming it. This approach ensures the target file is either completely updated or remains untouched, providing reliable script I/O.

What is the best way to ensure directories exist before writing plan files?

The best way to ensure directories exist is to use an ensure_directory utility before writing. This verifies and creates the required base directory path structure, preventing write failures in CUI workflows.

How does Markdown metadata generation work for workflow files?

Markdown metadata generation works by parsing existing content and constructing structured metadata blocks. This allows workflow scripts to inject and manage contextual data within plan files reliably.

Can I use JSON output helpers to format data from file operations?

Yes, you can use JSON output helpers to format data from file operations. These utilities structure script output into valid JSON, enabling downstream processes to consume the results of your file management tasks.

How do I configure a base directory path for workflow file management?

You configure a base directory path by setting a base directory variable and using path construction helpers. This ensures all file operations target the correct workflow directory, such as the .plan folder.

Why do my workflow scripts fail when writing to the .plan directory?

Workflow scripts fail writing to the .plan directory when it does not exist or lacks write permissions. Using directory management utilities to ensure the path exists before writing solves this issue.