Перейти к содержанию
Skillpedia
Агенты7.8k · #12998

shell-agent-file-workflow

Что он делает

Этот сценарий направляет ИИ-агента на то, чтобы агент шелла создавал сложные файлы, а потом находил их. Он нужен тем, чьи файловые инструменты не справляются с форматами вроде слайдов, документов или PDF.

Когда использовать

  • ✓Когда прямые инструменты создания файлов не справляются со сложным форматом, например со слайдами или документами.
  • ✓Когда для создания файла нужны несколько шагов, библиотеки или исправления ошибок.
  • ✓Когда готовый файл может оказаться во вложенной папке, и его трудно найти.

Ссылка на скилл

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-agent-file-workflow/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Сделай презентацию PowerPoint для моего квартального обзора. Прямые инструменты не справились, поэтому пусть агент шелла создаст ее, а потом найди файл.”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Агент дает агенту шелла понятную задачу. Когда тот заканчивает, агент ищет новый файл в рабочей папке по имени и времени последнего изменения, чтобы найти его в любой вложенной папке.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

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

Issue Solution
No files found Expand search: remove extension filter, increase time window
Multiple files found Sort by modification time: find . -name "*.ext" -type f -printf '%T@ %p\n' | sort -n
File is corrupted Re-run shell_agent with more specific requirements
Permission errors Use sudo or check directory permissions
Частые вопросы

Как агент находит файл?

Он использует команду find, ищет по типу файла и может отбирать файлы, измененные за последние несколько минут.

Какие типы файлов можно искать?

Скилл называет PowerPoint, Word и PDF как примеры.

Что если есть несколько версий?

Скилл советует фильтровать по времени изменения, чтобы выбрать самую новую.

Подробности

Оригинальное описание автора

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

repo: HKUDS/AgentPilot

Популярность

Звёзды на GitHub
7.8k
Место в рейтинге
#12998
Лицензия
MIT
Обновлён
01.11.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы