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.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 105
- Forks
- 120
01 前言 Front Matter
- name
- sharepoint-list-insight-report-generator
- description
- 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.
02 资源文件 9
- 资产文件assets/deployment.yaml1.9 KB
- 资产文件assets/Dockerfile531 B
- 脚本assets/index.js863 B
- 资产文件assets/package-lock.json193 B
- 资产文件assets/package.json125 B
- 参考文档metadata.json918 B
- 参考文档README.md4.2 KB
- 参考文档references/attribution.md1.8 KB
- 参考文档references/go-example.md2.0 KB
03 SKILL.md 正文
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.
Step 1 – Identify the Target List
- Read the user request and identify the requested SharePoint list name.
- Inspect the selected SharePoint knowledge source.
- Retrieve all available SharePoint lists.
- Perform a case-insensitive exact match on list title (and any explicit aliases in list metadata).
- Proceed only on an exact match or an explicit user selection; otherwise stop and prompt the user to choose from the available lists.
Validation Logic
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:
- Exact list name match.
- User explicitly selects a list from the available lists.
- Alias defined in list metadata.
Forbidden behavior:
- Do not infer lists from business terminology.
- Do not infer lists from column names.
- Do not infer lists from data values.
- Do not infer lists from semantic similarity.
- Do not select a list because it appears related.
Examples:
User request: Create a report for Campaign
Available lists:
- Campaign
- Product Catalog
Result: Proceed with Campaign.
User request: Create a report for sales data
Available lists:
- Campaign
- Product Catalog
Result: Stop. Return available lists. Ask the user to select one.
User request: Create a report for quarterly revenue
Available lists:
- Campaign
- Product Catalog
Result: Stop. Do not select Campaign.
If the requested list does not exist:
- Stop the process immediately.
- Do not analyze data.
- Do not generate a report.
- Return all available SharePoint lists.
- Return closest matching list names.
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.
Step 2 – Discover List Structure
Retrieve:
- List title
- Internal name
- Item count
- Created date
- Last modified date
- All columns
- Column types
- Required fields
- Indexed fields
- Lookup fields
- Choice fields
- Person fields
- Managed metadata fields
Generate a schema summary.
Step 3 – Analyze Data
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:
General Statistics
- Total records
- Distinct values
- Missing values
- Data completeness score
Trend Analysis
- Monthly trends
- Annual trends
- Growth trends
Category Analysis
- Top categories
- Frequency distribution
- Ranking statistics
Ownership Analysis
- Records by owner
- Top contributors
Quality Analysis
- Empty fields
- Duplicate values
- Potential anomalies
Step 4 – Generate Insights
Create business-oriented insights.
Examples:
- Most used categories
- Fastest growing areas
- Data quality issues
- Process bottlenecks
- Trends and anomalies
Prioritize actionable recommendations.
Step 5 – Build Interactive HTML Report
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.
Technologies
Use:
- Chart.js
Use only libraries that can be used safely in a browser.
Executive Summary
Display:
- List name
- Record count
- Column count
- Last update date
- Top insights
Interactive Filters
Provide filters for:
- Text fields
- Choice fields
- Lookup fields
- Person fields
- Date fields
Filters must update charts, KPIs and tables dynamically.
Interactive Charts
Generate appropriate charts automatically.
Support:
- Bar charts
- Pie charts
- Doughnut charts
- Line charts
Provide hover tooltips and legend controls.
Data Table
Requirements:
- Sort on every column
- Ascending and descending sorting
- Search box with placeholder: Quick search in table...
- Pagination
- Column visibility controls
- Export buttons:
- CSV (Excel-compatible)
- Copy
For CSV export, neutralize spreadsheet formulas by prefixing an apostrophe when a cell's first non-whitespace or control character is =, +, -, or @.
Detail Modal Popup
Selecting a row must open a modal displaying:
- All list fields
- Display names
- Internal names
- Values
Use a responsive two-column layout.
Open SharePoint Item Button
Inside the modal popup provide:
Open SharePoint Item
Requirements:
- Open in a new browser tab
- Use only the trusted SharePoint item URL returned by the configured connector or tool
- Permit the link only when it uses HTTPS and its origin matches the selected SharePoint site's origin; otherwise omit it
- Use target="_blank" and rel="noopener noreferrer"
Step 6 – Save Report
After generating the HTML report:
-
Generate a unique name using a sanitized list name: retain
[A-Za-z0-9_-], replace other runs with_, trim leading and trailing separators, cap the sanitized list-name portion at 80 characters, and useSharePointListif empty.Report_<SanitizedListName>_<yyyyMMdd_HHmmss>.html
-
Verify that the configured destination's audience is no broader than the source list and included items. If this cannot be verified, do not upload the report.
-
Invoke the configured SharePoint Create file action or flow to save the report in the pre-approved SharePoint destination whose audience is no broader than the source list and included items.
-
Capture the URL or path returned by Create file and use it in the response. If file creation fails or returns no URL or path, report the failure honestly and never guess a URL.
Output Requirements
Return:
- Report summary.
- SharePoint URL of the generated report.
- Report file name.
- List schema summary.
- Insights summary.
- Storage location within the configured SharePoint destination.
Success Criteria
A successful execution must:
- Detect the requested SharePoint list.
- Validate its existence.
- Suggest available lists when not found.
- Discover schema.
- Analyze data.
- Generate insights.
- Create an interactive HTML report.
- Save the report in the pre-approved SharePoint destination whose audience is no broader than the source list and included items.
- Return the direct SharePoint URL of the report.
- Provide sortable tables.
- Provide pagination.
- Provide quick search.
- Provide modal detail view.
- Provide Open SharePoint Item action.
- Generate a unique report name.
- Support responsive user experience.
04 同仓库更多 Skills
stakeholder-and-decision-map
Mines customer interactions to identify stakeholders, infer their likely roles and engagement, map the decision process, and highlight who or what may be missing. Use when asked to "map a deal's buying group", identify influential or missing stakeholders, "assess who has gone quiet", or "explain how the customer will decide". Do not use for phased engagement plans, contact sequences, choosing or drafting outreach to the single next contact, seller or team performance reviews, or contacting, scheduling, or changing records.
sales-progress-update
Creates or refreshes a sales progress update for a manager or team about work done, deal movement, pending outcomes, supported forecast position, and help needed. Use when asked to "create my weekly sales update", "refresh my sales progress deck", "report my forecast position", "where do I stand against my quarter forecast", or "catch my manager up on committed deals". Do NOT use for non-sales project updates, a since-date deal change digest, momentum or blocker analysis, meeting prep, or outreach drafting.
submission-assemble
Put the checked CSR or 510(k) sections together in template order with a reviewer-facing open-items register, as a draft package for human sign-off. Use when the user asks "assemble the CSR draft", "put the module together for review", "build the review package with the open items on top", "compile the 510(k) sections in order" or "package this up for the submission lead". Do NOT use for assembling an unchecked draft - use consistency-check instead. Do NOT use for loading protocol, SAP or TLF sources - use source-ingest instead. Do NOT use for compiling general documents or slide decks - use the built-in docx or pptx skill instead. Do NOT use for filing or submitting to a regulator - use the sponsor's validated gateway, operated by a human, instead. Guardrail: draft for human approval only (L1); status is draft_clean or draft_open_items, never submitted.
source-ingest
Pull every number, date and population definition out of a study's protocol, SAP, TLF tables, investigator brochure and prior approved text into one cited fact map, keyed per config/field-dictionary.json, before any CSR or 510(k) section is written. Use when the user asks "here's the locked TLF set and SAP, set up the CSR", "load the protocol and tables before we start drafting", "what figures do we have from the database lock?", "pull the disposition counts out of Table 14.1.1" or "ingest the IB for the 510(k)". Do NOT use for drafting or assembling submission sections - use section-draft or submission-assemble instead. Do NOT use for reconciling a patient's medications - use the discharge-care-transition plugin instead. Guardrail: reads and cites sources only; never estimates, rounds or invents a fact.
section-plan
Work out which sections a CSR or 510(k) requires, from the templates in config, check each one against the cited fact map, and name what is missing before a word is drafted. Use when the user asks "what do we still need before we can draft the CSR?", "which sections are ready to start?", "what's blocking the performance data section?", "do we have everything for the synopsis?" or "map our tables to the E3 structure". Do NOT use for writing section language - use section-draft instead. Do NOT use for cross-checking a finished draft - use consistency-check instead. Do NOT use for outlining general Word documents or business reports - use the built-in docx skill instead. Only structures with a template in config are supported. Guardrail: plans only; never marks a section ready on a missing fact and never invents a structure.
section-draft
Write or revise the language for one planned CSR or 510(k) section - synopsis, efficacy, safety, discussion, device description - using only figures already in the cited fact map, each with its TLF or SAP citation. Use when the user asks "draft the Synopsis from our locked tables", "write up safety from Table 14.3.1", "give me a first pass at the discussion", "draft the device description for the 510(k)" or "tighten the wording of the Discussion section". Do NOT use for supplying a number not already in source_facts - use source-ingest instead. Do NOT use for verifying a draft's figures - use consistency-check instead. Do NOT use for appeal letters, clinical notes or discharge summaries - use the matching HLS plugin instead. Guardrail: drafts for human approval only (L1); never asserts an unsourced number or harmonises two figures.