library-cleanup

library-cleanup is a skill for Claude Code, Codex from pnp/sharepoint-skills. It costs 81 tokens per session (2,929 once invoked), scanned A, original, MIT.

A file-organization tool for SharePoint document libraries. It reviews files and folders, finds clutter and naming problems, and proposes a clearer structure before making changes.

In plain words
What is it for?
Use it to scan a library, summarize organization issues, suggest meaningful file names and a before-and-after structure, and carry out the approved cleanup with a checklist.
Why use it?
It helps people and AI find documents when duplicates, empty folders, vague names, or excessive nesting make the library difficult to use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to scan a library, summarize organization issues, suggest meaningful file names and a before-and-after structure, and carry out the approved cleanup with a checklist.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnp/sharepoint-skills/library-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add pnp/sharepoint-skills --skill library-cleanup
Clone the repo
git clone --depth 1 https://github.com/pnp/sharepoint-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for library-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnp/sharepoint-skills/library-cleanup/github.svg)](https://agentmods.dev/skills/pnp/sharepoint-skills/library-cleanup)
Your own site
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/library-cleanup"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/library-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for library-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/library-cleanup"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/library-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,929 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02929
Opus 5 $0.00041 $0.01465
Sonnet 5 $0.00016 $0.00586
Haiku 4.5 $0.00008 $0.00293

Measured 9d ago against content hash 6b1160b7741d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

library-cleanup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Skills/library-cleanup/library-cleanup/SKILL.md · 183 lines

How it starts

The opening of the file, as written. The whole thing — 183 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Library Cleanup

When the user says "clean up file demo", follow these steps to organize the current document library.


Phase 1: Scan & Summarize Issues

  • Identify the current document library using get_current_list_or_library.
  • Get the library schema using get_list_schema.
  • List all files and folders recursively using list_items with recursive=true, retrieving FileLeafRef, FileRef, FileDirRef, File_x0020_Size, FSObjType, and Modified.
  • Analyze with execute_code and present a high-level summary of what's wrong. Keep it brief and scannable — no exhaustive item-by-item lists. Cover:
    • Duplicate files: Same filename appearing in multiple folders (note count and examples).
    • Empty or near-empty folders: Folders with 0 files, or only 1-2 files and no subfolders — they add clutter without value.
    • Bad names: Vague or unhelpful folder/file names like "Stuff", "Misc", "Random", "Junk Drawer", "temp", "New Folder", "DO NOT USE", "Why Is This Here", "drafts maybe", "asdfghjkl", "doc1", "thing", "final_FINAL_v3 (2)", "Copy of Copy of...", "idk", "zzzzz", "untitled", "aaa", "test123", "file (1)", "hmm what is this", "New Document", "IMPORTANT maybe", etc.
    • Excessive nesting: Folders buried 3+ levels deep that make browsing painful.
  • Present this as a short, punchy summary — think executive briefing, not audit report.
  • Store the "before" metrics for later use: total folders, duplicate file count, files with bad names count, empty folders count, max nesting depth. Calculate an initial Organization Score from 0–100 based on a weighted formula (penalize duplicates, bad names, empty folders, excessive depth).

Phase 2: Recommend a Clean Structure (with Visualization)

This phase combines the plan AND the visualization into one cohesive recommendation. The user should see the full picture — proposed structure, rename plan, and before/after comparison — all at once before approving.

Step A: Design the new folder structure

Read the full file on GitHub · 183 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 183 lines · 81 tokens per session scan A 6b1160b7741d

Subscribe to this mod's changes

library-cleanup is a skill published in the GitHub repository pnp/sharepoint-skills (110 stars, last pushed today), licensed MIT. It adds 81 tokens to every session and 2,929 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

custom-daily-brief

Builds a role-tuned morning brief as a Word document covering emails that need replies, today's calendar, Teams mentions and upcoming deadlines, using section presets from an editable config file. Use when the user asks for their daily brief, morning brief, start-of-day summary or custom briefing, or wants to change…

kesslernity/awesome-copilot-cowork-skills · 73 tokens

meeting-prep-onepager

Builds a one-page meeting prep brief and saves it as a Word document in OneDrive. Gathers the calendar invite, recent email threads with attendees, Teams messages and shared files, then distils them into purpose, attendee positions, open threads, key files, talking points and risks. Use when the user asks to prepare…

kesslernity/awesome-copilot-cowork-skills · 97 tokens

custom-daily-brief

Builds a role-tuned morning brief as a Word document covering emails that need replies, today's calendar, Teams mentions and upcoming deadlines, using section presets from an editable config file. Use when the user asks for their daily brief, morning brief, start-of-day summary or custom briefing, or wants to change…

Yugpat1835/awesome-copilot-cowork-skills · 73 tokens

meeting-prep-onepager

Builds a one-page meeting prep brief and saves it as a Word document in OneDrive. Gathers the calendar invite, recent email threads with attendees, Teams messages and shared files, then distils them into purpose, attendee positions, open threads, key files, talking points and risks. Use when the user asks to prepare…

Yugpat1835/awesome-copilot-cowork-skills · 97 tokens

inbox-triage

Sweeps the inbox, categorises every message as needs-reply-today, needs-reply-this-week, waiting-on-others, FYI or noise, creates reply drafts in the Drafts folder, and saves a dated triage report to OneDrive. Moves or archives mail only when a rule the user wrote in its rules file says so. Use when the user asks to…

Yugpat1835/awesome-copilot-cowork-skills · 104 tokens

obsidian-workout-export

Export workout data to an Obsidian-formatted Markdown file. Always trigger immediately when the user types "owd". Also trigger on "export workout", "obsidian workout", "save workout to obsidian", or related requests to export workout data into Obsidian. Read the current conversation first before searching prior…

mickpletcher/AI-Skills · 87 tokens