Communitygithub.com

bg-szy/TOP-SKILLS

Word文書(.docx)やテンプレート(.dotx)の作成、読み取り、編集、操作に関するスキルです。レポート、メモ、手紙、テンプレートなどの文書作成を支援します。

TOP-SKILLS とは?

このスキルは、Word文書(.docx)やWordテンプレート(.dotx)の作成、編集、読み取り、操作を専門的に行います。ユーザーが「Word文書」「.docx」「レポート」「メモ」「テンプレート」などと言及した際に自動的に起動し、プロフェッショナルな書式設定(目次、見出し、ページ番号、レターヘッドなど)を施した文書を生成します。内部では、文書作成にはnpmパッケージ`docx`を使用し、既存文書の編集には`unzip`→XML編集→`zip`のワークフロー、内容読み取りには`pandoc`を活用します。対応プラットフォームはClaude Code, Cursor, CodexなどのAIエージェント環境です。画像の挿入・置換、検索置換、変更履歴やコメントの操作にも対応しており、Word文書に関わるあらゆるタスクをカバーします。ただし、PDF、スプレッドシート、Googleドキュメント、一般的なコーディングタスクには使用しません。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/bg-szy/TOP-SKILLS/tree/HEAD/skills/skills/docx

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

DOCXの作成、編集、解析

.docxはXMLファイルのZIPアーカイブです。タスクに応じたアプローチを選択してください:

タスクアプローチ
新規文書の作成docx(npm)スクリプトを作成 — 以下の注意事項を参照
既存文書の編集unzip → word/document.xmlを編集 → zip(docx-jsは既存ファイルを開けません)
内容の読み取りpandoc -t markdown file.docx

以下のスクリプトパスは、このスキルのディレクトリからの相対パスです。

docx-jsによる作成 — 注意事項

docxはプリインストールされています — npm installを先に実行しないでください。スクリプトを書き、直接require('docx')してください。それでrequireが失敗した場合のみ:npm install docxを実行してください。モデルはAPIを理解していますが、以下の落とし穴があります:

  • ページサイズのデフォルトはA4です。 USレターの場合はpage: { size: { width: 12240, height: 15840 } }と設定してください(DXA; 1440 = 1″)。
  • 横向き: 縦向きの寸法とorientation: PageOrientation.LANDSCAPEを渡してください — docx-jsは内部で幅/高さを入れ替えます。
  • テーブルには二重の幅設定が必要: テーブルにcolumnWidthsを設定し、さらにすべてのセルにwidthを設定します。どちらもWidthType.DXAで指定します(PERCENTAGEはGoogleドキュメントで壊れます)。列幅の合計がテーブル幅と一致する必要があります。
  • テーブルの網掛け: ShadingType.CLEARを使用し、SOLIDは絶対に使わないでください(黒くレンダリングされます)。
  • リスト: 決して•を直接挿入しないでください。代わりにLevelFormat.BULLETを使用したnumbering設定を使用してください。
  • ImageRunにはtype:が必要("png"、"jpg"、…)。
  • PageBreakは必ずParagraphの内部に配置します。
  • \nは絶対に使用しない — 代わりに個別のParagraph要素を使用してください。
  • 目次: 見出しには組み込みのHeadingLevel.*を使用する必要があります。カスタム見出しスタイルにはoutlineLevelを設定しないと目次に表示されません。
  • テーブルを水平線として使用しない — 代わりに段落の下罫線を使用してください。
  • ドットリーダー / 同一行右揃え: TextRun内でPositionalTab(alignment: PositionalTabAlignment.RIGHT、leader: PositionalTabLeader.DOT)を使用します。リテラルの.や空白のパディングは使わないでください。

出力の検証

.docxを書き終えたら、それをレンダリングして確認してください:

python scripts/office/soffice.py --headless --convert-to pdf output.docx
pdftoppm -jpeg -r 100 output.pdf page
ls page-*.jpg   # その後画像を読み取ってください

pdftoppmはページ番号をページ数に合わせてゼロパディングします(page-01.jpg…page-12.jpg)。

既存文書の編集

レガシーな.docファイルは最初に変換する必要があります: python scripts/office/soffice.py --headless --convert-to docx file.doc

unzip -q doc.docx -d unpacked/
find unpacked -type l -delete   # シンボリックリンクエントリを削除 — 外部からのdocxは信頼できません
python scripts/merge_runs.py unpacked/   # 断片化されたランを結合し、テキストを検索可能にします
# unpacked/word/document.xml をその場で編集 — フォーマットやプリティプリントはしないでください
(cd unpacked && rm -f ../out.docx && zip -Xr ../out.docx .)
python scripts/office/validate.py out.docx --original doc.docx   # XSDチェック; --auto-repairで一般的な問題を修正
# 変更履歴の確認? --author "<変更を記録した名前>" を追加して、すべての編集が追跡されているか確認します

Wordはテキストを多数の<w:r>ラン(リビジョンID、スペルチェックマーカー)に分割するため、文書上で見えるフレーズがXML内で連続した文字列として存在しないことがよくあります。merge_runs.pyはword/document.xml内の隣接する同一書式のランを、内容やレンダリングを変更せずに結合します。また、.docxを直接受け付けることもできます(python scripts/merge_runs.py doc.docx -o merged.docx)。

変更履歴(変更箇所の追跡): 変更箇所を記録するときは、--author "<変更を記録した名前>"(--originalが必要)で検証してください — <w:ins>/<w:del>で囲まれていないテキスト変更があると報告します。これはうっかり見落としやすく、承認済みビューでは見えません。ランを<w:ins>/<w:del>で囲み、w:id、w:author、w:date属性を付けてください。<w:del>内部では、テキスト要素は<w:t>ではなく<w:delText>です。削除された段落記号(<w:pPr><w:rPr><w:del w:id=".." w:author=".." w:date=".."/></w:rPr></w:pPr>)は「この段落を次の段落に結合する」ことを意味します — 段落全体を削除するには、これに加えてすべてのランを<w:del>で囲みます。<w:del/>はrPrの他の子要素より前に置く必要があります。これらの順序はスキーマで強制されています。

変更履歴をすべて承認したクリーンなコピーを作成するには: python scripts/accept_changes.py in.docx out.docx

削除された段落記号を承認すると、その段落を下の段落に結合する必要があります。したがって、すべてのランが削除された段落は消滅します。Wordはこれを行いますが、accept_changes.pyとpandoc --track-changes=acceptは常にそうとは限りません。どちらも同じように失敗します — 削除されたテキストは取り除かれますが、空になった段落が残り、自動番号が付いている場合は不意の空の箇条書きとして読み取られます:

  • pandoc --track-changes=acceptは決して段落を結合しません。
  • accept_changes.py(LibreOffice)は正しく結合します。ただし、削除された段落の後に空のスペーサー段落が続く場合を除きます。

どちらのビューでも空の箇条書きはそのビューのアーティファクトであり、文書の欠陥ではありません。段落の削除はXMLで確認してください。

コメント

コメントには6つの相互に関連するファイルが必要です。ヘルパーを使用してください — ディレクトリモード(document.xmlも編集する場合におすすめで、unzip/rezipのサイクルを節約できます)と、.docx直接モードがあります:

# すでに展開されたディレクトリに対して(マーカーも配置する場合に推奨)
python scripts/comment.py unpacked/ "手数料と経費の上限が低すぎます"
python scripts/comment.py unpacked/ "同意" --parent 0

# .docxに対して直接
python scripts/comment.py contract.docx "この上限は低すぎます" -o annotated.docx

このスクリプトはcomments.xml、commentsExtended.xml、commentsIds.xml、commentsExtensible.xml、リレーションシップ、およびコンテンツタイプオーバーライドを書き込みます。コメントIDは自動割り当てされます。その後、word/document.xmlに追加する<w:commentRangeStart>/<w:commentRangeEnd>/<w:commentReference>スニペットを出力します。これによりコメントが特定のテキストにアンカーされます。これらのマーカーを配置するまで、コメントは存在しますが表示されません。

依存関係

docx(npm、プリインストール — require('docx')が失敗した場合のみインストール) · pandoc · LibreOffice(soffice) · pdftoppm(Poppler)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

bg-szy/TOP-SKILLS

Brand-first landing page designer — runs a brand-identity interview (colors, typography, shape language), then generates and iterates on a polished landing page via Stitch with deployment-ready HTML. Use when the user asks to create, design, or build a landing page, homepage, or marketing page and has no established visual direction. Skip when they have a design mockup, need a dashboard or app UI, are working at component level, building a multi-page app, or restyling with known design tokens — use frontend-design instead.

bg-szy/TOP-SKILLS

Fill out Microsoft Azure Landing Zone (ALZ) Accelerator checklists by interviewing the user, mapping their Azure subscriptions, integrating IP addressing documentation, and applying Microsoft Cloud Adoption Framework best practices. Produces a completed Excel checklist (.xlsx) ready for ALZ deployment. Use this skill whenever the user mentions Azure Landing Zone, ALZ checklist, landing zone accelerator, platform landing zone configuration, ALZ bootstrap, hub-and-spoke setup, Azure network topology planning, or wants to fill out any ALZ-related checklist or configuration file. Also trigger when the user uploads an Excel file that contains tabs like "Accelerator - Bootstrap", "Accelerator - Bicep", or "Accelerator - Terraform".

bg-szy/TOP-SKILLS

Compose a premium, animated landing page section by section in Next.js + Tailwind + Motion (Framer Motion) — built on a real design system, with editorial copy and motion that feels human-crafted, not template-generated. Use when building or rebuilding a landing page, marketing site, or hero/feature/pricing/CTA sections that need to look production-ready and bespoke from day one.

bg-szy/TOP-SKILLS

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

bg-szy/TOP-SKILLS

Optimize landing pages for conversions, performance, and SEO. Use when improving landing pages, increasing conversions, or optimizing page performance.

bg-szy/TOP-SKILLS

Review investment portfolios for risk, diversification, fees. Asset allocation recommendations, tax-loss harvesting, rebalancing.

bg-szy/TOP-SKILLS

Beads Viewer - Graph-aware triage engine for Beads projects. Computes PageRank, betweenness, critical path, and cycles. Use --robot-* flags for AI agents.

bg-szy/TOP-SKILLS

CI red? Call us. Pipeline fire brigade deploys. Use when user mentions CI failures, build errors, test failures, or pipeline issues. Do NOT load for: local builds, standard implementation work, reviews, or setup.

bg-szy/TOP-SKILLS

CASS Memory System - procedural memory for AI coding agents. Three-layer cognitive architecture with confidence decay, anti-pattern learning, cross-agent knowledge transfer, trauma guard safety system. Bun/TypeScript CLI.

bg-szy/TOP-SKILLS

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

bg-szy/TOP-SKILLS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

bg-szy/TOP-SKILLS

Use when the user asks to "pre-launch check the landing page", "run a Quality-Score preflight", or "verify ad-to-page message match before launch"; produces an ad↔page continuity report — message-match gaps, above-the-fold check, page-speed read, form-friction count, mobile-render flags — as a pass/fix punch list. Not for redesigning or rewriting the page — use landing-optimizer; not for scoring the account or the RQS — use ad-account-auditor. 落地页体验预检/广告落地页一致性检查

bg-szy/TOP-SKILLS

Use when the user asks to "optimize our landing page for influencer traffic", "fix our promo-code landing page", or "improve conversion from a creator campaign"; produces a message-match audit, page-structure and social-proof recommendations, a promo-code/CTA conversion plan, and an A/B test roadmap. Not for measuring campaign results after launch — use performance-analyzer.

bg-szy/TOP-SKILLS

Audit a landing page, sales page or checkout page for conversion leaks and return a fix list ordered by expected revenue impact. Use when asked to review, critique or improve a landing page, sales page, opt-in page, product page or checkout flow, when conversion rate is low, when paid traffic is not converting, or when someone asks "why isn't this page converting" or wants a CRO / landing page review.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

bg-szy/TOP-SKILLS

Landing page conversion optimization with layout rules, hero section design, and CTA psychology. Covers above-the-fold formula, social proof placement, mobile design, and F-pattern reading. Use for: startup landing pages, product pages, SaaS marketing, conversion optimization. Triggers: landing page, hero section, above the fold, conversion optimization, landing page design, cta button, hero image, landing page layout, saas landing page, product page design, conversion rate, landing page best practices

bg-szy/TOP-SKILLS

Account assets, equity and fund positions, P&L, cash flow records, account statements, margin ratios, buy-power estimates, order management, and DCA recurring investments via Longbridge (most require Trade permission). Frameworks: portfolio diagnosis, rebalancing, asset allocation, risk analysis (VaR/CVaR), performance attribution, and tax-loss harvesting. Triggers: "持仓", "账户", "盈亏", "资产", "对账单", "下单", "买入", "卖出", "撤单", "定投", "组合诊断", "再平衡", "资产配置", "风险分析", "绩效归因", "税损收割", "持倉", "賬戶", "盈虧", "對賬單", "下單", "買入", "賣出", "組合診斷", "再平衡", "稅損收割", "positions", "portfolio", "P&L", "order", "buy", "sell", "DCA", "statement", "risk analysis", "rebalancing", "tax harvesting", "我的风险", "持仓风险", "风险敞口", "資產", "資產配置", "風險分析", "績效歸因", "撤單

bg-szy/TOP-SKILLS

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

bg-szy/TOP-SKILLS

Process video files with audio extraction, format conversion (mp4, webm), and Whisper transcription. Use when user mentions video conversion, audio extraction, transcription, mp4, webm, ffmpeg, or whisper transcription.

関連スキル