pywin32-excel-docs

pywin32-excel-docs is a skill for Claude Code from pyxll/pyxll-agent-skills. It costs 97 tokens per session (2,053 once invoked), scanned A, original, Apache-2.0.

A reference for controlling Microsoft Excel from Python through pywin32, a library that exposes Windows application interfaces.

In plain words
What is it for?
Use it when writing or reviewing Python that works with Excel workbooks and worksheets through the COM API, including PyXLL-related code.
Why use it?
It helps verify Excel objects, methods, properties, and parameters before writing automation code.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the pyxll-agent-skills plugin — 3 skills shipped together

Good fit Use it when writing or reviewing Python that works with Excel workbooks and worksheets through the COM API, including PyXLL-related code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pyxll/pyxll-agent-skills/pywin32-excel-docs
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pyxll/pyxll-agent-skills --skill pywin32-excel-docs
Clone the repo
git clone --depth 1 https://github.com/pyxll/pyxll-agent-skills

Made for: Claude Code.

Or install pyxll-agent-skills, the plugin that ships this one along with the rest of its 3 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pywin32-excel-docs

README.md
[![agentmods](https://agentmods.dev/badge/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs/github.svg)](https://agentmods.dev/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs)
Your own site
<a href="https://agentmods.dev/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs"><img src="https://agentmods.dev/badge/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pywin32-excel-docs

Your own site · 80×15
<a href="https://agentmods.dev/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs"><img src="https://agentmods.dev/badge/skills/pyxll/pyxll-agent-skills/pywin32-excel-docs.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,053 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00097 $0.02053
Opus 5 $0.00048 $0.01026
Sonnet 5 $0.00019 $0.00411
Haiku 4.5 $0.00010 $0.00205

Measured 9d ago against content hash bf7c664b178d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

pywin32-excel-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/pywin32-excel-docs/SKILL.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Excel COM API Reference Skill

This skill provides an API reference for Microsoft Excel COM objects accessed via pywin32. It is primarily intended for use with the PyXLL Excel add-in, but applies equally to any Python code that drives Excel via COM.


Prerequisite: PyXLL Code

BEFORE writing any code that uses a PyXLL decorator, function, or config key (@xl_func, @xl_menu, @xl_macro, xl_app, pyxll.cfg, etc.) — invoke the fetch-pyxll-docs skill using the Skill tool. Do this before writing any code. PyXLL APIs are not covered by this skill; the live docs are the only authoritative source.


Rules for AI Agents

These rules are mandatory. Follow them before writing any Excel COM code.

  1. Always read the relevant reference file before using any Excel COM class. Do not rely on training-data knowledge of the Excel COM API — method signatures, parameter names, and property types must be verified from the resources/ docs. The API is large and easy to misremember.

  2. Before using any class, look it up in resources/index.md to find which file covers it, then read its section in that file. At minimum, check: which members are properties vs methods vs property accessors, and what the parameter names and types are.

  3. Never guess a method or property name. If you cannot find a member in the docs, say so rather than inventing one. COM errors from wrong names surface only at runtime.

  4. Property accessors (GetX / SetX) must be called as methods, not accessed as attributes. They appear under "Property Accessors" in the docs. Example: rng.GetOffset(1, 0) — NOT rng.Offset.

  5. Always use win32com.client.constants.<name> for enum/constant values. Never use bare integer literals for constants. The constant name (e.g. xlCenter) is the authoritative identifier; its integer value can change across Excel versions. The integer values in resources/enums_xl.md are for reference only — use the named constant, not the number.

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 174 lines · 97 tokens per session scan A bf7c664b178d

Subscribe to this mod's changes

pywin32-excel-docs is a skill published in the GitHub repository pyxll/pyxll-agent-skills (2 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 97 tokens to every session and 2,053 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.