Agent skill

Shell Agent File Ops

by HKUDS in HKUDS/OpenSpace

Leverage shellagent for autonomous file creation and modification with automatic tool selection and error recovery

MITAuto-check passed

Install Shell Agent File Ops

skills CLI
$ npx skills add HKUDS/OpenSpace --skill shell-agent-file-ops -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HKUDS/OpenSpace shell-agent-file-ops --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HKUDS/OpenSpace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/benchmarks/gdpval/skills/shell-agent-file-ops .claude/skills/shell-agent-file-ops && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
shell-agent-file-ops
GitHub stars
7.7k
Token cost
~841 tokens
SKILL.md length
326 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Leverage shellagent for autonomous file creation and modification with automatic tool selection and error recovery

  • Works in 4 steps: Decide whether to use Python or Bash → Write and execute the appropriate code → Handle any errors automatically (up to… → …
  • SKILL.md covers Purpose, When to Use, How to Use and Best Practices, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Shell Agent File Ops is an agent skill from HKUDS/OpenSpace. Leverage shellagent for autonomous file creation and modification with automatic tool selection and error recovery

Its SKILL.md is about 840 tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file.

It works with Bash and Python. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

Example prompts

  • “/shell-agent-file-ops”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  1. Decide whether to use Python or Bash
  2. Write and execute the appropriate code
  3. Handle any errors automatically (up to several retry rounds)
  4. Return the result

What it can do on your machine

Read from SKILL.md and the folder at commit 3827781. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Shell Agent File Ops loads about 841 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 326 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~34
When it runs · the whole SKILL.md, loaded when a task matches
~841

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HKUDS/OpenSpace at commit 3827781, republished under its MIT licence (© HKUDS). 326 words, ~841 tokens.

Download SKILL.mdSave it as .claude/skills/shell-agent-file-ops/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
shell-agent-file-ops
description
Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery

Shell Agent File Operations

Purpose

Use shell_agent for file operations when you want the tool to autonomously decide how to accomplish the task (Python vs Bash, which commands to use, error recovery) rather than manually selecting specific tools like write_file or run_shell.

When to Use

Use this pattern when:

  • You need to create, modify, or organize files
  • The optimal approach (Python script, Bash commands, direct file write) is unclear
  • You want automatic error handling and retry logic
  • You prefer to describe what to accomplish rather than how

How to Use

Basic Pattern
Delegate to shell_agent with a clear natural-language task description.
Example: Create a Document File

Task description to shell_agent:

Create a comprehensive SOAP note file containing four sections:
Subjective, Objective, Assessment, and Plan. Include all relevant
patient visit details in a professional medical format.

The shell_agent will:

  1. Decide whether to use Python or Bash
  2. Write and execute the appropriate code
  3. Handle any errors automatically (up to several retry rounds)
  4. Return the result
Example: Modify Existing Files

Task description to shell_agent:

Update all configuration files in the config/ directory to add
a new setting "timeout: 300" under the general section.
Example: Complex File Operations

Task description to shell_agent:

Create a project structure with README.md, src/main.py, and
tests/test_main.py. Include appropriate content in each file
based on a Python data processing project template.

Best Practices

  1. Be specific about content requirements - Describe what should be in the file(s), not just that files should be created.

  2. Include format specifications - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.

  3. Specify file locations - Include paths when files should be in specific directories.

  4. Let shell_agent handle complexity - Don't pre-decide the implementation approach; trust the autonomous selection.

  5. Check the output - Review what shell_agent created to ensure it meets requirements.

Comparison: When NOT to Use This Pattern

Use direct tools instead when:

  • You already know the exact command/script to run → use run_shell
  • You have the exact file content ready → use write_file directly
  • The operation is trivial (single-line file write) → use write_file
  • You need fine-grained control over the implementation

Anti-Patterns to Avoid

❌ Don't over-specify the implementation:

Use Python to write a file called notes.md with this content...

✅ Do describe the desired outcome:

Create a notes.md file with comprehensive documentation about...

❌ Don't use shell_agent for simple direct operations:

Write "hello" to hello.txt

✅ Do use write_file directly for simple cases:

write_file(path="hello.txt", content="hello")

Summary

This pattern shifts focus from implementation mechanics to task intent, leveraging shell_agent's autonomous decision-making for file operations that benefit from intelligent tool selection and automatic error recovery.

© HKUDS, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in benchmarks/gdpval/skills/shell-agent-file-ops of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Shell Agent File Ops next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Shell Agent File Ops compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Shell Agent File Ops this skillHKUDS/OpenSpace7.7k—~841Automated safety check: PassMIT
CLI DeveloperJeffallan/claude-skills12k2 repos~1.2kAutomated safety check: PassMIT
Alloc ProfileClickHouse/ClickHouse50k—~4.3kAutomated safety check: PassApache-2.0
Create Experkfly/ex-skill2.5k—~3.7kAutomated safety check: NotesMIT
Hugging Face API Tool Builderhuggingface/skills11k5 repos~1.5kAutomated safety check: PassApache-2.0
Markdown Exporterbowenliang123/markdown-exporter2711 repos~5.3kAutomated safety check: PassApache-2.0

Similar skills

  • CLI Developer

    Jeffallan/claude-skills

    Walks through designing, building and polishing a command-line tool: user workflow and command hierarchy, implementation in commander, click, typer or cobra, completions and cross-platform testing.

    12k GitHub starsUsed in 2 repos~1.2k tokens
    DevelopmentAuto-check passed
  • Alloc Profile

    ClickHouse/ClickHouse

    Analyze a jemalloc (or other) allocation profile in collapsed stack format.

    50k GitHub stars~4.3k tokensUpdated today
    DatabasesAuto-check passed
  • Create Ex

    perkfly/ex-skill

    Distill an ex-girlfriend into an AI Skill. An agent skill from perkfly/ex-skill.

    2.5k GitHub stars~3.7k tokensUpdated 6 mo ago
    Productivity & AutomationAuto-check: notes
  • Official

    Builds reusable command line scripts that fetch, enrich or process data from the Hugging Face API, aimed at chained, repeated or automated tasks.

    11k GitHub starsUsed in 5 repos~1.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Markdown Exporter

    bowenliang123/markdown-exporter

    Convert Markdown text to DOCX, PPTX, XLSX, PDF, PNG, SVG, HTML, IPYNB, MD, CSV, JSON, JSONL, XML files, and extract code blocks in Markdown to Python, Bash,JS and etc files.

    271 GitHub starsUsed in 1 repo~5.3k tokens
    Documents & OfficeAuto-check passed
  • K8e Sandbox

    xiaods/k8e

    Run a goal end to end inside an isolated K8E sandbox pod (gVisor / Kata / Firecracker) instead of on the host: exec bash / Python / Node / TypeScript, install packages, move files in and out, reuse…

    500 GitHub stars~6k tokensUpdated 10 days ago
    Backend & APIsAuto-check passed

More from HKUDS/OpenSpace

All 199 skills in this repo
  • Walks through producing a master audio track plus stems in Python, from checking a reference file and timing sections by BPM to effects, a zip archive and final verification.

    7.7k GitHub stars~2.9k tokensUpdated 1 mo ago
    Auto-check passed
  • Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

    7.7k GitHub stars~765 tokensUpdated 1 mo ago
    Auto-check passed
  • Gives an agent a workaround when its code-execution sandbox keeps failing: save the Python script to a file and run it through the shell instead.

    7.7k GitHub stars~588 tokensUpdated 1 mo ago
    Auto-check passed
  • A recovery routine for agents whose sandboxed code runner keeps failing: save the Python script to disk, then run it through the shell and read the output.

    7.7k GitHub stars~652 tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback ladder for failed sandboxed code runs, plus the habit of fixing the working directory first so generated files land in the right place.

    7.7k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Fallback workflow for executing Python code when executecodesandbox fails repeatedly

    7.7k GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Shell Agent File Ops

What does Shell Agent File Ops do?

Leverage shellagent for autonomous file creation and modification with automatic tool selection and error recovery. Shell Agent File Ops is an agent skill from HKUDS/OpenSpace.

How do I install Shell Agent File Ops in Claude Code?

Run `npx skills add HKUDS/OpenSpace --skill shell-agent-file-ops -a claude-code`. Or copy the skill folder (benchmarks/gdpval/skills/shell-agent-file-ops in HKUDS/OpenSpace) into .claude/skills/shell-agent-file-ops in your project. Claude Code loads it when a task matches its description.

How do I install Shell Agent File Ops in Codex?

Run `npx skills add HKUDS/OpenSpace --skill shell-agent-file-ops -a codex`. Or copy the skill folder (benchmarks/gdpval/skills/shell-agent-file-ops in HKUDS/OpenSpace) into .agents/skills/shell-agent-file-ops in your project. Codex loads it when a task matches its description.

Can I use Shell Agent File Ops in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HKUDS/OpenSpace --skill shell-agent-file-ops -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/shell-agent-file-ops, .gemini/skills/shell-agent-file-ops, .github/skills/shell-agent-file-ops and .opencode/skills/shell-agent-file-ops in your project.

What does Shell Agent File Ops need to run?

SKILL.md names no scripts, command-line tools or credentials: Shell Agent File Ops is instructions for the agent only. Our summary lists: Python 3.

Does Shell Agent File Ops access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Shell Agent File Ops safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Shell Agent File Ops use?

Shell Agent File Ops is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Shell Agent File Ops use?

About 841 tokens (SKILL.md is roughly 3.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Shell Agent File Ops?

Skills that share tags, products or a category with Shell Agent File Ops: CLI Developer (Jeffallan/claude-skills, 12k stars), Alloc Profile (ClickHouse/ClickHouse, 50k stars), Create Ex (perkfly/ex-skill, 2.5k stars) and Hugging Face API Tool Builder (huggingface/skills, 11k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Shell Agent File Ops?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,749 GitHub stars. The repository holds 199 skills in this directory. The repository was last updated on August 12, 2026.

Source: HKUDS/OpenSpace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.