rename-files-date-prefix

rename-files-date-prefix is a skill for Claude Code, Codex from pnp/sharepoint-skills. It costs 67 tokens per session (1,569 once invoked), scanned A, original, MIT.

A SharePoint file-renaming tool that adds each file’s creation date at the start of its name in year-month-day shorthand, such as 251203-Status Report.pdf.

In plain words
What is it for?
Use it to rename every file in a document library, including files in subfolders, with a two-digit year, month, and day prefix.
Why use it?
It makes files easier to sort and identify by date while providing a preview before names are changed.

Skill for Claude CodeCodex

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

Good fit Use it to rename every file in a document library, including files in subfolders, with a two-digit year, month, and day prefix.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/pnp/sharepoint-skills/rename-files-date-prefix
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 rename-files-date-prefix
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 rename-files-date-prefix

README.md
[![agentmods](https://agentmods.dev/badge/skills/pnp/sharepoint-skills/rename-files-date-prefix/github.svg)](https://agentmods.dev/skills/pnp/sharepoint-skills/rename-files-date-prefix)
Your own site
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/rename-files-date-prefix"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/rename-files-date-prefix/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 rename-files-date-prefix

Your own site · 80×15
<a href="https://agentmods.dev/skills/pnp/sharepoint-skills/rename-files-date-prefix"><img src="https://agentmods.dev/badge/skills/pnp/sharepoint-skills/rename-files-date-prefix.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,569 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.00067 $0.01569
Opus 5 $0.00034 $0.00785
Sonnet 5 $0.00013 $0.00314
Haiku 4.5 $0.00007 $0.00157

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

Security

Grade A, and why

rename-files-date-prefix 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 11d 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/rename-files-date-prefix/rename-files-date-prefix/SKILL.md · 109 lines

How it starts

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

Rename Files with Date Prefix

Rename all files in a SharePoint document library to prefix them with their created date in yyMMdd format (e.g., 251203-Status Report.pdf).

Steps

1. Identify the Target Library

  • Use the current document library if the user doesn't specify one.
  • Call get_current_list_or_library to get the library ID.

2. Get the Library Schema

  • Call get_list_schema to confirm the library has Created and FileLeafRef fields and to understand the structure.

3. Retrieve All Files (Including Subfolders)

  • Call get_list_item_metadata with fetchAll: true to retrieve all items.
  • Use a CAML query that filters to files only (FSObjType = 0):
    <Query><Where><Eq><FieldRef Name='FSObjType'/><Value Type='Integer'>0</Value></Eq></Where><OrderBy><FieldRef Name='FileLeafRef' Ascending='TRUE'/></OrderBy></Query>
    

4. Build the Preview

For each file returned:

  1. Extract the Created date and format it as yyMMdd (2-digit year, 2-digit month, 2-digit day).
  2. Get the current filename from FileLeafRef.
  3. Determine the folder path from FileRef (strip the filename to get the folder).
  4. Skip check: If the filename already matches the pattern ^\d{6}- (six digits followed by a hyphen), mark it as skipped with reason "Already has date prefix".
  5. Build the new filename: yyMMdd-OriginalFilename.

5. Show the Preview Table

Always show the preview before making any changes. Present a markdown table:

# Current Name New Name Folder Status
1 Status Report.pdf 251203-Status Report.pdf /sites/Team/Docs Will rename
2 251203-Budget.xlsx 251203-Budget.xlsx /sites/Team/Docs/Finance Skipped (already prefixed)

Include a summary:

  • Total files found: X
  • To be renamed: Y
  • Skipped: Z

Then ask: "Ready to rename Y files? Confirm to proceed."

6. Rename on Confirmation

Once the user confirms:

  • For each file to be renamed, call update_list_items with:
    • itemId: the file's list item ID
    • fieldInternalNames: ["FileLeafRef"]
    • newValues: ["yyMMdd-OriginalFilename"]
  • Process files one at a time to handle errors gracefully.
  • If a rename fails, log the error and continue with the remaining files.

Read the full file on GitHub · 109 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. 11d ago First seen · 109 lines · 67 tokens per session scan A 7af97730ca91

Subscribe to this mod's changes

rename-files-date-prefix is a skill published in the GitHub repository pnp/sharepoint-skills (116 stars, last pushed 2d ago), licensed MIT. It adds 67 tokens to every session and 1,569 once invoked, about $0.0003 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

html-ppt-obsidian-claude-gradient

OpenDesign's enterprise AI-adoption brief: local-first agents at work, the risk controls, the ROI, and the rollout plan. Built as a decision-grade AI literacy deck for leadership, IT, security.

nexu-io/open-design · 53 tokens

skill-doc-delivery

Convert markdown to DOCX, PPTX, XLSX, PDF office documents — use when you need exportable deliverables.

nyldn/claude-octopus · 29 tokens

skill-deck

Generate slide deck presentations from briefs — use when you need slides, pitch decks, or visual summaries.

nyldn/claude-octopus · 23 tokens

speech-to-text

Transcribe audio to text using ElevenLabs Scribe v2. Use when converting audio/video to text, generating subtitles, transcribing meetings, or processing spoken content.

calesthio/OpenMontage · 37 tokens

msgraph-files

Read OneDrive and SharePoint files via the Microsoft 365 MCP server — list folder contents, fetch item metadata, inspect versions and sharing permissions. Use when locating a document in OneDrive/SharePoint, checking who a file is shared with, or reviewing file version history.

automateyournetwork/netclaw · 58 tokens

managedcode-markitdown

Use ManagedCode.MarkItDown when a .NET application needs deterministic document-to-Markdown conversion for ingestion, indexing, summarization, or content-processing workflows. USE FOR: ManagedCode.MarkItDown integration; document ingestion flows; Office or rich-text conversion to Markdown; indexing and summarization…

managedcode/dotnet-skills · 113 tokens