Agent skill

Fallback File Ops

by HKUDS in HKUDS/OpenSpace

Use runshell as fallback when executecodesandbox or shellagent fail on filesystem operations

MITAuto-check passed

Install Fallback File Ops

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

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

GitHub CLI
$ gh skill install HKUDS/OpenSpace fallback-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/fallback-file-ops .claude/skills/fallback-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
fallback-file-ops
GitHub stars
7.7k
Token cost
~718 tokens
SKILL.md length
252 words
Files
2
Skills in repo
199
Repo updated
First seen
Licence
MIT

At a glance

Use runshell as fallback when executecodesandbox or shellagent fail on filesystem operations

  • Works in 4 steps: Detect Tool Failure → Switch to run_shell → Verify Creation → …
  • SKILL.md covers Purpose, When to Apply, Procedure and Example: Creating Project…, plus 2 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Fallback File Ops is an agent skill from HKUDS/OpenSpace. Use runshell as fallback when executecodesandbox or shellagent fail on filesystem operations

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

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

Example prompts

  • “/fallback-file-ops”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Detect Tool Failure
  2. Switch to run_shell
  3. Verify Creation
  4. Continue with Hybrid Approach

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 (its code samples are bash and yaml).

    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

Fallback File Ops loads about 718 tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 252 words of instructions outside code blocks.

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

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). 252 words, ~718 tokens.

Download SKILL.mdSave it as .claude/skills/fallback-file-ops/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fallback-file-ops
description
Use run_shell as fallback when execute_code_sandbox or shell_agent fail on filesystem operations

Fallback File Operations

Purpose

When execute_code_sandbox or shell_agent fail with 'unknown error' on filesystem operations, fall back to run_shell with explicit mkdir and file write commands. This hybrid approach is more reliable for creating complex project structures.

When to Apply

  • execute_code_sandbox returns 'unknown error' on file/directory creation
  • shell_agent fails to write files or create nested directories
  • You need to create complex project structures with multiple levels

Procedure

Step 1: Detect Tool Failure

Monitor for these failure patterns:

  • Error message contains "unknown error"
  • File operations silently fail (file not created)
  • Directory creation returns success but directory doesn't exist
Step 2: Switch to run_shell

When failures occur, immediately switch to run_shell for filesystem operations:

bash
# Create directory structure explicitly
run_shell: mkdir -p /path/to/nested/directory

# Write files using shell redirection or echo
run_shell: echo "content" > /path/to/file.txt

# Or use cat with heredoc for multi-line files
run_shell: cat > /path/to/file.txt << 'EOF'
line 1
line 2
EOF
Step 3: Verify Creation

After each operation, verify the file/directory was created:

bash
run_shell: ls -la /path/to/created/item
run_shell: test -f /path/to/file && echo "File exists"
run_shell: test -d /path/to/dir && echo "Directory exists"
Step 4: Continue with Hybrid Approach
  • Use run_shell for all filesystem operations (mkdir, write, copy, move)
  • Continue using execute_code_sandbox or shell_agent for code execution, compilation, or other non-filesystem tasks
  • Document which tool handles which operation for clarity

Example: Creating Project Structure

yaml
# Failed attempt with execute_code_sandbox
execute_code_sandbox: create directory src/components

# Fallback with run_shell
run_shell: mkdir -p src/components
run_shell: mkdir -p src/utils
run_shell: mkdir -p tests/unit
run_shell: echo "// Component file" > src/components/Button.tsx
run_shell: echo "// Utility file" > src/utils/helpers.ts

Best Practices

  1. Be explicit: Always use full paths or confirm working directory
  2. Create parent directories: Use mkdir -p for nested structures
  3. Verify before proceeding: Check files exist before dependent operations
  4. Log tool switches: Note when you fall back to run_shell for debugging
  5. Batch operations: Group related file operations in consecutive run_shell calls

Common Pitfalls

  • Don't assume filesystem state after tool failure
  • Don't mix tools for the same file operation (pick one and stick with it)
  • Don't skip verification steps when using fallback

© 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/fallback-file-ops of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Fallback 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.

Fallback File Ops compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fallback File Ops this skillHKUDS/OpenSpace7.7k—~718Automated safety check: PassMIT
Executealirezarezvani/claude-skills28k—~831Automated safety check: PassMIT
Debugging Executionsn8n-io/n8n207k—~2.6kAutomated safety check: PassCustom licence
Terminal Opsaffaan-m/ECC275k2 repos~750Automated safety check: PassMIT
Agent Sandboxruvnet/ruflo74k3 repos~777Automated safety check: PassMIT
Project Flow Opsaffaan-m/ECC275k3 repos~787Automated safety check: PassMIT

Similar skills

  • Execute

    alirezarezvani/claude-skills

    /cs:execute <decision — Generate a 90-day execution plan with weekly milestones, DRIs, and check-in cadence from an approved decision.

    28k GitHub stars~831 tokensUpdated 1 mo ago
    Product & Project ManagementAuto-check passed
  • Official

    Debug failed or wrong-output workflow executions using executions tools.

    207k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Terminal Ops

    affaan-m/ECC

    Evidence-first repo execution workflow for ECC. An agent skill from affaan-m/ECC.

    275k GitHub starsUsed in 2 repos~750 tokens
    Testing & QAAuto-check passed
  • Agent Sandbox

    ruvnet/ruflo

    Agent skill for sandbox - invoke with $agent-sandbox. An agent skill from ruvnet/ruflo.

    74k GitHub starsUsed in 3 repos~777 tokens
    Auto-check passed
  • Project Flow Ops

    affaan-m/ECC

    Operate execution flow across GitHub and Linear by triaging issues and pull requests, linking active work, and keeping GitHub public-facing while Linear remains the internal execution layer.

    275k GitHub starsUsed in 3 repos~787 tokens
    DevelopmentAuto-check passed
  • Sandbox Bench

    vercel/next.js

    Official

    Benchmark React or Next.js changes on Vercel Sandbox VMs with paired A/B statistics: react PR/commit vs base, or Next.js PR/commit vs base, measured end-to-end through the bench/render-pipeline app…

    143k GitHub stars~4.1k tokensUpdated today
    Data & AnalyticsAuto-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

Questions about Fallback File Ops

What does Fallback File Ops do?

Use runshell as fallback when executecodesandbox or shellagent fail on filesystem operations. Fallback File Ops is an agent skill from HKUDS/OpenSpace.

How do I install Fallback File Ops in Claude Code?

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

How do I install Fallback File Ops in Codex?

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

Can I use Fallback 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 fallback-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/fallback-file-ops, .gemini/skills/fallback-file-ops, .github/skills/fallback-file-ops and .opencode/skills/fallback-file-ops in your project.

What does Fallback File Ops need to run?

SKILL.md names no scripts, command-line tools or credentials: Fallback File Ops is instructions for the agent only.

Does Fallback 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 Fallback 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 Fallback File Ops use?

Fallback 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 Fallback File Ops use?

About 718 tokens (SKILL.md is roughly 2.9k 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 Fallback File Ops?

Skills that share tags, products or a category with Fallback File Ops: Execute (alirezarezvani/claude-skills, 28k stars), Debugging Executions (n8n-io/n8n, 207k stars), Terminal Ops (affaan-m/ECC, 275k stars) and Agent Sandbox (ruvnet/ruflo, 74k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fallback 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.