temp-file-management

Create, name, store, and clean up temporary files in data processing pipelines.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/sage-base/sagebase --skill temp-file-management
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: temp-file-management
Source: https://github.com/sage-base/sagebase/tree/main/.claude/skills/temp-file-management
Command: npx skills add https://github.com/sage-base/sagebase --skill temp-file-management

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Temporary and intermediate files can clutter projects and leak disk space, making it hard to track processing state and cleanup after runs.

Core Features & Use Cases

  • Enforces use of a dedicated tmp/ directory for all transient data during processing.
  • Encourages meaningful, unique filenames using timestamps or UUIDs and pathlib.Path for robust path handling.
  • Provides consistent cleanup guidance, including try-finally and context-manager patterns to remove or archive files after completion.

Quick Start

Create a tmp/ directory in your project, write intermediate results with timestamped or UUID-based names (for example tmp/process_20240201_120000.json), and ensure cleanup after processing. Consider moving long-term outputs to _docs/ or the appropriate archival location.

Frequently Asked Questions about temp-file-management

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

FAQPage Schema
How do I manage temporary files in a Python data processing pipeline?

Manage temporary files by enforcing a dedicated tmp/ directory for transient data, using meaningful unique names with timestamps or UUIDs, and applying safe cleanup patterns like try-finally to remove files after processing completion.

What is the best way to clean up intermediate data files after processing?

The best way to clean up intermediate files is using consistent cleanup guidance with try-finally and context-manager patterns to automatically remove or archive transient data from the tmp/ directory after processing runs finish.

How does pathlib handle relative paths for temporary file management?

pathlib.Path handles relative paths for temporary file management by providing robust path handling, enabling meaningful unique filenames with timestamps or UUIDs while maintaining consistent directory structure for transient data storage.

Why do temporary files cause disk space and project clutter issues?

Temporary files cause clutter and disk space issues by accumulating intermediate data without proper cleanup patterns, making it difficult to track processing state and automatically remove transient files after pipeline runs complete.

Can I use context-manager patterns to safely delete tmp directory files?

Yes, context-manager patterns safely delete tmp directory files by providing consistent cleanup guidance that removes or archives transient data after processing, preventing accidental data loss and ensuring automatic cleanup upon completion.

When should I archive intermediate files instead of deleting them?

Archive intermediate files instead of deleting when long-term outputs need preservation, moving them from tmp/ to archival locations like _docs/ or appropriate directories while applying safe cleanup patterns for remaining transient data.