[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KHXPCW5BJ87GD9BT415FCQ":3,"skill-same:01M6KHXPCW5BJ87GD9BT415FCQ":65},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":13,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":43,"updatedAt":44,"install":45,"resources":58},"01M6KHXPCW5BJ87GD9BT415FCQ","debug-sandbox-execution",null,"Debug Python code execution failures by capturing partial traces, isolating failing functions, and incrementally verifying outputs","AG064\u002FOpenSpace","AG064","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184930299?v=4","01M6KHVFG7TB73NHX3RDYSTMH2","01M6KHVFMM7XA2PZA9Z83PHS3V",0,"MIT","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdebug-sandbox-execution\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[23,24,25,26,27,28,29,30,31,32],"sandbox","debug","execution","debug sandbox execution","python","code","functions","code execution","python code","traces","2026-11-10 10:12:30",false,"---\nname: debug-sandbox-execution\ndescription: Debug Python code execution failures by capturing partial traces, isolating failing functions, and incrementally verifying outputs\n---\n\n# Debug Sandbox Execution Failures\n\nWhen `execute_code_sandbox` fails with unknown errors or incomplete output, use this debugging pattern to identify the root cause and recover incrementally.\n\n## Problem\n\nThe `execute_code_sandbox` tool may fail silently, truncate output, or produce opaque errors. Complex scripts with multiple file outputs are especially prone to partial failures.\n\n## Solution\n\nUse a three-phase debugging approach:\n\n### Phase 1: Capture Partial Execution Traces\n\nWhen a sandbox execution fails, rerun the code using `run_shell` with output piping to capture whatever output is produced before the failure:\n\n```bash\npython your_script.py 2>&1 | head -100\n```\n\nThis reveals:\n- Which functions\u002Fsteps executed successfully\n- Where the failure occurred\n- Any error messages that were suppressed\n\n### Phase 2: Isolate Failing Functions\n\nBreak the script into smaller, testable units. Execute each function or code block independently:\n\n```python\n# Test individual components\nif __name__ == \"__main__\":\n    # Step 1: Test imports\n    import numpy as np\n    print(\"Imports OK\")\n    \n    # Step 2: Test function A in isolation\n    result_a = function_a()\n    print(f\"Function A: {result_a}\")\n    \n    # Step 3: Test function B\n    result_b = function_b(result_a)\n    print(f\"Function B: {result_b}\")\n```\n\nRun each section with `execute_code_sandbox` separately to identify which component fails.\n\n### Phase 3: Incremental Output Generation\n\nGenerate output files one at a time, verifying each before proceeding:\n\n```python\nimport numpy as np\nimport soundfile as sf\n\n# Generate and save file 1\naudio1 = np.random.randn(48000 * 10).astype(np.float32)\nsf.write('output_01.wav', audio1, 48000, subtype='FLOAT')\n\n# Verify file 1 exists and has expected properties\nimport os\nassert os.path.exists('output_01.wav'), \"File 1 not created\"\n\n# Generate and save file 2\naudio2 = np.random.randn(48000 * 10).astype(np.float32)\nsf.write('output_02.wav', audio2, 48000, subtype='FLOAT')\n\n# Verify file 2\nassert os.path.exists('output_02.wav'), \"File 2 not created\"\n```\n\n## Example Workflow\n\n1. **Initial attempt**: Run full script with `execute_code_sandbox`\n2. **On failure**: Rerun with `run_shell` and `| head -100` to see partial output\n3. **Identify breakpoint**: Find the last successful operation\n4. **Split script**: Create separate scripts for each major section\n5. **Test incrementally**: Run each section, verify outputs, proceed to next\n6. **Combine successful sections**: Once all pieces work, combine into final script\n\n## Best Practices\n\n- **Always verify file creation** immediately after writing: `assert os.path.exists(path)`\n- **Check file properties** (size, duration, format) before assuming success\n- **Use print statements liberally** to mark progress through the script\n- **Save intermediate outputs** so failures don't require restarting from scratch\n- **Test audio\u002Fvideo generation** with short samples first (1-2 seconds) before full-length content\n\n## When to Use\n\n- Complex scripts with multiple file outputs\n- Audio\u002Fvideo generation pipelines\n- Scripts with external library dependencies\n- Any `execute_code_sandbox` call that produces incomplete or no output","# Debug Sandbox Execution Failures\n\nWhen `execute_code_sandbox` fails with unknown errors or incomplete output, use this debugging pattern to identify the root cause and recover incrementally.\n\n## Problem\n\nThe `execute_code_sandbox` tool may fail silently, truncate output, or produce opaque errors. Complex scripts with multiple file outputs are especially prone to partial failures.\n\n## Solution\n\nUse a three-phase debugging approach:\n\n### Phase 1: Capture Partial Execution Traces\n\nWhen a sandbox execution fails, rerun the code using `run_shell` with output piping to capture whatever output is produced before the failure:\n\n```bash\npython your_script.py 2>&1 | head -100\n```\n\nThis reveals:\n- Which functions\u002Fsteps executed successfully\n- Where the failure occurred\n- Any error messages that were suppressed\n\n### Phase 2: Isolate Failing Functions\n\nBreak the script into smaller, testable units. Execute each function or code block independently:\n\n```python\n# Test individual components\nif __name__ == \"__main__\":\n    # Step 1: Test imports\n    import numpy as np\n    print(\"Imports OK\")\n    \n    # Step 2: Test function A in isolation\n    result_a = function_a()\n    print(f\"Function A: {result_a}\")\n    \n    # Step 3: Test function B\n    result_b = function_b(result_a)\n    print(f\"Function B: {result_b}\")\n```\n\nRun each section with `execute_code_sandbox` separately to identify which component fails.\n\n### Phase 3: Incremental Output Generation\n\nGenerate output files one at a time, verifying each before proceeding:\n\n```python\nimport numpy as np\nimport soundfile as sf\n\n# Generate and save file 1\naudio1 = np.random.randn(48000 * 10).astype(np.float32)\nsf.write('output_01.wav', audio1, 48000, subtype='FLOAT')\n\n# Verify file 1 exists and has expected properties\nimport os\nassert os.path.exists('output_01.wav'), \"File 1 not created\"\n\n# Generate and save file 2\naudio2 = np.random.randn(48000 * 10).astype(np.float32)\nsf.write('output_02.wav', audio2, 48000, subtype='FLOAT')\n\n# Verify file 2\nassert os.path.exists('output_02.wav'), \"File 2 not created\"\n```\n\n## Example Workflow\n\n1. **Initial attempt**: Run full script with `execute_code_sandbox`\n2. **On failure**: Rerun with `run_shell` and `| head -100` to see partial output\n3. **Identify breakpoint**: Find the last successful operation\n4. **Split script**: Create separate scripts for each major section\n5. **Test incrementally**: Run each section, verify outputs, proceed to next\n6. **Combine successful sections**: Once all pieces work, combine into final script\n\n## Best Practices\n\n- **Always verify file creation** immediately after writing: `assert os.path.exists(path)`\n- **Check file properties** (size, duration, format) before assuming success\n- **Use print statements liberally** to mark progress through the script\n- **Save intermediate outputs** so failures don't require restarting from scratch\n- **Test audio\u002Fvideo generation** with short samples first (1-2 seconds) before full-length content\n\n## When to Use\n\n- Complex scripts with multiple file outputs\n- Audio\u002Fvideo generation pipelines\n- Scripts with external library dependencies\n- Any `execute_code_sandbox` call that produces incomplete or no output",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fdebug-sandbox-execution","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace","https:\u002F\u002Fgithub.com\u002FAG064","AG064, E.Mi.\r\n\r\nA person who thinks all the time, yet all they have to think about is nothing. I want to improve the world and work on open source projects","2026-10-08 06:53:48",{"source":8,"skillName":5,"commands":46,"prompt":56,"zipAvailable":57},[47,50,53],{"tool":48,"command":49},"npx","npx skills add AG064\u002FOpenSpace --skill debug-sandbox-execution",{"tool":51,"command":52},"bunx","bunx skills add AG064\u002FOpenSpace --skill debug-sandbox-execution",{"tool":54,"command":55},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill debug-sandbox-execution","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdebug-sandbox-execution\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},".skill_id","OTHER","其他",37,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdebug-sandbox-execution\u002F.skill_id",[66,89,106,115,143,159],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":33},"01M6KKMPWA0B5SCCH766F8M5EA","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,27,88],"write special chars ts check","check","write","filters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","typescript",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":33},"01M6KKMJXVBNVEY3TRK055F4A7","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[96,97,75,86,98,99,87,27,100,101,102,103,104,79,81,105],"readback","write special chars readback","cleanup","read","scripts","verification","via","post","helper","with",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":33},"01M6KKMEGX9M9NC105J0W3Q5B9","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[75,113,27,79,102,86,114,87,81],"write special chars heredoc","shell",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":124,"publishedAt":33},"01M6KKM8EJ2AATVHZBNB916WT0","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\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000033","数据分析师",[125,126,127,128,88,129,130,131,132,133,79,134,135,136,137,138,139,140,141,142],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":33},"01M6KKM39PHYK627F19GE2B9XN","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[150,151,152,153,79,154,105,155,156,157,158],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":33},"01M6KKKY7T2P61Y0JH54CDEJKQ","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[166,167,168,169,170,171,87,172,173,174],"directory","verify","structure","verify directory structure","access","first","issues","diagnose","file access"]