sharepoint-word-docs
$
npx mdskill add openai/plugins/sharepoint-word-docsEdit SharePoint-hosted Word .docx files while preserving document structure and styling for real updates.
- Helps update Word documents in SharePoint without converting them to plain text.
- Integrates with SharePoint for file handling and uses python-docx for local editing.
- Decides based on verifying file details and ensuring formatting preservation before changes.
- Delivers results by uploading revised files and verifying text and styling integrity.
SKILL.md
.github/skills/sharepoint-word-docsView on GitHub ↗
--- name: sharepoint-word-docs description: Edit SharePoint-hosted Word `.docx` files while preserving document structure and styling. Use when the user wants to update a real Word document in SharePoint rather than summarize it as plain text. --- # SharePoint Word Docs ## Overview Use this skill for `.docx` edits that start from SharePoint. Treat the file as a real Word package, not as extracted text, and preserve the existing document structure and styling unless the user explicitly accepts formatting loss. ## Core Workflow 1. Search for the file and identify the exact target by title, path, and file type. 2. Fetch extracted text once to verify it is the right document and to locate the target section. 3. Fetch the raw `.docx` with `fetch(download_raw_file=true)` before editing. 4. Edit locally with `python-docx` or equivalent OOXML-aware local tooling so the original Word package remains intact. 5. Ensure that the upload path can preserve a normal styled Word package before overwriting the original. 6. Write the revised file back with `update_file` using the exact drive-root-relative path from SharePoint metadata. 7. Re-fetch and verify both: - the intended text or section change - the expected structure or styling when possible ## Safety - Do not replace a styled `.docx` with plain text output. - Do not replace a styled `.docx` with a minimal regenerated package merely to make upload succeed unless formatting loss is already acceptable from the request context. - Treat inline base64 binary upload as potentially brittle for richer `.docx` packages. If the write path looks unsafe, stop and explain the formatting risk rather than silently degrading the file. - If the first overwrite attempt returns `itemNotFound`, inspect the folder items and use the exact root-relative path from SharePoint metadata. ## Verification - Content verification alone is not enough for existing styled documents. - Check heading structure, spacing, and style preservation when possible. - If you can only validate text content, say so explicitly and note the remaining formatting risk.
More from openai/plugins
- accessibility-and-inclusive-visualizationMake data visualizations accessible and inclusive. Use when the user needs chart or diagram accessibility guidance, text alternatives for complex visuals, color and contrast review, keyboard support, reduced-motion behavior for animation or parallax, or an accessibility QA workflow for exported figures, UML-like diagrams, and dashboards.
- agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, verify dev server output, test web apps, navigate pages, fill forms, click buttons, take screenshots, extract data, or automate any browser task. Also triggers when a dev server starts so you can verify it visually.
- agent-browser-verifyAutomated browser verification for dev servers. Triggers when a dev server starts to run a visual gut-check with agent-browser — verifies the page loads, checks for console errors, validates key UI elements, and reports pass/fail before continuing.
- agents-sdkBuild AI agents on Cloudflare Workers using the Agents SDK. Load when creating stateful agents, durable workflows, real-time WebSocket apps, scheduled tasks, MCP servers, or chat applications. Covers Agent class, state management, callable RPC, Workflows integration, and React hooks. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.
- ai-elementsAI Elements component library guidance — pre-built React components for AI interfaces built on shadcn/ui. Use when building chat UIs, message displays, tool call rendering, streaming responses, reasoning panels, or any AI-native interface with the AI SDK.
- ai-gatewayVercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.
- ai-generation-persistenceAI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation
- ai-sdkVercel AI SDK expert guidance. Use when building AI-powered features — chat interfaces, text generation, structured output, tool calling, agents, MCP integration, streaming, embeddings, reranking, image generation, or working with any LLM provider.
- aiq-deploy|
- aiq-research|