본문으로 건너뛰기
Skillpedia
PDF, Word, 슬라이드7.8k · #12999

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/shell-doc-gen-and-locate/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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_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.
자주 묻는 질문

스크립트가 메시지를 출력해야 하는 이유는 무엇인가요?

출력된 확인 메시지는 스크립트가 끝났다는 것을 보여 주어, 에이전트가 파일을 찾을 시점을 알게 합니다.

에이전트는 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.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬