shell-doc-gen-and-locate
できること
このスキルは、直接のライブラリ呼び出しが失敗したとき、AIエージェントがスクリプトでプレゼンテーションやPDFを作り、そのファイルをワーキングフォルダーに移す方法を示します。スクリプトでスライドやPDFが必要な人向けです。
使う場面
- ✓直接の書類作成が失敗し、代わりにシェルスクリプトでファイルを作れるとき。
- ✓スクリプトが予想外の場所に保存したPowerPointやPDFファイルが必要なとき。
- ✓完成したファイルを簡単に使えるように、ワーキングフォルダーに移したいとき。
スキルのリンク
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“アウトラインからスクリプトでPowerPointを作ってください。そのあとファイルを見つけて、ワーキングフォルダーに移してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、ファイルを作り、確認のメッセージを表示するスクリプトを書きます。次にfindでワークスペースから出力を探し、必要なら最近の変更で絞り込んで、ファイルをワーキングフォルダーにコピーします。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Shell Document Generation and Retrieval Workflow
Objective
Enable reliable file creation (e.g., PowerPoint, PDFs) when direct API or library-based generation fails, ensuring the final artifact is located and moved to the working directory regardless of nested output paths.
When to Use
- Standard document generation tools (e.g., direct Python library calls in-memory) fail or are unavailable.
- The
shell_agentcapability is available for executing scripts. - Generated files may be saved in unpredictable nested directories within the workspace.
Procedure
1. Attempt Shell-Based Generation
If direct tool invocation fails, delegate file creation to a shell-executed script.
- Write a script (e.g.,
generate_presentation.pyormake_doc.sh) that produces the file. - Execute the script via the shell agent.
- Ensure the script prints confirmation upon completion.
2. Locate the Output File
Do not assume the file is in the current directory. Shell scripts often create outputs in nested folders (e.g., ./workspace/output/, ./build/).
Use the
findcommand to search the workspace recursively.Example for PowerPoint files:
find . -type f -name "*.pptx"
Example for PDF files:
find . -type f -name "*.pdf"
Filter results by modification time if multiple versions exist (e.g.,
-mmin -10).
3. Retrieve to Working Directory
Once the file path is identified:
Copy the file to the root working directory or the expected delivery location.
cp /path/to/nested/file.pptx ./
Verify the file exists and is non-zero size.
4. Verification
- Confirm the file opens correctly or meets size expectations.
- If the file is not found after
find, check stderr of the generation script for path clues.
Best Practices
- Explicit Paths: Whenever possible, configure generation scripts to output to a known relative path (e.g.,
./output/filename.pptx). - Cleanup: Remove nested temporary copies after retrieving the final version to avoid confusion.
- Logging: Echo the final absolute path of the generated file in the script stdout to simplify locating.
よくある質問
なぜスクリプトはメッセージを表示する必要があるのですか?
表示された確認メッセージは、スクリプトが終わったことを示し、エージェントがファイルを探すタイミングを判断するのに役立ちます。
エージェントはPDFをどのように探しますか?
ワークスペース全体で、PDFファイルを再帰的に検索するfindを実行します。
正しいバージョンを選べますか?
はい。複数のバージョンがある場合は、更新日時で絞り込むよう提案しています。
詳細
作者による元の説明
Generate documents via shell commands and locate nested outputs using find.
repo: HKUDS/AgentPilot
人気
- GitHubのスター
- 7.8k
- ランキング
- #12999
- ライセンス
- MIT
- 更新日
- 2026/11/1
コメント
- …
このリポジトリの他のスキル
agentpilot
7.8kエージェントが、作業を準備し、変更案を提案してテストし、評価するAgentPilotのループを実行することで、プロジェクトを段階的に改善できるよう支援します。
openspace
7.8kエージェントが、スキルを保存し取り出すツールであるOpenSpaceをセットアップし、MCPを通じてAIアプリに接続できるよう支援します。
rsi-arena
7.8kエージェントが、AIMEやTerminal-Benchなどの標準的なAIベンチマークテストをセットアップして実行し、異なる改善方法を比較できるよう支援します。
experiment-guide
7.8kエージェントが、プログラムを改善する方法を調べる間に、小さな実験を計画し、その結果を読み、発見を記録できるよう支援します。
似ているスキル
feishu-doc
394kテキスト、画像、表を含むFeishuのクラウドドキュメントを、ドキュメントツールを使って読み、作成し、編集するようエージェントを支援します。
feishu-drive
394kボットと共有されたFeishuのクラウドフォルダ内のファイルを閲覧、整理、コメントできるようエージェントを支援します。
feishu-perm
394kFeishuのファイルにアクセスできる人を確認し、変更するようエージェントを支援します。依頼を満たす最小の権限を選びます。