office-transform
하는 일
기존 파일의 선택한 부분으로 새 문서 파일(Excel, Word, PDF, PowerPoint 등)을 만드는 도구입니다. 원래 파일은 절대 바뀌지 않습니다.
사용하는 경우
- ✓스프레드시트의 표를 새 파일로 복사하는 경우.
- ✓Word 문서에서 특정 단락을 새 파일로 추출하는 경우.
- ✓프레젠테이션의 슬라이드를 새 파일로 변환하는 경우.
스킬 링크
https://github.com/CherryHQ/cherry-studio/blob/main/resources/skills/office-transform/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“‘Sales’ 시트에서 A열부터 C열까지, 5행부터 20행까지의 데이터로 새 Excel 파일을 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
문서의 일부(스프레드시트의 범위나 Word의 단락 등)를 선택합니다. 그러면 도구가 선택된 부분을 읽고 선택한 내용으로 완전히 새로운 파일을 만들며, 원본 파일은 그대로 둡니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Office Transform
Turn a structural selection of an Office/PDF document into a new derived file.
Two invariants hold for every operation:
- The source file is read-only. Every result is a new file; both scripts refuse to write to the source path or overwrite an existing file. Never work around this with ad-hoc shell edits to the original.
- Anchors are structural. Selections address the document's own coordinates — worksheet + A1 range, body-level paragraph ordinal, one-based page number — never screen or DOM positions.
When to use which tool
- Only need to read a document to summarize or answer questions → use
mcp__cherry-tools__to_markdowninstead (see the cherry-tool-guide skill); it is lossy but built for reading. - The user wants a file out — an extracted range, a converted fragment, an edited copy → this skill.
Input: selection references
Chat surfaces may hand you a fenced selection-ref block:
{"path": "/abs/report.xlsx", "anchor": {"format": "xlsx", "sheet": "Sheet1", "range": "A1:C10"}, "excerpt": "…", "fileStamp": {"size": 1024, "mtimeMs": 1700000000000}}
The anchor object is exactly what the scripts take via --anchor.
Freshness check. fileStamp.mtimeMs is milliseconds since the Unix epoch, floored to
whole milliseconds. Do not compare it to stat's default output: stat -f %m (macOS) and
stat -c %Y (GNU) give whole seconds, so multiplying by 1000 loses the sub-second part and
never matches. Read whole milliseconds the way the app wrote them:
uv run python -c "import os,sys;st=os.stat(sys.argv[1]);print(st.st_size, st.st_mtime_ns//1_000_000)" '/abs/report.xlsx'
Treat the file as changed when the size differs, or when the mtimes differ by more than 2 ms.
The tolerance is small on purpose: both sides floor the same nanosecond timestamp to
milliseconds, so they agree exactly, and the couple of milliseconds only covers the rounding
of a double that can no longer represent current epoch milliseconds exactly. A wider window
would hide real edits — a same-size change made within it would read as unchanged, which is
why the anchor check below is not optional. On a change, tell the user the file changed since
they selected and ask them to re-select — never silently re-anchor.
Anchor check. Before a patch-copy edit, also verify the anchor still points where the
user thinks: extract the anchored region and compare its text with the reference's excerpt,
normalizing both sides the same way (NFC, collapse each whitespace run to one space, trim).
The two are not equal and are not meant to be — the excerpt is what the user selected, while
the extract is the whole region an edit would replace. A selection sitting inside one region
makes the excerpt the shorter side; a selection running past that region anchors to where it
starts, which makes it the longer one. So the test is containment, whichever way round fits:
the excerpt appears inside the extract, or the extract's tail is where the excerpt begins.
Only when neither holds has the anchor stopped pointing at the selection — then stop and tell
the user, never edit at a mismatched anchor and never go searching for a "close enough"
location. Two cases need care because the two sides are not directly comparable as-is:
- xlsx: the
excerptis tab-separated cells and newline-separated rows, while extraction writes csv or md. Compare cell values, not the raw file — read the csv with a csv reader and join the fields with single spaces before normalizing, so,and|never count as a difference. That join drops the cell boundaries on both sides, so a match proves the text is unchanged, not the grid — the same words re-split across cells still reads as a match. The freshness check above is what catches that; never skip it on a passing anchor check. Number formats are the second asymmetry: theexcerptholds what Excel displays, because that is what the user pointed at (1,234.50,45.67%), while extraction writes the stored value (1234.5,0.4567). Neither side is wrong, so a formatted cell never matches literally. Compare those cells by value, and leave them out of the joined strings so the containment test runs on the text cells alone. Dates, times and durations are the same asymmetry seen from the other side: extraction writes one fixed shape (2024-01-03,
…
자주 묻는 질문
원본 파일은 어떻게 되나요?
원본 파일은 항상 그대로 유지됩니다. 도구는 원본을 수정하거나 덮어쓰지 않습니다.
원본 파일을 편집할 수 있나요?
아니요, 이 도구는 원본 파일에 대해 읽기 전용으로 설계되었습니다. 모든 작업은 새 파일로 만들어집니다.
도구는 제가 원하는 부분을 어떻게 알 수 있나요?
문서 안에서 직접 선택하거나, 영역을 설명할 수 있습니다(예: ‘X 시트, A에서 C열’). 도구는 이 정보를 사용해 복사할 정확한 구조를 찾습니다.
상세 정보
작성자의 원본 설명
Derive new Office files from structural selections without touching the original. Use when the user points at part of a spreadsheet, Word document, PDF, or PowerPoint deck (a worksheet range, paragraph, page, slide, shape, or a pasted selection-ref block) and wants it extracted, converted, or edited — the result is always a NEW file; the source file is never modified. Covers xlsx range extraction
repo: CherryHQ/cherry-studio
인기도
- GitHub 스타
- 53k
- 순위
- #3391
- 라이선스
- AGPL-3.0
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
code-mate-antigravity
53k에이전트가 코드를 분석하고 프로그래밍 작업을 수행하도록 돕습니다. 기존 코드를 검토하거나 개선할 때 유용합니다.
code-mate-claude-code
53k에이전트가 코드를 분석하고 구현하도록 돕습니다. 소프트웨어 개발 작업과 코드 검토에 유용합니다.
code-mate-codex
53k에이전트가 코드를 분석하고 구현하도록 돕습니다. 코딩 결과를 얻거나 다른 도구와 비교할 때 유용합니다.
code-mate-deepseek-harness
53k에이전트가 저장소 안의 코드를 분석하고 구현하도록 돕습니다. 범위가 정해진 개발 작업과 코드 분석에 유용합니다.