Unpublished Content Report logo

Unpublished Content Report

Organization
pnp
unpublished-content-report

Create a live HTML governance report of unpublished or draft documents and site pages that haven't been edited for a specified number of days, sorted with the stalest items first, and save it in a SharePoint report library. Use when the user says: - "Create a report of unpublished documents and pages" - "Show stale draft content on this site" - "Find content not published and not edited for 14 days" - "Generate an unpublished content report" - "Save a report of old drafts in the Reports library"

Overview

Publisherpnp
Repositorysharepoint-skills
Skill nameunpublished-content-report
Stars
141
Forks
60
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by pnp on GitHub. Read the source before you install it.

Installation

Install the Unpublished Content Report AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/pnp/sharepoint-skills/tree/main/Skills/unpublished-content-report/unpublished-content-report
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/pnp/sharepoint-skills.git /tmp/sharepoint-skills
mkdir -p .claude/skills
cp -r /tmp/sharepoint-skills/Skills/unpublished-content-report/unpublished-content-report .claude/skills/unpublished-content-report
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Unpublished Content Report in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Unpublished Content Report on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Unpublished Content Report is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Unpublished content report

When to use

Use this skill when the user wants an HTML governance report covering SharePoint documents and site pages that aren't published and haven't been edited for a specified period. Use it for stale drafts, pending/rejected content, checked-out pages, or unpublished changes. The report must sort by days since last edit in descending order and be saved in a document library.

Inputs

  • Current SharePoint site URL and context.
  • Inactivity threshold in days. Default to 14 only when the user doesn't provide one.
  • Destination document library. Default to Reports only when the user doesn't provide one.
  • Optional report filename. Otherwise use Unpublished-content-inactive-<days>-days.html.
  • Scope is documents in user-facing document libraries plus pages in the site's Site Pages library. Exclude system, asset, style, preservation, template, report, and AgentAssets libraries unless the user includes them.

Steps

  1. Get the current date/time before calculating relative ages.
  2. Discover the site's lists and libraries, including the Site Pages library. Identify user-facing document libraries and exclude system libraries.
  3. Verify the destination library exists. If it doesn't, create it as a document library with a clear report-oriented description.
  4. Retrieve schemas before querying items. Identify these internal fields where available: FileLeafRef, FileRef, Modified, Editor, _ModerationStatus, _UIVersionString, CheckoutUser, and page fields such as Title, FirstPublishedDate, and PromotedState.
  5. Query all files recursively with a row limit equal to the known item count, or 50,000 when unknown. Retrieve the complete dataset before filtering.
  6. Determine publication state from SharePoint metadata rather than filenames:
    • In moderated libraries, treat _ModerationStatus values equivalent to Approved/Published as published. Pending, Draft, Rejected, or other non-approved values are unpublished.
    • In versioned libraries, a version ending in .0 is a published major version. A version ending in a non-zero minor number indicates draft or unpublished changes.
    • Treat checkout-only pages, never-published pages, and pages with draft changes as unpublished.
    • Don't classify an item as unpublished solely because the library doesn't use moderation or minor versions. If no reliable publication-state signal exists, omit the item and note the skipped library in the report.
  7. Calculate whole days since Modified. Keep items whose age is greater than or equal to the requested threshold.
  8. Normalize each match with item name and link, type, library, publication state, version, last edited date/time, editor, and days since last edit.
  9. Sort by days since last edit descending, then item name ascending as a stable tie-breaker.
  10. Build the HTML using Report.html and, when practical, LiveData.html so results refresh from source libraries when opened. Pass every source list identity to the live-data tool; don't hand-write REST or Graph calls.
  11. Include summary cards for total items, documents, and pages; a concise criteria note; and a table containing all matching items. Escape user-controlled values before inserting them into raw HTML.
  12. Route generated HTML through an output data reference, then create the .html file in the destination library using that reference. Don't reconstruct content from a truncated preview.
  13. Verify the file was created and return a link. If any tool fails or data is incomplete, say so plainly and don't invent results.

Output format

Return a concise completion message containing:

  • A markdown link to the created HTML report.
  • The threshold and destination library.
  • A note that the report refreshes when opened if LiveData was used; otherwise state that it's a point-in-time report.
  • Any libraries skipped because publication state couldn't be determined reliably.

The HTML report must contain:

  1. Title: Unpublished content inactive for <days>+ days
  2. Site and criteria statement
  3. KPI cards: Total items, Documents, Pages
  4. Table columns: Item, Type, Library, Publication state, Version, Last edited, Edited by, Days since edit
  5. Rows sorted by Days since edit descending

Example request: Create a HTML report showing documents and pages that aren't published and haven't been edited for 30 days. Save it in Governance Reports.

Frequently asked questions

What does the Unpublished Content Report AI skill do?

Create a live HTML governance report of unpublished or draft documents and site pages that haven't been edited for a specified number of days, sorted with the stalest items first, and save it in a SharePoint report library. Use when the user says: - "Create a report of unpublished documents and pages" - "Show stale draft content on this site" - "Find content not published and not edited for 14 days" - "Generate an unpublished content report" - "Save a report of old drafts in the Reports library"

Why use Unpublished Content Report on TypingMind?

Because you install it once and use it with any model. Unpublished Content Report is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Unpublished Content Report in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/pnp/sharepoint-skills/tree/main/Skills/unpublished-content-report/unpublished-content-report. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Unpublished Content Report?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Unpublished Content Report?

As many as you like. As long as a model supports skills, you can use Unpublished Content Report with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Unpublished Content Report AI skill free?

Yes. It is published on GitHub by pnp under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇