site-storage-heatmap
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "site-storage-heatmap":https://skillpi.com/zh/skills/deepskill-7a6075672702a5c8d49a5d56119fdc07ae7834addac023685d62c6ec7dab0468。安装前核对上游来源和版本:https://github.com/pnp/sharepoint-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
生成一个交互式 HTML 站点地图,显示所有文档库、列表和站点页面的存储细分以及热点/冷点活动热力图。包含站点范围的汇总堆叠条形图以及可对每个库点击钻取的功能。将文件命名为 {FirstName}-Site-Storage-Heatmap.html 并保存到站点文档库内的 “storage heatmap” 文件夹,然后引导用户访问该文件。
介绍来源: third_party · pnp · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 限制与区别
- 翻译待完成,请参阅来源文档。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: "site-storage-heatmap"
description: "Generates an interactive HTML site map showing storage breakdown and hot/cold activity heatmap across all document libraries, lists, and site pages. Includes site-wide summary stacked bars and per-library click-through drill-downs. Saves the file as {FirstName}-Site-Storage-Heatmap.html in the \"storage heatmap\" folder inside the site's document library, then navigates the user to it."Site Storage Heatmap
Generate an interactive HTML site map with storage sizes and hot/cold activity heatmaps for a SharePoint site, then navigate the user to the output.
Steps
1. Get the Current User's First Name
- Call
get_user_info(query="@currentUser")to resolve the current user. - Extract the first name from the resolved display name (e.g., "Adam Harmetz" → "Adam").
- The output filename will be:
{FirstName}-Site-Storage-Heatmap.html
2. Discover All Containers
- Call
discover_sharepoint_listswithfilterType="all"andincludeHidden=falseto get every list, library, and page library on the site. - Categorize each container:
- Document Libraries: templateType 101
- Lists: templateType 100
- Site Pages: templateType 119
- Calendar: templateType 106
- Record each container's
id,title,itemCount, andserverRelativeUrl.
3. Collect File-Level Data from Each Non-Empty Library
- For every document library (templateType 101) with itemCount > 0, call
list_itemswith:viewFields: ["FileLeafRef", "File_x0020_Size", "File_x0020_Type", "Modified"]itemType: "files",recursive: true,rowLimitset to the library'sitemCount
- For Site Pages (templateType 119), also query with
viewFields: ["FileLeafRef", "Modified"]to get page modification dates. - Parallelize all independent list_items calls.
Large sites (≥ 100 libraries or any library with ≥ 5,000 items)
Naïvely parallelising every list_items call against a large site will hit throttling (HTTP 429) and balloon memory because every file row sits in the model state.
- Batch the parallel fan-out at no more than ~10 concurrent
list_itemscalls. After each batch, aggregate the results into the running totals viaexecute_codewithoutputDataRef: trueso the raw rows are released from model state. Never hold all libraries' file rows in memory at once. - Per-library paging. If a library reports
itemCount> 5,000, fetch it in pages of 5,000 (the SharePoint list view threshold) rather than one giantrowLimit. Aggregate per-page into running totals — do not retain the per-page raw arrays after they are summed. - On 429 / throttling: back off, retry the affected library once with a smaller
rowLimit, and continue. If retry fails, record the library asPartial data — throttledand surface it explicitly in the HTML output (a yellow badge on that library card) so the consumer knows the totals are an undercount, not zero. - Progress reporting. Every 10 libraries processed, post a short progress line (
Processed 30 of 142 libraries…) so a multi-minute run doesn't look frozen. - Never silently drop a library. Every container from Step 2 must appear in the final HTML output, even if its row is annotated
(no data)or(throttled).
4. Aggregate Per-Library Stats
For each library, compute:
- Total size (sum of
File_x0020_Sizein bytes) - File count
- File type breakdown: group by
File_x0020_Type→{ ext: { count, size } } - Recency buckets based on
Modifieddate relative to today:- Hot: modified ≤
HOT_DAYSago (default 7) - Warm: modified ≤
WARM_DAYSago (default 30) - Cool: modified ≤
COOL_DAYSago (default 90) - Cold: modified >
COOL_DAYSago
- Hot: modified ≤
- Track both file count AND storage per recency bucket.
Configurable bucket thresholds
The 7 / 30 / 90 day defaults are conventional but not always right — a fast-moving project site may want 1 / 7 / 30, a records archive may want 30 / 180 / 365.
- Honour explicit overrides in the user's prompt. Examples that must work:
- "heatmap with hot=1 day, warm=7, cool=30"
- "use 30/90/365 buckets"
- "only consider files older than a year as cold"
- Validate:
HOT_DAYS < WARM_DAYS < COOL_DAYS, all positive integers. If the user gives invalid values, ask once for correction; do not silently re-order. - Always render the thresholds used in the HTML output — a small legend line under the heatmap such as
Hot ≤ 7d · Warm ≤ 30d · Cool ≤ 90d · Cold > 90d— so the consumer can tell at a glance what "hot" means in this report.
For lists (no file sizes), classify each list as hot/warm/cool/cold based on the list's lastModified date from the discovery response. Count list items per recency bucket.
5. Compute Site-Wide Rollup
Sum across ALL containers (libraries + lists + pages):
- Grand total items (files + list items + pages)
- Total storage (libraries only)
- Aggregate recency: total hot / warm / cool / cold counts
- Separate recency breakdowns for: Document Libraries, Lists, Site Pages
6. Generate the Interactive HTML
Build a self-contained HTML file with embedded CSS and JavaScript containing:
Root Banner
- Site name, total item count, container count, page count
- "Total Library Storage: X" badge
Site-Wide Heatmap Panel (below root, above branches)
- 3-column grid: one for Document Libraries, one for Lists, one for Site Pages
- Each column has a stacked horizontal bar (hot=red #E74856, warm=orange #FF8C00, cool=blue #50E6FF, cold=grey #A0AEC0) showing file/item counts per recency tier
- Below each bar: storage per tier (for libraries) or counts (for lists/pages)
- Bottom legend row: grand totals per tier across the entire site
3-Column Site Map (below heatmap)
- Column 1 (wider): Document Libraries — all libraries merged together (including expense libraries), sorted by total size descending. Each leaf card shows: name, size badge, file count badge. Clickable.
- Column 2: Lists — each list with item count badge. Not clickable.
- Column 3: Site Pages — each page name. Not clickable.
- Empty containers grayed out.
Click-Through Modal (JavaScript)
When a library leaf is clicked, show a modal overlay with:
- Summary cards: File count, Total size, File type count
- Activity Heatmap: 4 horizontal bars (hot/warm/cool/cold) showing file counts + storage per tier
- Storage by File Type: horizontal bars per extension showing % of total, file count, and size
- Close on Escape, click outside, or ✕ button
Styling
- Use Segoe UI font, #f5f5f5 background
- Branch headers: blue gradient for doc libs, green for lists, purple for pages
- Responsive grid that stacks on mobile
- Hover effects on clickable leaves (translateX + shadow)
- Modal with backdrop blur
7. Save the HTML File
- Save as
{FirstName}-Site-Storage-Heatmap.html - Target location: the site's document library, inside a folder called "storage heatmap"
- Use
create_text_filewithrelativeFolderPath="storage heatmap" - If the folder doesn't exist, create it first with
create_folder
- Use
8. Navigate the User
- After saving, call
navigate_to_urlto take the user to the document library where the file was saved. - Provide the direct file URL so the user can open it.
- Remind the user: "Download and open in your browser for full interactivity — SharePoint strips JavaScript from inline HTML previews."
Example
User: "Generate a storage heatmap for this site"
Result: File saved as Adam-Site-Storage-Heatmap.html in the "storage heatmap" folder, user navigated to the library, with a note to download for JS interactivity.
Constraints
- Always get the current user's first name — never hardcode.
- Always get the current date via
get_datetime_infobefore computing recency buckets — never assume today's date. - Parallelize list_items calls for all non-empty libraries to minimize latency. For large sites, follow the batching/throttling rules in Step 3 → Large sites — never fan out unbounded.
- Use
execute_codewithoutputDataRef: truefor all large intermediate data so raw rows are released from model state after aggregation. - Keep the HTML fully self-contained (no external dependencies).
- File type colors: use a rotating palette of Fluent-style colors.
- Recency colors are fixed: hot=#E74856, warm=#FF8C00, cool=#50E6FF, cold=#A0AEC0.
- Recency thresholds are configurable per run (see Step 4 → Configurable bucket thresholds) but must be rendered in the HTML so the report is self-explanatory.
- Every container discovered in Step 2 must appear in the final HTML, including throttled or empty ones — never silently drop.
当前收录版本
0.0.1
质量评测
满分100 · 来自 SkillPi LAB 实验室的评测报告。
亮点
- 直接解决SharePoint站点存储分析与可视化的核心任务痛点
- 显著提升日常高频场景的效率
- 具有广泛受众的实用能力
亮点
- 触发词精准完整,覆盖多种变体
- 边界清晰,description内容完整且位置正确
亮点
- Phase/步骤清晰,有出口条件
- 含端到端示例,frontmatter完整
- 单文件≤500行
亮点
- 工具来源明确,参数正确
- 覆盖主要异常,不可逆操作有确认机制
- 可靠性良好,少量异常未覆盖
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。