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

shell-doc-gen-and-locate

Generate documents via shell commands and locate nested outputs using find.

インストール方法を見る

含まれるファイル(2)

  • SKILL.md2.2 KB
  • .skill_id38 B

SKILL.md(原文)

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

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_agent capability 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.py or make_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 find command 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.

レビュー

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

同じリポジトリのスキル

概要と使いどころ

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

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

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

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

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

HKUDS/OpenSpace7,7532026年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,7532026年8月13日 更新

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

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

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

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

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

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

Fallback pattern for executing Python code when execute_code_sandbox fails

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

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

HKUDS のスキルをすべて見る

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