home / skills / bdambrosio / cognitive_workbench / fs-stat
This skill retrieves filesystem metadata for a specified path under scenarios/<world_name>/fs, enabling inspection of files and directories.
npx playbooks add skill bdambrosio/cognitive_workbench --skill fs-statReview the files below or copy the command above to add this skill to your agents.
---
name: fs-stat
type: python
description: "Return metadata for a file or directory under scenarios/<world_name>/fs."
schema_hint: {"path": "string (relative)"}
---
# fs-stat
Return metadata for a file or directory in the filesystem sandbox.
## Input
- `path`: Relative path under `scenarios/<world_name>/fs` (required)
## Output
Success returns:
- `resource_id`: Note ID containing metadata
## Examples
```json
{"type":"fs-stat","path":"data/config.json","out":"$stat"}
```
This skill returns metadata for a file or directory located under scenarios/<world_name>/fs in the sandboxed filesystem. It queries the specified relative path and produces a Note-style resource containing file attributes and timestamps. Use it to inspect files or directories before reads, writes, or sync operations.
You provide a relative path under scenarios/<world_name>/fs and the skill inspects that path in the sandbox. It gathers standard filesystem metadata (existence, type, size, timestamps, permissions where available) and returns a resource_id pointing to a Note that stores the collected metadata. Errors are returned when the path is missing or outside the allowed directory.
What path format is accepted?
Provide a relative path under scenarios/<world_name>/fs. Paths outside that directory or absolute paths are not allowed.
What does the skill return on success?
It returns a resource_id that references a Note containing the file or directory metadata.