Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

md-to-office医学博士到办公室

Agent Skill

md-to-office 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

21,347

周安装

872

GitHub Stars

89

下载量

6,836
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:md-to-office(医学博士到办公室)
来源仓库:https://github.com/claude-office-skills/skills
仓库路径:skills/md-to-office
安装命令:
npx skills add https://github.com/claude-office-skills/skills --skill md-to-office
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/claude-office-skills/skills --skill md-to-office

简介

用于处理 GitHub 仓库、Issue 和 Pull Request 协作信息。

  • 适合围绕代码变更或仓库状态进行整理分析。md-to-office 属于开发类 Skill,可作为该场景下的辅助能力补充。
  • 通过 GitHub 安装,建议核验权限范围和命令执行风险。
  • 使用前应确认维护状态及是否会触发网络请求。
  • 可结合原始 README 了解具体操作流程。

SKILL.md

Markdown to Office Skill

Overview

This skill enables conversion from Markdown to various Office formats using Pandoc - the universal document converter. Convert your Markdown files to professional Word documents, PowerPoint presentations, PDFs, and more while preserving formatting and structure.

How to Use

  1. Provide the Markdown content or file
  2. Specify the target format (docx, pptx, pdf, etc.)
  3. Optionally provide a reference template for styling
  4. I'll convert using Pandoc with optimal settings

Example prompts:

  • "Convert this README.md to a professional Word document"
  • "Turn my markdown notes into a PowerPoint presentation"
  • "Generate a PDF from this markdown with custom styling"
  • "Create a Word doc from this markdown using company template"

Domain Knowledge

Pandoc Fundamentals

# Basic conversion
pandoc input.md -o output.docx
pandoc input.md -o output.pdf
pandoc input.md -o output.pptx

# With template
pandoc input.md --reference-doc=template.docx -o output.docx

# Multiple inputs
pandoc ch1.md ch2.md ch3.md -o book.docx

Supported Conversions

FromToCommand
MarkdownWordpandoc in.md -o out.docx
MarkdownPDFpandoc in.md -o out.pdf
MarkdownPowerPointpandoc in.md -o out.pptx
MarkdownHTMLpandoc in.md -o out.html
MarkdownLaTeXpandoc in.md -o out.tex
MarkdownEPUBpandoc in.md -o out.epub

Markdown to Word (.docx)

Basic Conversion

pandoc document.md -o document.docx

With Template (Reference Doc)

# First create a template by converting sample
pandoc sample.md -o reference.docx

# Edit reference.docx styles in Word, then use it
pandoc input.md --reference-doc=reference.docx -o output.docx

With Table of Contents

pandoc document.md --toc --toc-depth=3 -o document.docx

With Metadata

pandoc document.md \
  --metadata title="My Report" \
  --metadata author="John Doe" \
  --metadata date="2024-01-15" \
  -o document.docx

Markdown to PDF

Via LaTeX (Best Quality)

# Requires LaTeX installation
pandoc document.md -o document.pdf

# With custom settings
pandoc document.md \
  --pdf-engine=xelatex \
  -V geometry:margin=1in \
  -V fontsize=12pt \
  -o document.pdf

Via HTML/wkhtmltopdf

pandoc document.md \
  --pdf-engine=wkhtmltopdf \
  --css=style.css \
  -o document.pdf

PDF Options

pandoc document.md \
  -V papersize:a4 \
  -V geometry:margin=2cm \
  -V fontfamily:libertinus \
  -V colorlinks:true \
  --toc \
  -o document.pdf

Markdown to PowerPoint (.pptx)

Basic Conversion

pandoc slides.md -o presentation.pptx

Markdown Structure for Slides

---
title: Presentation Title
author: Author Name
date: January 2024
---

# Section Header (creates section divider)

## Slide Title

- Bullet point 1
- Bullet point 2
  - Sub-bullet

## Another Slide

Content here

::: notes
Speaker notes go here (not visible in slides)
:::

## Slide with Image

![Description](image.png){width=80%}

## Two Column Slide

:::::::::::::: {.columns}
::: {.column width="50%"}
Left column content
:::

::: {.column width="50%"}
Right column content
:::
::::::::::::::

With Template

# Use corporate PowerPoint template
pandoc slides.md --reference-doc=template.pptx -o presentation.pptx

YAML Frontmatter

Add metadata at the top of your Markdown:

---
title: "Document Title"
author: "Author Name"
date: "2024-01-15"
abstract: "Brief description"
toc: true
toc-depth: 2
numbersections: true
geometry: margin=1in
fontsize: 11pt
documentclass: report
---

# First Chapter
...

Python Integration

import subprocess
import os

def md_to_docx(input_path, output_path, template=None):
    """Convert Markdown to Word document."""
    cmd = ['pandoc', input_path, '-o', output_path]

    if template:
        cmd.extend(['--reference-doc', template])

    subprocess.run(cmd, check=True)
    return output_path

def md_to_pdf(input_path, output_path, **options):
    """Convert Markdown to PDF with options."""
    cmd = ['pandoc', input_path, '-o', output_path]

    if options.get('toc'):
        cmd.append('--toc')

    if options.get('margin'):
        cmd.extend(['-V', f"geometry:margin={options['margin']}"])

    subprocess.run(cmd, check=True)
    return output_path

def md_to_pptx(input_path, output_path, template=None):
    """Convert Markdown to PowerPoint."""
    cmd = ['pandoc', input_path, '-o', output_path]

    if template:
        cmd.extend(['--reference-doc', template])

    subprocess.run(cmd, check=True)
    return output_path

pypandoc (Python Wrapper)

import pypandoc

# Simple conversion
output = pypandoc.convert_file('input.md', 'docx', outputfile='output.docx')

# With options
output = pypandoc.convert_file(
    'input.md',
    'docx',
    outputfile='output.docx',
    extra_args=['--toc', '--reference-doc=template.docx']
)

# From string
md_content = "# Hello\n\nThis is markdown."
output = pypandoc.convert_text(md_content, 'docx', format='md', outputfile='output.docx')

Best Practices

  1. Use Templates: Create a reference document for consistent branding
  2. Structure Headers: Use consistent heading levels (## for slides, # for sections)
  3. Test Incrementally: Convert small sections first to verify formatting
  4. Include Metadata: Use YAML frontmatter for document properties
  5. Handle Images: Use relative paths and specify dimensions

Common Patterns

Batch Conversion

import subprocess
from pathlib import Path

def batch_convert(input_dir, output_format, output_dir=None):
    """Convert all markdown files in a directory."""
    input_path = Path(input_dir)
    output_path = Path(output_dir) if output_dir else input_path

    for md_file in input_path.glob('*.md'):
        output_file = output_path / md_file.with_suffix(f'.{output_format}').name
        subprocess.run([
            'pandoc', str(md_file), '-o', str(output_file)
        ], check=True)
        print(f"Converted: {md_file.name} -> {output_file.name}")

batch_convert('./docs', 'docx', './output')

Report Generator

def generate_report(title, sections, output_path, template=None):
    """Generate Word report from structured data."""

    # Build markdown
    md_content = f"""---
title: "{title}"
date: "{datetime.now().strftime('%B %d, %Y')}"
---

"""
    for section_title, content in sections.items():
        md_content += f"# {section_title}\n\n{content}\n\n"

    # Write temp file
    with open('temp_report.md', 'w') as f:
        f.write(md_content)

    # Convert
    cmd = ['pandoc', 'temp_report.md', '-o', output_path, '--toc']
    if template:
        cmd.extend(['--reference-doc', template])

    subprocess.run(cmd, check=True)
    os.remove('temp_report.md')

Examples

Example 1: Technical Documentation

import subprocess

# Create comprehensive markdown
doc = """---
title: "API Documentation"
author: "Dev Team"
date: "2024-01-15"
toc: true
toc-depth: 2
---

# Introduction

This document describes the REST API for our service.

## Authentication

All API requests require an API key in the header:

Authorization: Bearer YOUR_API_KEY

## Endpoints

### GET /users

Retrieve all users.

**Response:**

| Field | Type | Description |
|-------|------|-------------|
| id | integer | User ID |
| name | string | Full name |
| email | string | Email address |

### POST /users

Create a new user.

**Request Body:**

{ "name": "John Doe", "email": "john@example.com" }


## Error Codes

| Code | Meaning |
| --- | --- |
| 400 | Bad Request |
| 401 | Unauthorized |
| 404 | Not Found |
| 500 | Server Error |
| """ |  |

# Save markdown

with open('api_docs.md', 'w') as f: f.write(doc)

# Convert to Word

subprocess.run(['pandoc', 'api_docs.md', '-o', 'api_documentation.docx', '--toc', '--reference-doc', 'company_template.docx'], check=True)

# Convert to PDF

subprocess.run(['pandoc', 'api_docs.md', '-o', 'api_documentation.pdf', '--toc', '-V', 'geometry:margin=1in', '-V', 'fontsize=11pt'], check=True)

Example 2: Presentation from Markdown

slides_md = """---
title: "Q4 Business Review"
author: "Sales Team"
date: "January 2024"
---

# Overview

## Agenda

- Q4 Performance Summary
- Regional Highlights
- 2024 Outlook
- Q&A

# Q4 Performance

## Key Metrics

- Revenue: $12.5M (+15% YoY)
- New Customers: 250
- Retention Rate: 94%

## Regional Performance

:::::::::::::: {.columns}
::: {.column width="50%"}
**North America**

- Revenue: $6.2M
- Growth: +18%
:::

::: {.column width="50%"}
**Europe**

- Revenue: $4.1M
- Growth: +12%
:::
::::::::::::::

# 2024 Outlook

## Strategic Priorities

1. Expand APAC presence
2. Launch new product line
3. Improve customer onboarding

## Revenue Targets

| Quarter | Target |
|---------|--------|
| Q1 | $13M |
| Q2 | $14M |
| Q3 | $15M |
| Q4 | $16M |

# Thank You

## Questions?

Contact: sales@company.com
"""

with open('presentation.md', 'w') as f:
    f.write(slides_md)

subprocess.run([
    'pandoc', 'presentation.md',
    '-o', 'q4_review.pptx',
    '--reference-doc', 'company_slides.pptx'
], check=True)

Limitations

  • Complex Word formatting may not convert perfectly
  • PDF conversion requires LaTeX or wkhtmltopdf
  • PowerPoint animations not supported
  • Some advanced tables may need manual adjustment
  • Image positioning can be tricky

Installation

# macOS
brew install pandoc

# Ubuntu/Debian
sudo apt-get install pandoc

# Windows
choco install pandoc

# Python wrapper
pip install pypandoc

Resources

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.8%
按下载量换算2,516

Claude

30.34%
按下载量换算2,074

Cursor

19.27%
按下载量换算1,317

Gemini CLI

9.36%
按下载量换算640

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills