Agent skill

Fallback Script Execution

by HKUDS in HKUDS/OpenSpace

Two-step script execution workflow for debugging when shellagent and executecodesandbox consistently fail

MITAuto-check passedDevelopment

Install Fallback Script Execution

skills CLI
$ npx skills add HKUDS/OpenSpace --skill fallback-script-execution -a claude-code

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

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

At a glance

Two-step script execution workflow for debugging when shellagent and executecodesandbox consistently fail

  • Works in 2 steps: Write the Script File → Execute the Script
  • Tasks that involve Debugging
  • SKILL.md covers When to Use This Skill, Core Pattern, Step-by-Step Instructions and Example: Data Processing Task, plus 2 more sections
  • Calls python

What it does

Fallback Script Execution is an agent skill from HKUDS/OpenSpace. Two-step script execution workflow for debugging when shellagent and executecodesandbox consistently fail

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

It sits in Development, covering Debugging. It works with Python. The repository describes itself as: "OpenSpace: The Skill Management Layer for AI Agents" -- https://open-space.cloud/. The licence is MIT.

When your agent uses it

  • Tasks that involve Debugging

Example prompts

  • “/fallback-script-execution”

Requirements

  • Python 3

Workflow steps

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

  1. Write the Script File
  2. Execute the Script

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

    Shell commands in SKILL.md call:

    • python

    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 Script Execution loads about 898 tokens when it runs. Until then it costs about 34 tokens; SKILL.md has 298 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
~898

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). 298 words, ~898 tokens.

Download SKILL.mdSave it as .claude/skills/fallback-script-execution/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
fallback-script-execution
description
Two-step script execution workflow for debugging when shell_agent and execute_code_sandbox consistently fail

Fallback Script Execution with write_file + run_shell

When to Use This Skill

Use this pattern when:

  • shell_agent fails repeatedly with unclear error messages
  • execute_code_sandbox consistently errors or times out
  • You need better visibility into what's happening during execution
  • Debugging inline code or delegated agents proves difficult

Core Pattern

Instead of delegating execution to an agent or running inline code, use this two-step approach:

  1. Write script to file using write_file
  2. Execute script using run_shell with python script.py

This provides:

  • Clearer error messages (full stack traces visible in run_shell output)
  • Easier debugging (script persists for inspection)
  • Better control over execution environment
  • Ability to modify and re-run without rewriting code

Step-by-Step Instructions

Step 1: Write the Script File

Use write_file to create a self-contained Python script:

write_file with:
  path: "path/to/script_name.py"
  content: |
    #!/usr/bin/env python3
    # Your complete script here
    # Include imports, logic, and error handling

Best Practices:

  • Include descriptive comments
  • Add try/except blocks for error handling
  • Print intermediate results for debugging
  • Use absolute or clear relative paths
Step 2: Execute the Script

Use run_shell to execute the script:

run_shell with:
  command: "python path/to/script_name.py"

Best Practices:

  • Capture and examine full output
  • If errors occur, the script file is still available for inspection
  • You can re-run with modifications without starting over

Example: Data Processing Task

❌ Problematic Approach (shell_agent fails repeatedly)
shell_agent with:
  task: "Load Excel file, calculate correlations, save results"

Result: Agent struggles with path handling, unclear errors

# Step 1: Write script
write_file with:
  path: "correlation_analysis.py"
  content: |
    import pandas as pd
    import sys
    
    try:
        # Load data
        df = pd.read_excel('data.xlsx', sheet_name='Returns')
        print(f"Loaded {len(df)} rows")
        
        # Calculate correlation
        corr = df.corr()
        print(f"Correlation matrix shape: {corr.shape}")
        
        # Save results
        with pd.ExcelWriter('output.xlsx') as writer:
            df.to_excel(writer, sheet_name='Returns')
            corr.to_excel(writer, sheet_name='Correlation')
        
        print("SUCCESS: output.xlsx created")
    except Exception as e:
        print(f"ERROR: {type(e).__name__}: {e}", file=sys.stderr)
        sys.exit(1)

# Step 2: Execute script
run_shell with:
  command: "python correlation_analysis.py"

Debugging Tips

  1. Add print statements at key points to trace execution
  2. Check file paths - use run_shell with ls -la path/ to verify files exist
  3. Inspect errors - run_shell output shows full Python stack traces
  4. Modify and re-run - edit the script file and execute again without rewriting

When to Escalate

If this pattern also fails:

  • Verify Python is available: run_shell with which python or python --version
  • Check file permissions: run_shell with ls -la script.py
  • Try explicit Python path: run_shell with /usr/bin/python script.py
  • Consider task complexity - may need to break into smaller scripts

© 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-script-execution of HKUDS/OpenSpace.

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

Fallback Script Execution 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 Script Execution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Fallback Script Execution this skillHKUDS/OpenSpace7.7k—~898Automated safety check: PassMIT
LangBot Plugin Developmentlangbot-app/LangBot18k—~3.9kAutomated safety check: PassApache-2.0
Python Performance Optimizationwshobson/agents40k12 repos~814Automated safety check: PassMIT
Git History Bug Auditben-manes/caffeine18k—~3.3kAutomated safety check: PassApache-2.0
Keybase RPC Log Analysiskeybase/client9.3k—~3kAutomated safety check: PassBSD-3-Clause
The Art of Debuggingstas00/the-art-of-debugging1.7k—~6.1kAutomated safety check: NotesCC-BY-SA-4.0

Similar skills

  • LangBot Plugin Development

    langbot-app/LangBot

    Guides building, debugging and testing LangBot plugins: components, SDK calls, README and locale rules, SDK pitfalls and WebSocket-based testing.

    18k GitHub stars~3.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Profiles slow Python code with cProfile and memory profilers, then applies targeted fixes for CPU, memory, I/O and query bottlenecks.

    40k GitHub starsUsed in 12 repos~814 tokens
    DevelopmentAuto-check passed
  • Git History Bug Audit

    ben-manes/caffeine

    Audits a module by walking its git history commit by commit, tracking unresolved issues forward, and reporting the ones that survive to HEAD as findings.

    18k GitHub stars~3.3k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Captures a clean Keybase service log and analyzes it for redundant, duplicated or looping RPCs, then checks whether a caching fix reduced the calls.

    9.3k GitHub stars~3k tokensUpdated today
    DevelopmentAuto-check passed
  • The Art of Debugging

    stas00/the-art-of-debugging

    Condensed debugging method and tool recipes for Unix, Python and PyTorch programs: crashes, hangs, segfaults, wrong output, CUDA OOM, NaN values and slowness.

    1.7k GitHub stars~6.1k tokensUpdated today
    DevelopmentAuto-check: notes
  • Adk Setup

    google/adk-python

    Official

    Sets up a local ADK Python development environment in a git clone of the open-source adk-python repository: a uv virtual environment, all dependency extras, pre-commit hooks, and a first unit-test…

    22k GitHub stars~993 tokensUpdated today
    DevelopmentAuto-check: notes

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

Categories

Questions about Fallback Script Execution

What does Fallback Script Execution do?

Two-step script execution workflow for debugging when shellagent and executecodesandbox consistently fail. Fallback Script Execution is an agent skill from HKUDS/OpenSpace.

When should I use Fallback Script Execution?

Fallback Script Execution fits situations like: tasks that involve Debugging.

How do I install Fallback Script Execution in Claude Code?

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

How do I install Fallback Script Execution in Codex?

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

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

What does Fallback Script Execution need to run?

Going by SKILL.md and its folder, Fallback Script Execution needs the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Fallback Script Execution 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 Script Execution 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 Script Execution use?

Fallback Script Execution 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 Script Execution use?

About 898 tokens (SKILL.md is roughly 3.6k 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 Script Execution?

Skills that share tags, products or a category with Fallback Script Execution: LangBot Plugin Development (langbot-app/LangBot, 18k stars), Python Performance Optimization (wshobson/agents, 40k stars), Git History Bug Audit (ben-manes/caffeine, 18k stars) and Keybase RPC Log Analysis (keybase/client, 9.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Fallback Script Execution?

HKUDS (a GitHub organization) maintains it in HKUDS/OpenSpace, which has 7,743 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.