Create coordinated internal/external documents from reference materials with consistent formatting and cross-references
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-structured-document-creation-004b35e35f04 ,按照其中的说明把「structured-document-creation」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
This skill guides you through creating multiple audience-specific documents from a single reference source while maintaining consistency, proper formatting, and cross-references.
Use this pattern when you need to:
First, thoroughly read the reference document to understand the source content.
# Example: Read reference document
from docx import Document
def read_reference_doc(path):
doc = Document(path)
content = []
for para in doc.paragraphs:
content.append(para.text)
return '\n'.join(content)
reference_content = read_reference_doc('Reference_Document.docx')
Key actions:
Create a structured extraction of key information categories:
structured_requirements = {
'timelines': [], # Deadlines, timeframes, schedules
'roles': [], # Who is responsible for what
'steps': [], # Process steps in order
'policies': [], # Rules and guidelines
'contacts': [], # Points of contact
'internal_only': [] # Information not for external audiences
}
Extraction checklist:
Before creating documents, plan the structure for each audience:
| Document Type | Audience | Content Focus | Formatting |
|---|---|---|---|
| Internal | Staff/Team | Full details, sensitive info, operational specifics | Detailed, technical |
| External | Clients/Partners | Public-facing info, guidelines, high-level process | Clear, professional |
Document planning template:
Internal Document:
- Title: [Descriptive internal title]
- Sections: [List all sections with subsections]
- Cross-refs: [References to external document]
- Sensitive content: [Mark internal-only sections]
External Document:
- Title: [Client/partner-friendly title]
- Sections: [Public-appropriate sections only]
- Cross-refs: [References to internal document if applicable]
- Exclusions: [List what's omitted for external audience]
Create each document maintaining:
# Example: Create document with consistent structure
from docx import Document
from docx.shared import Inches, Pt
from docx.enum.text import WD_ALIGN_PARAGRAPH
def create_document_template(title, sections):
doc = Document()
# Title
heading = doc.add_heading(title, 0)
heading.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Add sections
for section in sections:
doc.add_heading(section['title'], level=1)
for content in section['content']:
doc.add_paragraph(content)
return doc
Ensure documents reference each other appropriately:
Internal document should include:
External document should include:
Cross-reference example:
For internal process details, refer to: [Internal Document Name]
For customer-facing guidelines, refer to: [External Document Name]
Before finalizing, verify:
Consistency checks:
Audience appropriateness:
Cross-reference validation:
Reference Document: Return_Issues.docx
↓
Structured Extraction
↓
┌─────────────────────────┬─────────────────────────┐
│ Internal_RA_Process │ Key_Account_RA_Policy │
│ (Internal Document) │ (External Document) │
├─────────────────────────┼─────────────────────────┤
│ • Full process details │ • Customer guidelines │
│ • Internal contacts │ • External timelines │
│ • Sensitive criteria │ • Public policies │
│ • Operational steps │ • Contact information │
│ • Cross-ref to external │ • Cross-ref to internal │
└─────────────────────────┴─────────────────────────┘