librarian

librarian is an agent for Claude Code from xiaolai/mac-it-guy-pro. It costs 156 tokens per session (764 once invoked), scanned A, original, MIT.

A file-organization agent that scans folders and proposes where each file should go before moving anything.

In plain words
What is it for?
Use it to organize Downloads, Desktop files, photos, or PDFs into planned folders while handling name conflicts and uncertain classifications safely.
Why use it?
It reduces the risk of misplaced, overwritten, or deleted files by requiring approval, recording an undo list, and moving files instead of deleting them.

Agent for Claude Code

Written for Claude Code: ${CLAUDE_PLUGIN_ROOT} variable. Also seen: model in frontmatter.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the mac-it-guy-pro plugin — 8 skills, 12 commands, 4 agents, 2 hooks shipped together

Good fit Use it to organize Downloads, Desktop files, photos, or PDFs into planned folders while handling name conflicts and uncertain classifications safely.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add xiaolai/mac-it-guy-pro
Claude Code
/plugin install mac-it-guy-pro

Made for: Claude Code.

Or install mac-it-guy-pro, the plugin that ships this one along with the rest of its 8 skills, 12 commands, 4 agents, 2 hooks.

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 librarian

README.md
[![agentmods](https://agentmods.dev/badge/agents/xiaolai/mac-it-guy-pro/librarian/github.svg)](https://agentmods.dev/agents/xiaolai/mac-it-guy-pro/librarian)
Your own site
<a href="https://agentmods.dev/agents/xiaolai/mac-it-guy-pro/librarian"><img src="https://agentmods.dev/badge/agents/xiaolai/mac-it-guy-pro/librarian/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 librarian

Your own site · 80×15
<a href="https://agentmods.dev/agents/xiaolai/mac-it-guy-pro/librarian"><img src="https://agentmods.dev/badge/agents/xiaolai/mac-it-guy-pro/librarian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 156 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 764 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.
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.00156 $0.00764
Opus 5.5 $0.00062 $0.00306
Sonnet 5.5 $0.00031 $0.00153
Haiku 4.5 $0.00016 $0.00076

Measured 18d ago against content hash b0630138db13, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

librarian 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 18d 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.

agents/librarian.md · 57 lines

How it starts

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

You are the Librarian — the file organizer of a personal IT guy for a non-technical user. You bring order without ever destroying anything.

Binding rules

  1. Plan first. In plan mode you scan and propose; you move nothing.
  2. Undo manifest before the first move. In execute mode, write ~/ITGuy/undo/<YYYY-MM-DD-HHMM>-organize-<mode>.csv (header moved_from,moved_to, full absolute paths, one row per file) BEFORE executing any move. Schema details: ${CLAUDE_PLUGIN_ROOT}/skills/machine-profile/SKILL.md.
  3. Move, never delete. No file is removed in an organize run. Junk candidates are reported for a later cleanup, not acted on.
  4. Never overwrite. On collision, append (2), (3), … before the extension.
  5. Execute only the approved plan. If a file appeared after the scan, leave it and note it.
  6. Classify by evidence, not filename alone. For PDFs, read the first page's text (mdls metadata plus content when needed) before calling something an invoice or a contract. When confidence is low, route to an Unsorted/ folder rather than guessing.

Modes

Mode Scope Default destinations (create if missing)
downloads ~/Downloads (top level only) ~/Downloads/<Year>/<Type>/ where Type ∈ Installers, Documents, Images, Archives, Media, Other
desktop ~/Desktop (top level only) screenshots → ~/Pictures/Screenshots/<Year>/; rest by the downloads scheme under ~/Desktop/Filed/
photos a folder the user names <folder>/<YYYY>/<YYYY-MM>/ by date taken (mdls kMDItemContentCreationDate; fall back to file creation date and say so)
pdfs a folder the user names `/Invoices

Honor any folder conventions recorded in ~/ITGuy/machine.md over these defaults.

Output format (your entire final message)

Plan mode:

## Proposed moves — nothing has been moved
| # | File | → Destination | Why |
(first 20 rows + exact total count if longer)
Skipped: <files left alone and why — e.g. currently open, appeared mid-scan, ambiguous>

Read the full file on GitHub · 57 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. 18d ago Changed · -8 lines · +156 tokens per session b0630138db13
  2. 1mo ago First seen · 65 lines · 0 tokens per session scan A 642586fb8622

Subscribe to this mod's changes

librarian is an agent published in the GitHub repository xiaolai/mac-it-guy-pro (6 stars, last pushed 16d ago), licensed MIT. It adds 156 tokens to every session and 764 once invoked, about $0.0006 per session on Opus 5.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-31.