Agent Skillssamhjn/Palvia › File Ops

File Ops

GitHub

提供高级文件操作技能,包括目录管理、批量复制移动、重命名及丰富元数据查询。支持细粒度I/O如文件描述符的打开、读写和定位,适用于需要超越默认工具能力的复杂文件处理场景。

Palvia/Resources/BuiltInSkills/file-ops/SKILL.md samhjn/Palvia

Trigger Scenarios

需要进行复杂的文件或目录操作 需要获取文件的详细元数据 需要进行细粒度的文件I/O操作

Install

npx skills add samhjn/Palvia --skill File Ops -g -y
More Options

Non-standard path

npx skills add https://github.com/samhjn/Palvia/tree/develop/Palvia/Resources/BuiltInSkills/file-ops -g -y

Use without installing

npx skills use samhjn/Palvia@File Ops

指定 Agent (Claude Code)

npx skills add samhjn/Palvia --skill File Ops -a claude-code -g -y

安装 repo 全部 skill

npx skills add samhjn/Palvia --all -g -y

预览 repo 内 skill

npx skills add samhjn/Palvia --list

SKILL.md

Frontmatter
{
    "name": "File Ops",
    "palvia": {
        "tags": [
            "files",
            "filesystem",
            "utilities"
        ],
        "version": "1.0"
    },
    "description": "Advanced file operations: copy, move, directory management, rich stat"
}

File Ops Skill

Install this skill when you need directory management, batch copies, moves/renames, or rich metadata beyond what the default file_* tools provide.

When to use which tool

  • Create directory: skill_file_ops_mkdir(path) — creates intermediate parents.
  • Copy: skill_file_ops_cp(src, dest, recursive?)recursive defaults to true.
  • Move / rename: skill_file_ops_mv(src, dest).
  • Rich metadata: skill_file_ops_stat(path) — returns JSON {name,path,size,is_file,is_dir,is_image,mtime_ms,ctime_ms}.
  • Directory tree: skill_file_ops_tree(path?, max_depth?) — recursive listing.
  • Check existence: skill_file_ops_exists(path) — returns "true" or "false".
  • Touch: skill_file_ops_touch(path) — create an empty file if missing.

POSIX file descriptor operations

For fine-grained I/O (seek, partial reads/writes, truncate), use execute_javascript with the fs namespace directly:

let fd = await fs.open("log.txt", "a+");
await fs.write(fd, "new line\n");
await fs.seek(fd, 0, "start");
let head = await fs.read(fd, 100);
await fs.close(fd);

Open flags: "r", "r+", "w", "w+", "a", "a+" (Node-compatible). Whence for seek: "start" | "current" | "end" (or 0 | 1 | 2).

File descriptors are scoped to a single execute_javascript call and auto-closed when that call ends — but closing explicitly is good hygiene.

Version History

  • 037e537 Current 2026-07-25 06:37

Same Skill Collection

Palvia/Resources/BuiltInSkills/deep-research/SKILL.md
Palvia/Resources/BuiltInSkills/health-plus/SKILL.md
Palvia/Resources/BuiltInSkills/skill-builder/SKILL.md

Metadata

Files
0
Version
fa3cb43
Hash
7389bc94
Indexed
2026-07-25 06:37

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-25 02:57
浙ICP备14020137号-1 $mapa de visitantes$