[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KG2D91W1XCTJXRET23SMCV":3,"skill-same:01M6KG2D91W1XCTJXRET23SMCV":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":14,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":49,"ownerDescription":50,"updatedAt":51,"install":52,"resources":65},"01M6KG2D91W1XCTJXRET23SMCV","shell-agent-file-ops",null,"Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery","xyliu-cs\u002FOpenSpace-GDPval","xyliu-cs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89236536?v=4","01M6KF8Z1V4TXS86CKSH48BY8T","xy","01M6KF8Z67443W0SHXM85JEF0B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-agent-file-ops\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"file","shell","ops","shell agent file ops","error recovery","recovery","tool","autonomous","selection","creation","leverage","error","with","for","automatic","2026-11-10 10:12:30",false,"---\nname: shell-agent-file-ops\ndescription: Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery\n---\n\n# Shell Agent File Operations\n\n## Purpose\n\nUse `shell_agent` for file operations when you want the tool to autonomously decide how to accomplish the task (Python vs Bash, which commands to use, error recovery) rather than manually selecting specific tools like `write_file` or `run_shell`.\n\n## When to Use\n\nUse this pattern when:\n- You need to create, modify, or organize files\n- The optimal approach (Python script, Bash commands, direct file write) is unclear\n- You want automatic error handling and retry logic\n- You prefer to describe **what** to accomplish rather than **how**\n\n## How to Use\n\n### Basic Pattern\n\n```\nDelegate to shell_agent with a clear natural-language task description.\n```\n\n### Example: Create a Document File\n\n**Task description to shell_agent:**\n```\nCreate a comprehensive SOAP note file containing four sections:\nSubjective, Objective, Assessment, and Plan. Include all relevant\npatient visit details in a professional medical format.\n```\n\nThe shell_agent will:\n1. Decide whether to use Python or Bash\n2. Write and execute the appropriate code\n3. Handle any errors automatically (up to several retry rounds)\n4. Return the result\n\n### Example: Modify Existing Files\n\n**Task description to shell_agent:**\n```\nUpdate all configuration files in the config\u002F directory to add\na new setting \"timeout: 300\" under the general section.\n```\n\n### Example: Complex File Operations\n\n**Task description to shell_agent:**\n```\nCreate a project structure with README.md, src\u002Fmain.py, and\ntests\u002Ftest_main.py. Include appropriate content in each file\nbased on a Python data processing project template.\n```\n\n## Best Practices\n\n1. **Be specific about content requirements** - Describe what should be in the file(s), not just that files should be created.\n\n2. **Include format specifications** - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.\n\n3. **Specify file locations** - Include paths when files should be in specific directories.\n\n4. **Let shell_agent handle complexity** - Don't pre-decide the implementation approach; trust the autonomous selection.\n\n5. **Check the output** - Review what shell_agent created to ensure it meets requirements.\n\n## Comparison: When NOT to Use This Pattern\n\nUse direct tools instead when:\n- You already know the exact command\u002Fscript to run → use `run_shell`\n- You have the exact file content ready → use `write_file` directly\n- The operation is trivial (single-line file write) → use `write_file`\n- You need fine-grained control over the implementation\n\n## Anti-Patterns to Avoid\n\n❌ Don't over-specify the implementation:\n```\nUse Python to write a file called notes.md with this content...\n```\n\n✅ Do describe the desired outcome:\n```\nCreate a notes.md file with comprehensive documentation about...\n```\n\n❌ Don't use shell_agent for simple direct operations:\n```\nWrite \"hello\" to hello.txt\n```\n\n✅ Do use `write_file` directly for simple cases:\n```\nwrite_file(path=\"hello.txt\", content=\"hello\")\n```\n\n## Summary\n\nThis pattern shifts focus from **implementation mechanics** to **task intent**, leveraging shell_agent's autonomous decision-making for file operations that benefit from intelligent tool selection and automatic error recovery.","# Shell Agent File Operations\n\n## Purpose\n\nUse `shell_agent` for file operations when you want the tool to autonomously decide how to accomplish the task (Python vs Bash, which commands to use, error recovery) rather than manually selecting specific tools like `write_file` or `run_shell`.\n\n## When to Use\n\nUse this pattern when:\n- You need to create, modify, or organize files\n- The optimal approach (Python script, Bash commands, direct file write) is unclear\n- You want automatic error handling and retry logic\n- You prefer to describe **what** to accomplish rather than **how**\n\n## How to Use\n\n### Basic Pattern\n\n```\nDelegate to shell_agent with a clear natural-language task description.\n```\n\n### Example: Create a Document File\n\n**Task description to shell_agent:**\n```\nCreate a comprehensive SOAP note file containing four sections:\nSubjective, Objective, Assessment, and Plan. Include all relevant\npatient visit details in a professional medical format.\n```\n\nThe shell_agent will:\n1. Decide whether to use Python or Bash\n2. Write and execute the appropriate code\n3. Handle any errors automatically (up to several retry rounds)\n4. Return the result\n\n### Example: Modify Existing Files\n\n**Task description to shell_agent:**\n```\nUpdate all configuration files in the config\u002F directory to add\na new setting \"timeout: 300\" under the general section.\n```\n\n### Example: Complex File Operations\n\n**Task description to shell_agent:**\n```\nCreate a project structure with README.md, src\u002Fmain.py, and\ntests\u002Ftest_main.py. Include appropriate content in each file\nbased on a Python data processing project template.\n```\n\n## Best Practices\n\n1. **Be specific about content requirements** - Describe what should be in the file(s), not just that files should be created.\n\n2. **Include format specifications** - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.\n\n3. **Specify file locations** - Include paths when files should be in specific directories.\n\n4. **Let shell_agent handle complexity** - Don't pre-decide the implementation approach; trust the autonomous selection.\n\n5. **Check the output** - Review what shell_agent created to ensure it meets requirements.\n\n## Comparison: When NOT to Use This Pattern\n\nUse direct tools instead when:\n- You already know the exact command\u002Fscript to run → use `run_shell`\n- You have the exact file content ready → use `write_file` directly\n- The operation is trivial (single-line file write) → use `write_file`\n- You need fine-grained control over the implementation\n\n## Anti-Patterns to Avoid\n\n❌ Don't over-specify the implementation:\n```\nUse Python to write a file called notes.md with this content...\n```\n\n✅ Do describe the desired outcome:\n```\nCreate a notes.md file with comprehensive documentation about...\n```\n\n❌ Don't use shell_agent for simple direct operations:\n```\nWrite \"hello\" to hello.txt\n```\n\n✅ Do use `write_file` directly for simple cases:\n```\nwrite_file(path=\"hello.txt\", content=\"hello\")\n```\n\n## Summary\n\nThis pattern shifts focus from **implementation mechanics** to **task intent**, leveraging shell_agent's autonomous decision-making for file operations that benefit from intelligent tool selection and automatic error recovery.",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fshell-agent-file-ops","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs","https:\u002F\u002Fxyliu-cs.github.io","PhD Student in CS, CUHK-Shenzhen.","2026-04-06 20:32:15",{"source":8,"skillName":5,"commands":53,"prompt":63,"zipAvailable":64},[54,57,60],{"tool":55,"command":56},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill shell-agent-file-ops",{"tool":58,"command":59},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill shell-agent-file-ops",{"tool":61,"command":62},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill shell-agent-file-ops","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-agent-file-ops\u002FSKILL.md",true,[66],{"path":67,"resourceType":68,"resourceTypeDesc":69,"sizeBytes":70,"sourceHtmlUrl":71},".skill_id","OTHER","其他",34,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fshell-agent-file-ops\u002F.skill_id",[73,86,94,109,134,149],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":39},"01M6KG8MF1S664SWBDENYRSCK8","zip-export-deliverable","Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-export-deliverable\u002FSKILL.md",[],[80,81,82,83,84,85],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":39},"01M6KG8GAZWHHEK7VNJDW0ME21","zip-deliverable-finalization","Ensure codebase deliverables are properly packaged as ZIP exports in a dedicated final step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-deliverable-finalization\u002FSKILL.md",[],[93,81,83,84,85],"zip deliverable finalization",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6KG8CMQQ1PYMNTSRZ9VS1MD","zero-iteration-failure-analysis","Identify and handle agent failures with 0 iterations as pre-execution system issues","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzero-iteration-failure-analysis\u002FSKILL.md",[],[101,102,103,104,105,36,106,107,85,108],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","execution","system",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":120,"publishedAt":39},"01M6KG86W3PA07FT9W58YHHERM","write-file-fallback-report","Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report\u002FSKILL.md",[115],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[121,122,24,123,124,125,126,127,128,129,130,131,132,133],"fallback","write","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":141,"publishedAt":39},"01M6KG82GAEY3GG77CMGCK1C2T","fallback-doc-with-delegation","Generate professional documents after tool failures using shell_agent for complex formats or write_file for simple text\u002Fmarkdown","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced\u002FSKILL.md",[140],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[142,36,121,143,144,25,131,129,24,145,30,146,122,147,126,148,37],"fallback doc with delegation","doc","delegation","markdown","text","simple","formats",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":156,"publishedAt":39},"01M6KG7WT7GX5NYCGEFHW22NV7","context-anchored-fallback-report","Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced-4bc5c2\u002FSKILL.md",[155],{"categoryNo":116,"categoryName":117,"taxonomyType":118,"taxonomyTypeDesc":119},[121,123,157,158,129,24,159,160,122,161,162,128,36,163,131],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]