Get the FREE Ultimate OpenClaw Setup Guide →

file_editor

Scanned
npx machina-cli add skill valkryhx/google_adk_agent/file_editor --openclaw
Files (1)
SKILL.md
453 B

File Editor Skill

This skill provides tools for file system operations.

Capabilities

  • Read file contents
  • Write to files
  • List directory contents
  • Check file existence
  • Analyze image content (vision processing for both local paths and network URLs)
  • View image in UI (display only, without vision processing, supports local paths and network URLs)

Source

git clone https://github.com/valkryhx/google_adk_agent/blob/main/skills/file_editor/SKILL.mdView on GitHub

Overview

File Editor is a toolbox for basic filesystem operations: reading and writing file contents, listing directories, and checking existence. It also provides image analysis (vision) for local paths and URLs and a UI image viewer for quick inspection.

How This Skill Works

The skill exposes operations to interact with the host filesystem and file assets: reading, writing, listing, and checking presence of files and directories. For images, it can perform vision-based analysis on local paths or network URLs, and it offers a display-only UI image viewer for quick inspection of images from local or remote sources.

When to Use It

  • Edit and tune configuration files (e.g., JSON, YAML, or text) before deployment
  • Inventory a directory of assets or logs to generate reports
  • Verify a file exists before attempting read or write operations
  • Analyze image content from local files or remote URLs for metadata or verification
  • Preview images in a UI to confirm assets without triggering vision processing

Quick Start

  1. Step 1: Initialize the file_editor tool in your workflow
  2. Step 2: Use readFile or listDirectory to fetch data or inspect assets
  3. Step 3: Use writeFile or viewImage to save results or preview assets

Best Practices

  • Prefer absolute paths or resolve relative paths within your workflow
  • Validate targets and permissions before writing to avoid data loss
  • List before bulk operations to prevent surprises and errors
  • Treat text and binary files differently when reading or writing
  • Sanitize image URLs or paths and handle network failures gracefully

Example Use Cases

  • Read a config.json, modify a parameter, and write the updated file back to disk
  • List all files in assets/ and generate a report of file counts and sizes
  • Check if logs/app.log exists before appending new entries
  • Analyze a product image from a URL to extract basic metadata (dimensions, format)
  • Display a local image in the UI for quick visual verification

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers