本文へ移動
cccskills
無料GitHub で公開

shell-agent-file-workflow

Delegate file generation to shell_agent when direct tools fail, with systematic file location and retrieval

インストール方法を見る

含まれるファイル(2)

  • SKILL.md3.1 KB
  • .skill_id39 B

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Shell Agent File Generation Workflow

When direct document or file generation approaches fail, delegate the task to shell_agent which can autonomously write code, execute it, and retry on errors. Generated files may appear in nested workspace directories.

When to Use

  • Direct file generation tools or create_file functions fail for complex formats
  • Complex file creation requiring multiple steps, libraries, or error recovery
  • When you need an autonomous agent to figure out how to accomplish a goal
  • File generation that requires iteration and automatic error fixing

Workflow Steps

Step 1: Delegate File Generation to shell_agent

Use shell_agent with a clear, specific task description:

shell_agent(task="Create a [file type] with [specific content/structure requirements]")

The agent will:

  • Decide whether to use Python or Bash
  • Write and execute code
  • Inspect output and iterate
  • Automatically retry and fix errors (up to several rounds)

Step 2: Locate Generated Files

Files may be created in nested directories within the workspace. Use find to locate them:

find . -name "*.extension" -type f

For multiple file types:

find . -type f \( -name "*.pptx" -o -name "*.docx" -o -name "*.pdf" \)

For recently modified files (last 10 minutes):

find . -name "*.extension" -type f -mmin -10

Step 3: Copy Files to Working Directory

Once located, copy the file to your working directory:

cp /path/to/found/file.extension ./

Example

Creating a PowerPoint Presentation

# Step 1: Delegate to shell_agent
shell_agent(task="Create a 10-slide PowerPoint presentation covering: topic A, topic B, topic C")

# Step 2: Find the generated file
find . -name "*.pptx" -type f

# Output might show: ./workspace/nested/path/presentation.pptx

# Step 3: Copy to working directory
cp ./workspace/nested/path/presentation.pptx ./

Creating a PDF Report

# Step 1: Delegate generation
shell_agent(task="Generate a PDF report with charts and tables from the provided data")

# Step 2: Locate output
find . -name "*.pdf" -type f -mmin -5

# Step 3: Retrieve file
cp ./generated/reports/output.pdf ./

Tips

  • Be specific in task description: Include file format, structure, and content requirements explicitly
  • Check multiple extensions: If unsure of output format, search for common extensions
  • Use modification time: Filter by recent files to identify newly created outputs
  • Verify file integrity: After copying, check that the file is valid and complete

Troubleshooting

IssueSolution
No files foundExpand search: remove extension filter, increase time window
Multiple files foundSort by modification time: find . -name "*.ext" -type f -printf '%T@ %p\n' | sort -n
File is corruptedRe-run shell_agent with more specific requirements
Permission errorsUse sudo or check directory permissions

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Incremental audio production with duration mismatch handling, adaptive stem extension, and pre-mix alignment verification

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

Incremental audio production with duration alignment handling, per-stem verification, and adaptive extension strategies

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

Create serverless API proxy endpoints that hide API keys and provide a unified backend for the dashboard frontend. Designed for Vercel deployment.

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

End-to-end audio production workflow with stems, effects, archiving, and verification

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

Handle cascading data retrieval tool failures by falling back to embedded knowledge generation

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

Fallback pattern for executing Python code when execute_code_sandbox fails

日本語の概要は準備中です。原文の説明を表示しています。

HKUDS/OpenSpace7,7552026年8月13日 更新

HKUDS のスキルをすべて見る

このスキルの問題を報告する