一键导入
read-docx-comments
Extract all comments from a .docx file (Google Docs / Word feedback) and present them grouped by document location with author and anchored text.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Extract all comments from a .docx file (Google Docs / Word feedback) and present them grouped by document location with author and anchored text.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Project-specific layer for /plan-review, loaded only when reviewing plans in the claude-config repo itself.
Write a cross-session handoff file at ~/.claude/handoffs/<descriptive-slug>-handoff.md capturing goal, status, task list, next step, files modified, active markers, open questions, and resume command.
Confirm claims at the primary source — fetch the official docs, spec, or source directly. TRIGGER when: researching a library, API, framework, or architecture/design decision; or acting on a documentation claim from a subagent, blog post, or other secondary source. DO NOT TRIGGER when: you want a multi-source research synthesis (that is a research-harness job, not source verification); quick syntax lookups; error decoding; or when the cited URL is already the primary source.
Produce a cold-start task briefing at ~/.claude/briefs/<slug>-task.md for a fresh session to pick up known, well-scoped work (abandoned PR, surfaced follow-up, ticket whose scope is settled). Distinct from /handoff, which captures mid-flight session state.
Review implementation plans before presenting to the user. TRIGGER when: an implementation plan has been written or updated in .claude/plans/ or is about to be presented to the user for review. DO NOT TRIGGER when: the plan is a trivial one-liner (single migration, config change), or the user has explicitly said to skip review.
Produce a signal-bucketed error-mode report from a delivered body of multi-session AI-assisted work — bucket every failure by which pipeline layer caught it, correlate transcript signals with PR review comments, and split output into a private, project-identifying report and a de-identified public lessons doc. Builds on transcript-narrative and transcript-analysis. Supports a multi-window trend pass to distinguish recurring patterns from one-off noise.
| name | read-docx-comments |
| description | Extract all comments from a .docx file (Google Docs / Word feedback) and present them grouped by document location with author and anchored text. |
| argument-hint | <path/to/file.docx> |
Extract all comments from the provided .docx file. The user uses this to give feedback on plans and documents by adding comments in Google Docs / Word.
The user will provide a path to a .docx file. If not provided as an argument, ask for it.
Unzip the docx and extract both word/comments.xml and word/document.xml to /tmp.
Run this Python script to extract comments with their anchored text:
import re, sys, xml.etree.ElementTree as ET
NS = {'w': 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'}
def get_text(elem):
"""Recursively extract all w:t text from an element."""
parts = []
for t in elem.iter('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}t'):
if t.text:
parts.append(t.text)
return ''.join(parts)
# Parse comments
comments = {}
tree = ET.parse('/tmp/word/comments.xml')
for c in tree.findall('.//w:comment', NS):
cid = c.get('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}id')
author = c.get('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}author')
date = c.get('{http://schemas.openxmlformats.org/wordprocessingml/2006/main}date', '')
text = get_text(c)
comments[cid] = {'author': author, 'date': date, 'text': text, 'anchor': ''}
# Parse document to find anchored text for each comment
doc = ET.parse('/tmp/word/document.xml')
body = doc.getroot()
# Serialize back to string for regex-based range matching
# (ElementTree loses namespace prefixes, so re-read as string)
with open('/tmp/word/document.xml', 'r') as f:
doc_str = f.read()
# For each comment, find text between commentRangeStart and commentRangeEnd
for cid in comments:
start_pattern = f'commentRangeStart[^/]*w:id="{cid}"'
end_pattern = f'commentRangeEnd[^/]*w:id="{cid}"'
start_match = re.search(start_pattern, doc_str)
end_match = re.search(end_pattern, doc_str)
if start_match and end_match:
between = doc_str[start_match.end():end_match.start()]
texts = re.findall(r'<w:t[^>]*>(.*?)</w:t>', between)
comments[cid]['anchor'] = ''.join(texts).strip()
# Output
for cid in sorted(comments.keys(), key=int):
c = comments[cid]
anchor = c['anchor']
if anchor and len(anchor) > 120:
anchor = anchor[:120] + '...'
print(f"--- Comment {cid} ({c['author']}, {c['date'][:10]}) ---")
if anchor:
print(f" On: \"{anchor}\"")
print(f" Comment: {c['text']}")
print()
Present the comments in a clear format, grouped by their location in the document. For each comment, show:
After presenting, ask the user if they want you to act on the feedback.