microsoft/sharepoint-list-insight-report-generator
Use this skill whenever the user asks for an insights/reporting analysis of a SharePoint list from a connected SharePoint knowledge source; first validate the list exists, then generate and save a single-file interactive HTML report to a pre-approved SharePoint destination whose audience is no broader than the source list and items, and return its SharePoint URL.
npx skills add https://github.com/microsoft/cat-agent-skills --skill sharepoint-list-insight-report-generator
Before starting, verify that configured SharePoint connector actions, agent flows, or equivalent tools can discover approved lists and their schemas, retrieve list items page by page, and invoke Create file to return the created file's URL or path. A SharePoint knowledge source alone does not guarantee these capabilities. If any capability is unavailable, stop and name the missing capability.
Before performing any analysis, enumerate all SharePoint lists available in the selected knowledge source.
The requested data source must be explicitly mapped to an existing SharePoint list.
Allowed conditions to continue:
Forbidden behavior:
Examples:
User request:
Create a report for Campaign
Available lists:
Result:
Proceed with Campaign.
User request:
Create a report for sales data
Available lists:
Result:
Stop.
Return available lists.
Ask the user to select one.
User request:
Create a report for quarterly revenue
Available lists:
Result:
Stop.
Do not select Campaign.
Proceed only if the requested list exists.
For example: if the user requests "sales" and only a "Product" list exists that happens to contain sales-related data, stop and ask the user to choose an existing list from the knowledge source.
Retrieve:
Generate a schema summary.
Analyze all accessible records within the confirmed scope, retrieving them page by page through the configured tool and following its continuation tokens. Before retrieving a detailed report, enforce the tool's row and report-size limits; when either limit is absent, also use a conservative cap of 1,000 rows. If the scope would exceed an applicable limit, ask the user to narrow it. Never silently truncate or sample records.
Generate:
Create business-oriented insights.
Examples:
Prioritize actionable recommendations.
Produce a single HTML file with all CSS and JavaScript embedded inline, except that Chart.js (version 4) may be loaded from an exact versioned CDN URL with matching SRI integrity metadata and crossorigin="anonymous" as the only permitted external dependency. If the exact version and matching SRI cannot be verified, do not load the CDN asset and use embedded browser APIs instead. Do not use external Bootstrap, DataTables, fonts, stylesheets, scripts, or other CDN resources. Implement table filtering, sorting, pagination, and responsive styling using embedded CSS and JavaScript.
Treat SharePoint field names and values as untrusted data. Use a real JSON serializer; before embedding serialized data in a <script type="application/json"> element, escape <, >, &, U+2028, and U+2029, then read it via textContent and parse it. Insert data-driven content using textContent, document.createElement, and other safe DOM APIs, never innerHTML. Render rich-text fields as plain text unless a trusted sanitizer is available.
Use:
Use only libraries that can be used safely in a browser.
Display:
Provide filters for:
Filters must update charts, KPIs and tables dynamically.
Generate appropriate charts automatically.
Support:
Provide hover tooltips and legend controls.
Requirements:
Quick search in table...
For CSV export, neutralize spreadsheet formulas by prefixing an apostrophe when a cell's first non-whitespace or control character is =, +, -, or @.
Selecting a row must open a modal displaying:
Use a responsive two-column layout.
Inside the modal popup provide:
Open SharePoint Item
Requirements:
After generating the HTML report:
[A-Za-z0-9_-], replace other runs with _, trim leading and trailing separators, cap the sanitized list-name portion at 80 characters, and use SharePointList if empty.Report_<SanitizedListName>_<yyyyMMdd_HHmmss>.html
Return:
A successful execution must:
Take microsoft/sharepoint-list-insight-report-generator from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.