libreoffice-writer
LibreOffice Writer 문서 자동화
수동으로 문서를 편집하는 것은 시간이 많이 소요되고 오류가 발생하기 쉽습니다. 이 스킬은 UNO 통합을 통해 LibreOffice Writer 작업을 자동화하여 프로그래밍 방식의 문서 생성, 편집, 서식 지정 및 내보내기를 가능하게 합니다.
스킬 ZIP 다운로드
Claude에서 업로드
설정 → 기능 → 스킬 → 스킬 업로드로 이동
토글을 켜고 사용 시작
테스트해 보기
"libreoffice-writer" 사용 중입니다. Create a new document with a title and export to PDF
예상 결과:
- Document created successfully: /path/to/report.odt
- Exported to PDF: /path/to/report.pdf
"libreoffice-writer" 사용 중입니다. Find and format text in existing document
예상 결과:
- Opened document: /path/to/draft.odt
- Formatted text range: bold, center-aligned
- Changes saved and document closed
"libreoffice-writer" 사용 중입니다. Apply patch with multiple operations
예상 결과:
- Patch parsed: 3 operations
- Operation 1 (replace_text): success
- Operation 2 (format_text): success
- Operation 3 (insert_table): success
- Overall status: ok
- Document persisted: true
보안 감사
낮은 위험Static analysis flagged 175 patterns but evaluation confirms these are false positives. The skill legitimately uses subprocess to launch LibreOffice with hardcoded arguments, tempfile for secure temp directories, and importlib for module detection. All external command usage has no user input injection vectors. Risk is low due to filesystem and external command dependencies requiring LibreOffice installation.
낮은 위험 문제 (3)
위험 요인
⚙️ 외부 명령어 (1)
📁 파일 시스템 액세스 (2)
🔑 환경 변수 (1)
품질 점수
만들 수 있는 것
자동화된 보고서 생성
문서를 생성하고, 서식이 지정된 텍스트와 테이블을 삽입한 후 PDF로 내보내 배포하여 표준화된 보고서를 생성합니다.
문서 템플릿 처리
템플릿 문서를 불러오고, 플레이스홀더 텍스트를 동적 콘텐츠로 교체하고, 새 데이터로 테이블을 업데이트한 후 사용자 정의 버전을 내보냅니다.
일괄 문서 작업
실패 시 원자적 롤백이 있는 패치 워크플로우를 사용하여 여러 문서에 일관된 서식 변경을 적용합니다.
이 프롬프트를 사용해 보세요
Create a new LibreOffice Writer document at /path/to/report.odt. Insert a title "Monthly Report", add a section heading "Summary", then insert a paragraph describing this month's achievements. Export the final document to PDF.
Open /path/to/draft.odt and find the sentence "Quarterly revenue grew significantly" that appears after "Financial Overview" and before "Next Steps". Make it bold and centered. Then insert a bulleted list after "Action Items" with three tasks: Review budget, Schedule meeting, Send updates.
Open the document at /path/to/data-report.odt. Insert a table with 4 rows and 3 columns named "Sales Data". Populate it with headers [Region, Q1, Q2] and data rows for North, South, East regions. Later update the Q2 values when new numbers arrive.
Apply this patch to /path/to/manuscript.odt in atomic mode: First, replace all instances of "Draft" with "Final". Second, format the chapter titles bold with 14pt font. Third, insert a table of contents. If any operation fails, rollback all changes and report the error.
모범 사례
- UNO 기반 Writer API로 작업할 때는 항상 절대 파일 경로를 사용하세요
- 텍스트 타겟을 단어가 아닌 전체 문장 또는 단락 수준의 문구로 앵커하세요
- 텍스트가 문서에서 여러 번 나타날 수 있는 경우 after 및 before 범위를 사용하여 검색을 제한하세요
- 올바른 정리를 보장하기 위해 세션 작업을 try/finally 또는 컨텍스트 관리자로 래핑하세요
- 본番 환경에서 원자적 모드로 전환하기 전에 최선의 노력 모드에서 패치 워크플로우를 테스트하세요
피하기
- 상대 경로 사용 - UNO는 모든 문서 작업에 절대 파일 경로가 필요합니다
- 문서에서 동일한 텍스트가 여러 번 나타날 때 발생 매개변수 생략
- session.close()가 호출된 후 세션 메서드 호출
- 패치 항목이나 데이터 필드에 형식이 잘못된 JSON 제공
- 일치하는 텍스트만 적용될 것으로 기대하는 대신 전체 단락에 단락 정렬이 적용되기를 기대