Agent skill

Verified Script Execution

by HKUDS in HKUDS/OpenSpace

Fallback workflow for reliable file creation and verification when automated code execution fails

MITAuto-check passedDocuments & Office

Install Verified Script Execution

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

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

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

At a glance

Fallback workflow for reliable file creation and verification when automated code execution fails

  • Works in 4 steps: Verify Working Directory → Create Scripts via Heredoc → Make Executable and Run with Explicit Path → …
  • Documents & Office work in your project
  • SKILL.md covers When to Activate This Pattern, Step 1: Verify Working Directory, Step 2: Create Scripts via… and Step 3: Make Executable and…, plus 5 more sections
  • Calls bash

What it does

Verified Script Execution is an agent skill from HKUDS/OpenSpace. Fallback workflow for reliable file creation and verification when automated code execution fails

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

It sits in Documents & Office. 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

  • Documents & Office work in your project

Example prompts

  • “/verified-script-execution”

Workflow steps

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

  1. Verify Working Directory
  2. Create Scripts via Heredoc
  3. Make Executable and Run with Explicit Path
  4. Verify Output

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:

    • bash

    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

Verified Script Execution loads about 1.1k tokens when it runs. Until then it costs about 31 tokens; SKILL.md has 374 words of instructions outside code blocks.

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

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). 374 words, ~1,134 tokens.

Download SKILL.mdSave it as .claude/skills/verified-script-execution/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
verified-script-execution
description
Fallback workflow for reliable file creation and verification when automated code execution fails

Verified Script Execution Workflow

When execute_code_sandbox or shell_agent fails repeatedly, use this manual fallback pattern to reliably create and verify files through explicit shell commands.

When to Activate This Pattern

  • After 3+ consecutive failures with execute_code_sandbox
  • When shell_agent produces repeated errors without progress
  • For critical deliverables (PDFs, Word docs, reports) that must be created reliably
  • When working directory confusion causes file creation failures

Step 1: Verify Working Directory

Always confirm your current location before creating any files:

bash
pwd
ls -la

This ensures you're writing to the correct workspace directory and reveals any existing files that might conflict.

Step 2: Create Scripts via Heredoc

Use shell heredoc syntax to create scripts with proper escaping. Choose the heredoc delimiter style based on your needs:

For literal content (no variable expansion):

bash
cat > script_name.sh << 'EOF'
#!/bin/bash
# Your script content here
# Variables like $VAR will NOT be expanded
echo "Literal text with $symbols"
EOF

For content requiring variable expansion:

bash
cat > script_name.sh << EOF
#!/bin/bash
OUTPUT_DIR="$PWD/output"
# Variables WILL be expanded
echo "Working in $OUTPUT_DIR"
EOF

Key escaping rules:

  • Use << 'EOF' (quoted delimiter) to prevent variable expansion and command substitution
  • Use << EOF (unquoted delimiter) when you need shell variables expanded
  • Escape single quotes inside quoted heredoc as '\''
  • For nested heredocs, use different delimiters (e.g., EOF and INNER)

Step 3: Make Executable and Run with Explicit Path

bash
chmod +x script_name.sh
./script_name.sh

Or use the explicit full path for certainty:

bash
bash /full/path/to/script_name.sh

Step 4: Verify Output

Always verify file creation and inspect content:

bash
# Check file exists and see size
ls -lh expected_output.pdf
ls -lh expected_output.docx

# For PDFs, verify structure and page count
pdfinfo expected_output.pdf

# For Word docs, inspect internal structure
unzip -l expected_output.docx | head -20

Complete Example: PDF and Word Document Generation

bash
# Step 1: Verify directory
pwd
ls -la

# Step 2: Create document generation script
cat > generate_deliverables.sh << 'EOF'
#!/bin/bash
set -e

# Create PDF checklist
cat > checklist_content.txt << 'CONTENT'
Safety Checklist
================
Page 1: Overview
Page 2: Requirements  
Page 3: Verification Steps
Page 4: Sign-off
CONTENT

# Create Word action tracker
cat > tracker_content.txt << 'CONTENT'
Action Tracker
==============
Item,Owner,Due,Status
Task 1,Team A,2024-01-15,Pending
Task 2,Team B,2024-01-20,In Progress
CONTENT

# Convert to target formats (adapt to available tools)
echo "Files created in: $(pwd)"
ls -lh *.txt
EOF

# Step 3: Execute with explicit path
chmod +x generate_deliverables.sh
./generate_deliverables.sh

# Step 4: Verify all outputs
ls -lh checklist_content.txt tracker_content.txt
# For PDFs: pdfinfo output.pdf
# For DOCX: unzip -l output.docx | head -20
Show full SKILL.md (168 more words)Show less

Efficiency Tips

  1. Combine related operations in a single script to reduce iteration count
  2. Verify incrementally - check each file before proceeding to the next step
  3. Use explicit paths throughout to avoid directory confusion
  4. Test heredoc syntax in isolation before building complex nested scripts
  5. Document expected outputs (filenames, sizes, page counts) before running
  6. Use set -e in scripts to fail fast on errors

Common Pitfalls to Avoid

  • Unquoted heredoc delimiters when you need literal $ symbols
  • Missing chmod +x before script execution
  • Not verifying output before assuming success
  • Nested heredocs with same delimiter causing premature termination
  • Assuming current directory without explicit pwd verification

Migration Back to Automated Tools

Once files are created successfully with this pattern:

  1. Study what worked in the manual script
  2. Translate the working approach back to execute_code_sandbox format
  3. Test incrementally with smaller code blocks
  4. Revert to automated tools for subsequent iterations

This pattern prioritizes reliability over iteration efficiency, ensuring deliverables are created correctly even when automated tools struggle.

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

  • SKILL.md
  • .skill_id

Open the folder on GitHubat commit 3827781

Compare with similar skills

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

Verified Script Execution compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Verified Script Execution this skillHKUDS/OpenSpace7.7k—~1.1kAutomated safety check: PassMIT
Markdown Article FormatterJimLiu/baoyu-skills26k6 repos~3.5kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Obsidian MarkdownAtmosphere/atmosphere3.8k20 repos~1.3kAutomated safety check: PassApache-2.0
DOCXrvdbreemen/OTGW-firmware20733 repos~4.3kAutomated safety check: PassProprietary
Gzh Designisjiamu/gzh-design-skill3.9k1 repos~2.2kAutomated safety check: PassAGPL-3.0

Similar skills

  • Markdown Article Formatter

    JimLiu/baoyu-skills

    Reformats plain text or Markdown articles with frontmatter, a title, a summary, headings, bold, lists and code blocks, and saves a separate formatted copy.

    26k GitHub starsUsed in 6 repos~3.5k tokens
    Documents & OfficeAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Obsidian Markdown

    Atmosphere/atmosphere

    Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax.

    3.8k GitHub starsUsed in 20 repos~1.3k tokens
    Documents & OfficeAuto-check passed
  • DOCX

    rvdbreemen/OTGW-firmware

    A skill your agent uses whenever the user wants to create, read, edit, or manipulate Word documents (.docx files).

    207 GitHub starsUsed in 33 repos~4.3k tokens
    Documents & OfficeAuto-check passed
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated 3 days ago
    Documents & OfficeAuto-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 Verified Script Execution

What does Verified Script Execution do?

Fallback workflow for reliable file creation and verification when automated code execution fails. Verified Script Execution is an agent skill from HKUDS/OpenSpace.

When should I use Verified Script Execution?

Verified Script Execution fits situations like: documents & Office work in your project.

How do I install Verified Script Execution in Claude Code?

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

How do I install Verified Script Execution in Codex?

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

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

What does Verified Script Execution need to run?

Going by SKILL.md and its folder, Verified Script Execution needs the command-line tools its instructions call (bash).

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

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

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

Skills that share tags, products or a category with Verified Script Execution: Markdown Article Formatter (JimLiu/baoyu-skills, 26k stars), Markitdown (ImCa0/just-laws, 781 stars), Obsidian Markdown (Atmosphere/atmosphere, 3.8k stars) and DOCX (rvdbreemen/OTGW-firmware, 207 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

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