convez.ai
SkillAutomaçãoIntermediário
skill-mate

Document Cloning Skills

skill-mate/Document-Cloning-Skills

Converte Markdown em Word com formatação idêntica entre documentos

Ver no GitHub
InicialPluginScore · de 0 a 100

Skill Claude Code que renderiza Markdown em documentos Word com formatação rigorosa e consistente. Oferece dois modos: Skeleton (clona layout byte-a-byte de um documento de referência) e Profile (usa presets predefinidos ou perfis customizados). Ideal para documentos repetitivos com alto padrão de formatação: editais, propostas técnicas, documentos governamentais.

Instalação

$npx convez-ai skill-mate/Document-Cloning-Skills

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
4
Forks
0
Acompanhando
0
Saúde
42%
Último commit
há 5 meses
Versão
v1.1.0
Issues abertas
0
Contribuidores
1

Casos de uso

  • Gerar editais e documentos de licitação com layout consistente
  • Criar propostas técnicas e white papers com formatação padronizada
  • Produzir documentos governamentais (GB/T 9704) e administrativos
  • Clonar estilos, seções, cabeçalhos e rodapés de documentos de referência

Veredito

Solução robusta para automação de documentação com alto controle de formatação. Suporta chinês/ocidental nativamente e garante paginação, TOC e estilos em nível OOXML — indispensável para workflows corporativos que demandam consistência visual entre múltiplas gerações de documentos.

README

A tradução para o português deste README ainda está na fila.

Document-Cloning-Skills · docx-format-clone

A Claude Code skill that renders Markdown into strictly-formatted Word documents.

Built for repetitive high-format work: tenders, government documents (GB/T 9704), technical proposals, white papers — where you want the next document to look identical to the previous one, with only the content changed.

Two modes

ModeScriptUse when
Skeleton (most precise)scripts/build_from_skeleton.pyYou have a reference .docx whose layout you want to clone byte-for-byte. The skeleton mode keeps styles.xml / numbering.xml / theme/ / header*.xml / footer*.xml / settings.xml / page setup intact and replaces only the body.
Profilescripts/build_docx.pyNo reference doc. Pick a built-in preset (gov_gongwen / tech_doc) or feed it a profile.json extracted from a sample.

Hard guarantees (both modes)

The renderer always enforces — at the OOXML level, not via Word auto-formatting — these layout rules:

  • Cover page in its own section, vertically centered, no page number
  • Table of contents in its own section with a Word TOC field (auto-update on open)
  • Every H1 forces a page break
  • Tables: every row gets w:cantSplit (row never spans pages); first row gets w:tblHeader (repeats on each new page); table is tblLayout=fixed so Word doesn't reflow it
  • Chinese / Western fonts set independently per run (rFonts/eastAsia + rFonts/ascii) — no Word font fallback
  • Page margins / size from profile or reference

Install

git clone https://github.com/skill-mate/Document-Cloning-Skills.git \
  ~/.claude/skills/docx-format-clone

Requires Python 3.9+ and python-docx:

pip3 install python-docx

Usage inside Claude Code

Just describe the task; Claude picks up the skill from its trigger keywords:

严格按 上一份投标书.docx 的格式,生成一份新公司的投标书

Use the skeleton mode to clone last_proposal.docx and write a new tender for ABC Corp

For copy-paste prompt templates covering the three common scenarios (skeleton mode / preset mode / draft-then-render), see PROMPTS.md.

Direct CLI

# Skeleton mode — clone the reference layout
python3 scripts/build_from_skeleton.py input.md \
  --reference sample.docx -o output.docx

# Profile mode — built-in preset
python3 scripts/build_docx.py input.md \
  --preset gov_gongwen -o output.docx
# or:  --preset tech_doc

# Profile mode — custom profile extracted from a sample
python3 scripts/extract_style.py sample.docx -o profile.json
python3 scripts/build_docx.py input.md \
  --profile profile.json -o output.docx

Markdown conventions

Standard Markdown (headings / paragraphs / lists / tables / images / blockquotes / fenced code) plus a few HTML-comment directives the renderer understands:

DirectiveEffect
<!-- cover ...fields... -->Cover page (own section, vertically centered)
<!-- toc depth=3 -->TOC page (own section, with Word TOC field)
<!-- pagebreak -->Hard page break
<!-- newsection -->Hard section break (for different headers/footers)
<!-- table-caption: 表 1-1 ... -->Caption for the next table
<!-- table-widths: 2,3,5,2 -->Relative column widths for the next table
<!-- image-caption: 图 1 ... -->Caption for the next image

See examples/sample.md for a full example.

Repo layout

.
├── SKILL.md                    # Skill manifest + trigger keywords (read by Claude Code)
├── presets/
│   ├── gov_gongwen.json        # GB/T 9704 government document
│   └── tech_doc.json           # Tender / technical proposal / white paper
├── scripts/
│   ├── build_from_skeleton.py  # Skeleton mode — reference.docx + md → docx
│   ├── build_docx.py           # Profile mode — md + profile/preset → docx
│   └── extract_style.py        # reference.docx → profile.json (per-level)
└── examples/
    └── sample.md

License

MIT — see LICENSE.

Ver o original no GitHub

Bom para

Relacionados