[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBYWQBG1B8K10M8R79ZG4X":3,"skill-same:01M6XBYWQBG1B8K10M8R79ZG4X":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":45,"install":46,"resources":59},"01M6XBYWQBG1B8K10M8R79ZG4X","run-shell-python-file-io",null,"Use run_shell with inline Python for reliable file I\u002FO when execute_code_sandbox cannot access working directory files","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Frun-shell-python-file-io\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34],"python","run","run shell python file io","file","shell","io","when","directory","inline","for","with","files","use","execute","access","code","sandbox","2026-11-10 10:12:30",false,"---\nname: run-shell-python-file-io\ndescription: Use run_shell with inline Python for reliable file I\u002FO when execute_code_sandbox cannot access working directory files\n---\n\n# Run Shell Python File I\u002FO\n\n## When to Use This Skill\n\nUse this technique when `execute_code_sandbox` cannot access files in your working directory, but you need to perform file operations (read, write, transform) as part of your task execution.\n\n## The Pattern\n\nInstead of using `execute_code_sandbox`, run Python code directly through `run_shell` with explicit path handling. This provides reliable file I\u002FO capabilities within the task workspace.\n\n## How to Apply\n\n### Step 1: Identify File Access Needs\nDetermine which files you need to read from or write to in the working directory.\n\n### Step 2: Write Inline Python via run_shell\nConstruct a Python script that handles your file operations and execute it through `run_shell`:\n\n```bash\npython3 -c \"\nimport os\n\n# Get the working directory\nwork_dir = os.getcwd()\nprint(f'Working directory: {work_dir}')\n\n# Read a file\nwith open('input.txt', 'r') as f:\n    content = f.read()\n\n# Process the content\nprocessed = content.upper()\n\n# Write to output file\nwith open('output.txt', 'w') as f:\n    f.write(processed)\n\nprint('File operation complete')\n\"\n```\n\n### Step 3: Handle Complex Logic\nFor more complex operations, write a temporary Python script file first:\n\n```bash\ncat > \u002Ftmp\u002Fprocess.py \u003C\u003C 'EOF'\nimport os\nimport json\n\nwork_dir = os.getcwd()\n\n# Read input\nwith open('data.json', 'r') as f:\n    data = json.load(f)\n\n# Transform\nresult = {k: v * 2 for k, v in data.items()}\n\n# Write output\nwith open('result.json', 'w') as f:\n    json.dump(result, f, indent=2)\n\nprint(f'Processed {len(data)} items')\nEOF\n\npython3 \u002Ftmp\u002Fprocess.py\n```\n\n### Step 4: Verify File Operations\nAfter execution, verify the files were created\u002Fmodified correctly:\n\n```bash\nls -la\ncat output.txt\n```\n\n## Best Practices\n\n1. **Use Absolute or Relative Paths Explicitly**: Always specify file paths clearly; `os.getcwd()` helps confirm your working directory.\n\n2. **Handle Errors Gracefully**: Add try\u002Fexcept blocks to catch file I\u002FO errors:\n   ```python\n   try:\n       with open('file.txt', 'r') as f:\n           content = f.read()\n   except FileNotFoundError:\n       print('File not found')\n   ```\n\n3. **Use Here-Docs for Complex Scripts**: For scripts longer than a few lines, use bash here-documents to avoid escaping issues.\n\n4. **Clean Up Temporary Files**: If you create temporary scripts, consider removing them after execution.\n\n5. **Check Working Directory First**: Print `os.getcwd()` to confirm you're operating in the expected directory.\n\n## Common Use Cases\n\n- Reading configuration files from the workspace\n- Writing generated reports or outputs\n- Transforming data files (CSV, JSON, XML)\n- Batch processing multiple files\n- Generating structured documents (PDFs, spreadsheets)\n\n## Example: Processing Multiple Files\n\n```bash\npython3 -c \"\nimport os\nimport glob\n\nwork_dir = os.getcwd()\nfiles = glob.glob('*.txt')\n\nfor f in files:\n    with open(f, 'r') as file:\n        content = file.read()\n    # Process each file\n    with open(f'processed_{f}', 'w') as out:\n        out.write(content.strip().upper())\n\nprint(f'Processed {len(files)} files')\n\"\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| File not found | Check `os.getcwd()` output; use absolute paths if needed |\n| Permission denied | Ensure the directory is writable; avoid protected system paths |\n| Encoding errors | Specify encoding explicitly: `open('file.txt', 'r', encoding='utf-8')` |\n| Multi-line script issues | Use here-doc (`\u003C\u003C 'EOF'`) instead of `-c` for complex scripts |","# Run Shell Python File I\u002FO\n\n## When to Use This Skill\n\nUse this technique when `execute_code_sandbox` cannot access files in your working directory, but you need to perform file operations (read, write, transform) as part of your task execution.\n\n## The Pattern\n\nInstead of using `execute_code_sandbox`, run Python code directly through `run_shell` with explicit path handling. This provides reliable file I\u002FO capabilities within the task workspace.\n\n## How to Apply\n\n### Step 1: Identify File Access Needs\nDetermine which files you need to read from or write to in the working directory.\n\n### Step 2: Write Inline Python via run_shell\nConstruct a Python script that handles your file operations and execute it through `run_shell`:\n\n```bash\npython3 -c \"\nimport os\n\n# Get the working directory\nwork_dir = os.getcwd()\nprint(f'Working directory: {work_dir}')\n\n# Read a file\nwith open('input.txt', 'r') as f:\n    content = f.read()\n\n# Process the content\nprocessed = content.upper()\n\n# Write to output file\nwith open('output.txt', 'w') as f:\n    f.write(processed)\n\nprint('File operation complete')\n\"\n```\n\n### Step 3: Handle Complex Logic\nFor more complex operations, write a temporary Python script file first:\n\n```bash\ncat > \u002Ftmp\u002Fprocess.py \u003C\u003C 'EOF'\nimport os\nimport json\n\nwork_dir = os.getcwd()\n\n# Read input\nwith open('data.json', 'r') as f:\n    data = json.load(f)\n\n# Transform\nresult = {k: v * 2 for k, v in data.items()}\n\n# Write output\nwith open('result.json', 'w') as f:\n    json.dump(result, f, indent=2)\n\nprint(f'Processed {len(data)} items')\nEOF\n\npython3 \u002Ftmp\u002Fprocess.py\n```\n\n### Step 4: Verify File Operations\nAfter execution, verify the files were created\u002Fmodified correctly:\n\n```bash\nls -la\ncat output.txt\n```\n\n## Best Practices\n\n1. **Use Absolute or Relative Paths Explicitly**: Always specify file paths clearly; `os.getcwd()` helps confirm your working directory.\n\n2. **Handle Errors Gracefully**: Add try\u002Fexcept blocks to catch file I\u002FO errors:\n   ```python\n   try:\n       with open('file.txt', 'r') as f:\n           content = f.read()\n   except FileNotFoundError:\n       print('File not found')\n   ```\n\n3. **Use Here-Docs for Complex Scripts**: For scripts longer than a few lines, use bash here-documents to avoid escaping issues.\n\n4. **Clean Up Temporary Files**: If you create temporary scripts, consider removing them after execution.\n\n5. **Check Working Directory First**: Print `os.getcwd()` to confirm you're operating in the expected directory.\n\n## Common Use Cases\n\n- Reading configuration files from the workspace\n- Writing generated reports or outputs\n- Transforming data files (CSV, JSON, XML)\n- Batch processing multiple files\n- Generating structured documents (PDFs, spreadsheets)\n\n## Example: Processing Multiple Files\n\n```bash\npython3 -c \"\nimport os\nimport glob\n\nwork_dir = os.getcwd()\nfiles = glob.glob('*.txt')\n\nfor f in files:\n    with open(f, 'r') as file:\n        content = file.read()\n    # Process each file\n    with open(f'processed_{f}', 'w') as out:\n        out.write(content.strip().upper())\n\nprint(f'Processed {len(files)} files')\n\"\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| File not found | Check `os.getcwd()` output; use absolute paths if needed |\n| Permission denied | Ensure the directory is writable; avoid protected system paths |\n| Encoding errors | Specify encoding explicitly: `open('file.txt', 'r', encoding='utf-8')` |\n| Multi-line script issues | Use here-doc (`\u003C\u003C 'EOF'`) instead of `-c` for complex scripts |",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Frun-shell-python-file-io","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill run-shell-python-file-io",{"tool":52,"command":53},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill run-shell-python-file-io",{"tool":55,"command":56},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill run-shell-python-file-io","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Frun-shell-python-file-io\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},".skill_id","OTHER","其他",38,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Frun-shell-python-file-io\u002F.skill_id",[67,88,104,112,137,153],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":35},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[74,75,76,77,78,79,80,81,27,82,83,84,85,29,86,87,21,18],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","errors","script","output","type","only","template",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":35},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[95,96,75,21,97,18,98,99,100,101,102,87,103,28,79,27,83],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":35},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[111,75,79,22,83,99,87,21,18,27],"write special chars heredoc",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":35},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[119,120,121,122,123,77,124,125,126,127,128,27,129,130,131,132,133,134,135,136],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":35},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[144,145,146,147,27,148,28,149,150,151,152],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":35},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[25,160,161,162,32,163,21,164,165,166],"verify directory structure","structure","verify","first","issues","diagnose","file access"]