본문으로 건너뛰기
cccskills
무료GitHub에 공개

office-script-expert

Office Scripts (Excel Online / Microsoft 365) development expert skill. Covers platform limitations, ExcelScript API patterns, testing strategy (lib + Vitest), and 13 real-world bug patterns discovered during production development. Trigger words: Office Scripts, ExcelScript, Excel Online, Office Script development, TypeScript Excel, Excel automation, CalculateRequirements, ImportCsvData

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Excel
설치 방법 보기

포함된 파일(6)

  • SKILL.md6.6 KB
  • assets/implementation_checklist.md4.5 KB
  • references/common_bug_patterns.md12.1 KB
  • references/excel_api_patterns.md8.4 KB
  • references/platform_limitations.md4.2 KB
  • references/testing_strategy.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Office Scripts Expert Skill

When to Use

  • Writing or reviewing Office Scripts (TypeScript for Excel Online)
  • Debugging runtime errors in Office Scripts
  • Setting up testable architecture for Office Scripts projects
  • Understanding ExcelScript API patterns and limitations
  • Migrating VBA macros to Office Scripts
  • Optimizing scripts to stay within 120-second timeout

Prerequisites

  • Microsoft 365 subscription with Excel Online access
  • Office Scripts enabled for the tenant (admin setting)
  • Node.js + npm (for local testing with Vitest)
  • TypeScript knowledge (Office Scripts use a TypeScript subset)

Overview

Office Scripts are TypeScript-based automation scripts for Excel on the web (Microsoft 365). They are fundamentally different from VBA and Power Automate:

AspectOffice ScriptsVBAPower Automate
LanguageTypeScript (subset)VBALow-code / expressions
RuntimeServer-side (Excel Online)Client-side (Desktop)Cloud service
Module systemNone (no import/export)ModulesConnectors
External libsNot availableCOM referencesConnectors
Timeout120 secondsNone30 min (premium)
TestingIndirect (lib extraction)ManualManual

Architecture Pattern: lib/ Extraction + Inline

Because Office Scripts cannot use import, the project uses a dual-file approach:

office_scripts/
  lib/                      # Canonical, testable source (ES modules)
    types.ts                # Interface definitions
    rounding.ts             # Rounding functions (export)
    prep-calculator.ts      # Prep calculation logic (export)
    ingredient-calculator.ts # Ingredient calculation logic (export)
    order-calculator.ts     # Order lot calculation (export)
    csv-parser.ts           # CSV parsing and header normalization (export)
  __tests__/                # Vitest unit tests
    rounding.test.ts
    prep-calculator.test.ts
    ingredient-calculator.test.ts
    order-calculator.test.ts
    csv-parser.test.ts
  CalculateRequirements.ts  # Main script (lib/* functions INLINED)
  ImportCsvData.ts          # Import script (lib/* functions INLINED)

Key rule: Edit lib/*.ts first, run tests, then copy the updated functions into the main scripts with // INLINED: lib/*.ts markers.

6 Critical Platform Constraints (P1-P6)

IDConstraintImpactWorkaround
P1No import/exportCannot share code between scriptsInline with markers
P2No external librariesNo lodash, date-fns, etc.Write from scratch
P3Map/Set for..of may failRuntime errors on iterationArray.from().forEach or indexed loop
P4120-second timeoutLarge datasets may failBatch processing, minimize API calls
P5console.log limitedNo persistent loggingUse cell writes for debug output
P6TypeScript subsetSome TS features unavailableTest in Office Scripts editor

See: references/platform_limitations.md

Reference Guide

Load these files based on your current task:

SituationReference to Load
Writing ExcelScript API code (read/write cells, sheets)references/excel_api_patterns.md
Debugging or reviewing existing codereferences/common_bug_patterns.md
Setting up or running testsreferences/testing_strategy.md
Understanding runtime constraintsreferences/platform_limitations.md
Before deploying / code reviewassets/implementation_checklist.md

Quick Reference Table

TaskPatternReference
Read sheet datagetUsedRange().getValues() + header index lookupexcel_api_patterns.md #1
Write results to sheetgetRangeByIndexes().setValues()excel_api_patterns.md #2
Protect/unprotect sheetunprotect() -> write -> protect()excel_api_patterns.md #3
Parse CSV inputDual-mode: single-cell text vs cell gridexcel_api_patterns.md #7
Section-based sheet parsingcurrentSection + currentHeaders state machineexcel_api_patterns.md #6
Clear data without destroying headersPre-locate section positions, clear data rows onlyexcel_api_patterns.md #8
Convert Excel datesexcelDateToJsDate(serial)excel_api_patterns.md #4
Sheet name with spaces in formulasQuote: 'Sheet Name'!A1excel_api_patterns.md #5
Iterate Map/SetArray.from(map.entries()) + indexed for loopplatform_limitations.md P3
Rounding to match PythonroundHalfEven2 / roundUp2 / roundUp4 / roundDown4excel_api_patterns.md #9
Test pure logiclib/*.ts with Vitesttesting_strategy.md
Pre-deploy reviewImplementation checklistimplementation_checklist.md

Workflow

  1. Understand requirements — Identify what data to read/write, which sheets, and any automation triggers
  2. Check platform constraints — Review P1-P6 constraints; confirm no external libraries needed
  3. Design with lib/ extraction — Write pure logic in lib/*.ts for testability
  4. Implement and test locally — Use Vitest to test lib/*.ts functions
  5. Inline into main script — Copy tested functions into .ts script with // INLINED: markers
  6. Test in Excel Online — Run the script in the Office Scripts editor
  7. Review with checklist — Use assets/implementation_checklist.md before deployment

Resources

TypePathPurpose
Referencereferences/platform_limitations.md6 critical platform constraints
Referencereferences/excel_api_patterns.mdExcelScript API patterns and examples
Referencereferences/common_bug_patterns.md13 real-world bug patterns
Referencereferences/testing_strategy.mdlib extraction + Vitest setup
Assetassets/implementation_checklist.mdPre-deployment review checklist

Output

This is an advisory/knowledge skill. Output is conversational guidance — no files are generated. The skill provides:

  • Code patterns and examples for Office Scripts development
  • Debugging assistance and bug pattern identification
  • Architecture recommendations for testable code
  • API usage guidance based on reference documentation

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Track and update action item status from natural language updates like 'Seanのメールには返信しておいた' or 'Lu対応予定'. Integrates with daily-comms-ops workflow. Use when managing action items across communication channels.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

AI活用提案の専門コンサルタントスキル。LLM・AIエージェントの活用事例知識を基に、業界別、部門別、シーン別に最適なAI導入提案を行います。システム化、業務改善、効率化を得意とし、具体的な活用事例、期待効果、導入ステップを含む実践的な提案を提供します。Use when proposing AI/LLM adoption strategies for specific industries, departments, or business scenarios.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

Generate AI-powered BPO service proposals for Japanese companies in the US market. Use when creating outsourcing proposals with AI service menus, ROI estimation, implementation roadmaps, and bilingual (JA/EN) proposal documents for 在米日系企業向けAI実装.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

AI(LLM)が生成した日本語テキストの「AI臭」を検出・診断し、人間らしい文章にリライトするスキル。 Use when: 「AIっぽい文章を直して」「人間らしくリライトして」「AI臭を消して」「この文章をもっと自然にして」 「テキストのAI感を減らして」「機械っぽさを取りたい」 "make this sound more human", "remove AI tone", "humanize this text", "detect if this is AI-generated". 6つのAI特有パターン(視覚的マーカー、単調なリズム、マニュアル的構成、非コミット姿勢、抽象語の濫用、 定型メタファー)を正規表現ベースで検出し、0-100のAI臭スコアを算出。3つの人間化技法 (バランスを崩す・客観を崩す・論理を崩す)でリライトを実行する。 Note: 検出スクリプトは日本語テキスト専用。英語テキストの場合はClaude自身がreferences/を参照して分析・リライトする。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

Generate audit-ready internal control design documents from As-Is business process inventories. Produces control IDs, assertion mappings, procedures, SoD analysis, KPIs, materiality thresholds, and implementation roadmaps. Use when building internal controls for new audit engagements, SOX/J-SOX compliance, or process improvement initiatives.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

Review audit-related documents (control design documents, bottleneck analyses, requirements definitions, etc.) for quality, scoring them 0-100 with a severity-rated findings list. Use when reviewing audit documents, checking control design quality, or verifying cross-document consistency. Supports documents governed by US GAAP, IFRS, or J-GAAP.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 5일 업데이트

takusaotome의 스킬 모두 보기

이 스킬의 문제 신고