fs-head

Read the first N lines from text files in a sandboxed filesystem.

10|Updated Jul 22, 2025
One-click install
npx skills add https://github.com/bdambrosio/Cognitive_workbench --skill fs-head
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fs-head
Source: https://github.com/bdambrosio/Cognitive_workbench/tree/main/src/world-tools/fs/fs-head
Command: npx skills add https://github.com/bdambrosio/Cognitive_workbench --skill fs-head

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill allows you to quickly view the beginning lines of a text file without needing to open it in a separate editor, saving time and context switching.

Core Features & Use Cases

  • Preview File Content: Read the first N lines of any text file within the agent's sandboxed filesystem.
  • Metadata Inclusion: The output includes metadata about the file path, line range, and whether the content was truncated.
  • Use Case: When debugging an application, you can use this Skill to quickly inspect the latest log entries in scenarios/<world_name>/fs/logs/app.log to identify errors.

Quick Start

Use the fs-head skill to read the first 10 lines of the file located at logs/app.log.

Frequently Asked Questions about fs-head

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

FAQPage Schema
How do I preview the first few lines of a log file without opening a full editor?

To read the first lines of a text file, specify the file path and the desired number of lines. The skill resolves relative paths within the sandboxed filesystem and returns the initial content along with metadata indicating the line range and truncation status.

Can I inspect configuration files safely within the agent's sandbox?

Yes, you can inspect configuration files safely within the agent's sandbox. The skill performs file I/O operations securely within a sandboxed filesystem environment, allowing you to quickly review text-based data without external editors.

Does the file preview output include information about line truncation?

Yes, the file preview output includes information about line truncation. The metadata returned with the initial lines explicitly indicates the file path, the line range read, and whether the content was truncated.

What is the best way to quickly check the start of a text file during debugging?

The best way to quickly check the start of a text file during debugging is to read the initial lines directly. This allows you to inspect log entries or configuration data for errors without the context switching of opening a separate editor.

Are there limitations when reading relative paths in the sandboxed filesystem?

The skill requires the ability to resolve relative paths within a world's filesystem to handle file I/O operations safely. It is limited to reading text-based data within this sandboxed environment rather than modifying files.