跳到正文
cccskills
免费在 GitHub 公开

shell-agent-file-ops

Describe the files you want created, updated, or organized, and let shell_agent choose how to perform the work. It selects tools such as Python or Bash, executes the operation, and handles errors with retries.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

Leverage shell_agent for autonomous file creation and modification with automatic tool selection and error recovery

查看安装方法

适用场景

  • Creating a document with specified content and format
  • Updating multiple configuration files
  • Creating a Python project structure

包含的文件(2)

  • SKILL.md3.3 KB
  • .skill_id34 B

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Shell Agent File Operations

Purpose

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

When to Use

Use this pattern when:

  • You need to create, modify, or organize files
  • The optimal approach (Python script, Bash commands, direct file write) is unclear
  • You want automatic error handling and retry logic
  • You prefer to describe what to accomplish rather than how

How to Use

Basic Pattern

Delegate to shell_agent with a clear natural-language task description.

Example: Create a Document File

Task description to shell_agent:

Create a comprehensive SOAP note file containing four sections:
Subjective, Objective, Assessment, and Plan. Include all relevant
patient visit details in a professional medical format.

The shell_agent will:

  1. Decide whether to use Python or Bash
  2. Write and execute the appropriate code
  3. Handle any errors automatically (up to several retry rounds)
  4. Return the result

Example: Modify Existing Files

Task description to shell_agent:

Update all configuration files in the config/ directory to add
a new setting "timeout: 300" under the general section.

Example: Complex File Operations

Task description to shell_agent:

Create a project structure with README.md, src/main.py, and
tests/test_main.py. Include appropriate content in each file
based on a Python data processing project template.

Best Practices

  1. Be specific about content requirements - Describe what should be in the file(s), not just that files should be created.

  2. Include format specifications - Mention desired formats (markdown, JSON, CSV, etc.) when relevant.

  3. Specify file locations - Include paths when files should be in specific directories.

  4. Let shell_agent handle complexity - Don't pre-decide the implementation approach; trust the autonomous selection.

  5. Check the output - Review what shell_agent created to ensure it meets requirements.

Comparison: When NOT to Use This Pattern

Use direct tools instead when:

  • You already know the exact command/script to run → use run_shell
  • You have the exact file content ready → use write_file directly
  • The operation is trivial (single-line file write) → use write_file
  • You need fine-grained control over the implementation

Anti-Patterns to Avoid

❌ Don't over-specify the implementation:

Use Python to write a file called notes.md with this content...

✅ Do describe the desired outcome:

Create a notes.md file with comprehensive documentation about...

❌ Don't use shell_agent for simple direct operations:

Write "hello" to hello.txt

✅ Do use write_file directly for simple cases:

write_file(path="hello.txt", content="hello")

Summary

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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Prepare audio stems, the separate parts of a track, for mixing by matching their durations with silence, loops, or crossfades. Verify each generated and processed file before moving to the next production step.

中文简介正在准备中。当前显示英语简介。

  • Match audio parts with different durations
  • Extend drums and melodic parts using suitable methods
  • Check audio specifications before mixing
HKUDS/OpenSpace77562026年8月13日 更新

Produce audio in separate stems, meaning individual instrument tracks, and verify each output as you go. Align track lengths with silence, loops, or crossfades, then apply effects, mix a master, and package the files.

中文简介正在准备中。当前显示英语简介。

  • Align instrument tracks to a reference audio file
  • Choose how to extend tracks that are too short
  • Verify audio properties after generation and effects
HKUDS/OpenSpace77562026年8月13日 更新

Build serverless endpoints that relay external API requests for a dashboard while keeping API keys on the server. Includes Vercel examples for input checks, caching, cross-origin access, and consistent JSON responses.

中文简介正在准备中。当前显示英语简介。

  • Connect a dashboard to external APIs without exposing API keys
  • Create endpoints for stock quotes and news
  • Standardize API responses and error handling
HKUDS/OpenSpace77562026年8月13日 更新

Produce a master track and separate audio parts through a structured Python workflow. Apply filters and reverb, export WAV files with consistent settings, package them in a ZIP archive, and check that the deliverables meet the requested specifications.

中文简介正在准备中。当前显示英语简介。

  • Export a master track with separate audio parts
  • Apply filters and reverb to audio
  • Check duration and format across deliverables
HKUDS/OpenSpace77562026年8月13日 更新

Keep document creation moving when web searches and page retrieval repeatedly fail. The skill preserves the original task, uses the model’s existing knowledge, and clearly identifies information that could not be checked against external sources.

中文简介正在准备中。当前显示英语简介。

  • Continue drafting after repeated web retrieval failures
  • Preserve task requirements during network errors
  • Mark information that could not be externally verified
HKUDS/OpenSpace77562026年8月13日 更新

When Python execution repeatedly fails in execute_code_sandbox, use a file-based alternative: save the script, run it through the shell, and capture results or errors. The guidance covers paths, imports, timeouts, structured output, and optional cleanup.

中文简介正在准备中。当前显示英语简介。

  • Retry Python work through the shell after repeated sandbox failures
  • Run longer tasks with an adjusted timeout
  • Execute Python work that needs multiple files or system utilities
HKUDS/OpenSpace77562026年8月13日 更新

查看 HKUDS 的全部技能

报告此技能的问题