Confirm successful installation by checking the skill directory location:
.cursor/skills/excel-cli
Restart Cursor to activate excel-cli. Access via /excel-cli in your agent's command palette.
β
Security Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your environment. Always review source, verify the publisher, and test in isolation before production.
10+ commands? Use excelcli -q batch --input commands.json β sends all commands in one process with automatic session management. See Rule 8.
Writing Data (Step 3):
--values takes a JSON 2D array string: --values '[["Header1","Header2"],[1,2]]'
Write one row at a time for reliability: --range-address A1:B1 --values '[["Name","Age"]]'
Strings MUST be double-quoted in JSON: "text". Numbers are bare: 42
Always wrap the entire JSON value in single quotes to protect special characters
CRITICAL RULES (MUST FOLLOW)
β‘ Building dashboards or bulk operations? Skip to Rule 8: Batch Mode β it eliminates per-command process overhead and auto-manages session IDs.
Rule 1: NEVER Ask Clarifying Questions
Execute commands to discover the answer instead:
DON'T ASK
DO THIS INSTEAD
"Which file should I use?"
excelcli -q session list
"What table should I use?"
excelcli -q table list --session <id>
"Which sheet has the data?"
excelcli -q worksheet list --session <id>
You have commands to answer your own questions. USE THEM.
Rule 2: Always End With a Text Summary
NEVER end your turn with only a command execution. After completing all operations, always provide a brief text message confirming what was done. Silent command-only responses are incomplete.
Rule 3: Session Lifecycle
Creating vs Opening Files:
# NEW file - use session createexcelcli -q session create C:\path\newfile.xlsx # Creates file + returns session ID# EXISTING file - use session openexcelcli -q session open C:\path\existing.xlsx # Opens file + returns session ID
CRITICAL: Use session create for new files. session open on non-existent files will fail!
CRITICAL: ALWAYS use the session ID returned by session create or session open in subsequent commands. NEVER guess or hardcode session IDs. The session ID is in the JSON output (e.g., {"sessionId":"abc123"}). Parse it and use it.
# Example: capture session ID from output, then use itexcelcli -q session create C:\path\file.xlsx # Returns JSON with sessionIdexcelcli -q range set-values--session <returned-session-id> ...excelcli -q session close --session <returned-session-id> --save
BEST PRACTICE: Test M code before creating permanent queries
# Step 1: Create/open a session and capture the session ID$session = excelcli -q session create C:\path\file.xlsx |ConvertFrom-Json$sessionId = $session.sessionId
# Step 2: Test M code without persisting (catches errors early)excelcli -q powerquery evaluate --session $sessionId--m-code-file query.m
# Step 3: Create permanent query with validated codeexcelcli -q powerquery create --session $sessionId--query-name Q1 --m-code-file query.m
# Step 4: Load data to destinationexcelcli -q powerquery refresh --session $sessionId--query-name Q1
# Step 5: Close sessionexcelcli -q session close --session $sessionId--save
Rule 6: Report File Errors Immediately
If you see "File not found" or "Path not found" - STOP and report to user. Don't retry.
Rule 7: Use Calculation Mode for Bulk Writes
When writing many values/formulas (10+ cells), disable auto-recalc for performance:
# 1. Create/open a session and capture the session ID$session = excelcli -q session create C:\path\file.xlsx |ConvertFrom-Json$sessionId = $session.sessionId
# 2. Set manual modeexcelcli -q calculationmode set-mode--session $sessionId--mode manual
# 3. Write data row by row for reliabilityexcelcli -q range set-values--session $sessionId--sheet-name Sheet1 --range-address A1:B1 --values '[["Name","Amount"]]'excelcli -q range set-values--session $sessionId--sheet-name Sheet1 --range-address A2:B2 --values '[["Salary",5000]]'# 4. Recalculate once at endexcelcli -q calculationmode calculate --session $sessionId--scope workbook
# 5. Restore automatic modeexcelcli -q calculationmode set-mode--session $sessionId--mode automatic
# 6. Close sessionexcelcli -q session close --session $sessionId--save
Rule 8: Use Batch Mode for Bulk Operations (10+ commands)
When executing 10+ commands on the same file, use excelcli batch to send all commands in a single process launch. This avoids per-process startup overhead and terminal buffer saturation.
Session auto-capture: session.open/create result sessionId auto-injected into subsequent commands β no need to parse and pass session IDs
NDJSON output: One JSON result per line: {"index": 0, "command": "...", "success": true, "result": {...}}
--stop-on-error: Exit on first failure (default: continue all)
--session <id>: Pre-set session ID for all commands (skip session.open)
Input formats:
JSON array from file: excelcli -q batch --input commands.json
NDJSON from stdin: Get-Content commands.ndjson | excelcli -q batch
CLI Command Reference
Auto-generated from excelcli --help. Use these exact parameter names.
calculationmode
Control Excel recalculation (automatic vs manual). Set manual mode before bulk writes for faster performance, then recalculate once at the end.
Actions:get-mode, set-mode, calculate
Parameter
Description
--mode
Target calculation mode (required for: set-mode)
--scope
Scope: Workbook, Sheet, or Range (required for: calculate)
--sheet-name
Sheet name (required for Sheet/Range scope)
--range-address
Range address (required for Range scope)
chart
Chart lifecycle - create, read, move, and delete embedded charts. POSITIONING (choose one): - targetRange (PREFERRED): Cell range like 'F2:K15' β positions chart within cells, no point math needed. - left/top: Manual positioning in points (72 points = 1 inch). - Neither: Auto-positions chart below all existing content (used range + other charts). COLLISION DETECTION: All create/move/fit-to-range operations automatically check for overlaps with data and other charts. Warnings are returned in the result message if collisions are detected. Always verify layout with screenshot(capture-sheet) after creating charts. CHART TYPES: 70+ types available including Column, Line, Pie, Bar, Area, XY Scatter. CREATE OPTIONS: - create-from-range: Create from cell range (e.g., 'A1:D10') - create-from-table: Create from Excel Table (uses table's data range) - create-from-pivottable: Create linked PivotChart Use chartconfig for series, titles, legends, styles, placement mode.
Name of the chart (or shape name) (required for: read, delete, move, fit-to-range)
--sheet-name
Target worksheet name (required for: create-from-range, create-from-table, create-from-pivottable, fit-to-range)
--source-range-address
Data range for the chart (e.g., A1:D10) (required for: create-from-range)
--chart-type
Type of chart to create (required for: create-from-range, create-from-table, create-from-pivottable)
--left
Left position in points from worksheet edge
--top
Top position in points from worksheet edge
--width
Chart width in points
--height
Chart height in points
--target-range
Cell range to position chart within (e.g., 'F2:K15'). PREFERRED over left/top. When set, left/top are ignored.
--table-name
Name of the Excel Table (required for: create-from-table)
--pivot-table-name
Name of the source PivotTable (required for: create-from-pivottable)
--range-address
Range to fit the chart to (e.g., A1:D10) (required for: fit-to-range)
chartconfig
Chart configuration - data source, series, type, title, axis labels, legend, and styling. SERIES MANAGEMENT: - add-series: Add data series with valuesRange (required) and optional categoryRange - remove-series: Remove series by 1-based index - set-source-range: Replace entire chart data source TITLES AND LABELS: - set-title: Set chart title (empty string hides title) - set-axis-title: Set axis labels (Category, Value, CategorySecondary, ValueSecondary) CHART STYLES: 1-48 (built-in Excel styles with different color schemes) DATA LABELS: Show values, percentages, series/category names. Positions: Center, InsideEnd, InsideBase, OutsideEnd, BestFit. TRENDLINES: Linear, Exponential, Logarithmic, Polynomial (order 2-6), Power, MovingAverage. PLACEMENT MODE: - 1: Move and size with cells - 2: Move but don't size with cells - 3: Don't move or size with cells (free floating) Use chart for lifecycle operations (create, delete, move, fit-to-range).
New data source range (e.g., Sheet1!A1:D10) (required for: set-source-range)
--series-name
Display name for the series (required for: add-series)
--values-range
Range containing series values (e.g., B2:B10) (required for: add-series)
--category-range
Optional range for category labels (e.g., A2:A10)
--series-index
1-based index of the series to remove (required for: remove-series, set-series-format, list-trendlines, add-trendline, delete-trendline, set-trendline)
--chart-type
New chart type to apply (required for: set-chart-type)
--title
Title text to display (required for: set-title, set-axis-title)
--axis
Which axis to set title for (Category, Value, SeriesAxis) (required for: set-axis-title, get-axis-number-format, set-axis-number-format, get-axis-scale, set-axis-scale, set-gridlines)
--number-format
Excel number format code (e.g., "$#,##0", "0.00%") (required for: set-axis-number-format)
--visible
True to show legend, false to hide (required for: show-legend)
--legend-position
Optional position for the legend
--style-id
Excel chart style ID (1-48 for most chart types) (required for: set-style)
βΊAccess to product documentation and roadmap tools (Jira, Notion, etc.)
βΊUnderstanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
βΊStakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Steps
1Install product management skill
2Start with user story generation for known feature
3Progress to competitive analysis: research 2-3 competitors
4Use for roadmap prioritization: apply RICE/ICE scoring
5Draft stakeholder communications and refine based on feedback
6Build template library for recurring PM tasks
7Share effective prompts with product team
Common Pitfalls
β Not validating competitive researchβverify facts before sharing
β Accepting user stories without involving engineering team
β Over-relying on frameworks without qualitative judgment
β Not customizing outputs to company culture and communication style
β Skipping stakeholder validation of generated requirements
Best Practices
β Do
+Validate research and competitive analysis with real data
+Collaborate with engineering when generating technical requirements
+Customize frameworks and templates to your company context
+Use skill for first drafts, refine with stakeholder input
+Document successful prompt patterns for PM tasks
+Combine AI efficiency with human judgment and intuition
β Don't
βDon't publish competitive analysis without fact-checking
βDon't finalize user stories without engineering review
βDon't make prioritization decisions solely on AI scoring
βDon't skip customer validation of generated requirements
βDon't ignore company-specific context and culture
π‘ Pro Tips
β Provide context: company goals, constraints, customer feedback
β Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
β Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
β Use skill for 70% generation + 30% customization to company needs
When to Use This
β Use when
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
β Avoid when
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path
1Basic: user stories, feature specs, status updates