orphan-scan

orphan-scan is a skill for Claude Code from Jerry0022/dotclaude. It costs 35 tokens per session (823 once invoked), scanned A, original, MIT.

A daily scan that searches repositories under a root folder for branches, worktrees, parked work, and stashes that may not have been integrated.

In plain words
What is it for?
It is for creating an orphan report, finding unlanded or dirty Git work, and showing a reminder when the current repository has at-risk items.
Why use it?
It helps reveal code or changes that could be lost when abandoned folders or branches are deleted.

Skill for Claude Code

Written for Claude Code: SessionStart hook event. Also seen: reads .claude/ paths.

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/orphan-scan.js --clean-landed [--repo <path>] # dry run.

Part of the devops plugin — 18 skills, 12 agents, 9 hooks, 1 MCP server shipped together

Good fit It is for creating an orphan report, finding unlanded or dirty Git work, and showing a reminder when the current repository has at-risk items.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/Jerry0022/dotclaude
agentmods
npx agentmods add skills/jerry0022/dotclaude/orphan-scan

Made for: Claude Code.

Or install devops, the plugin that ships this one along with the rest of its 18 skills, 12 agents, 9 hooks, 1 MCP server.

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 orphan-scan

README.md
[![agentmods](https://agentmods.dev/badge/skills/jerry0022/dotclaude/orphan-scan/github.svg)](https://agentmods.dev/skills/jerry0022/dotclaude/orphan-scan)
Your own site
<a href="https://agentmods.dev/skills/jerry0022/dotclaude/orphan-scan"><img src="https://agentmods.dev/badge/skills/jerry0022/dotclaude/orphan-scan/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 orphan-scan

Your own site · 80×15
<a href="https://agentmods.dev/skills/jerry0022/dotclaude/orphan-scan"><img src="https://agentmods.dev/badge/skills/jerry0022/dotclaude/orphan-scan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 823 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.00035 $0.00823
Opus 5.5 $0.00014 $0.00329
Sonnet 5.5 $0.00007 $0.00165
Haiku 4.5 $0.00003 $0.00082

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

Security

Grade A, and why

orphan-scan 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.

plugins/devops/scheduled-tasks/orphan-scan/SKILL.md · 63 lines

How it starts

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

Orphan Scan

Post-ship hygiene only checks the repo that was just shipped. This task looks at every repo under one root and records what would be lost if a folder were deleted tomorrow.

What it does

node scripts/orphan-scan.js (read-only apart from git fetch --prune with a 60 s timeout, offline-tolerant):

  1. Finds every repo under the root (default: parent folder of the current main checkout, --root overrides), deduplicated by git-common-dir.
  2. Classifies each repo with classifyUnits (mcp-server/ship/lib/hygiene.js):
    • atRisk — not landed (unlanded or partial), no open PR, no live session, not parked; plus worktrees with real uncommitted changes.
    • parked — parked/<topic> branches (aliases wip/, backup/, salvage/, tip subject "ARCHIVED"); older than 30 days they carry the nudge "behalten, integrieren oder verwerfen".
    • stashes, landedLeftovers (landed, removable by hygiene).
  3. Writes ~/.claude/orphan-report.json.

ss.orphan.nudge.js reads that report at session start and shows one line when the current repo has at-risk items or safety copies without a decision (autosave snapshots and wip//backup//salvage//salvage-land//rescue/ copies older than 3 days, or a deliberate park older than 30 days); the line adds the machine-wide total when other repos have such work too. It also starts this scan detached when the report is missing or older than 24 h, so the daily run works without an external scheduler. A Desktop scheduled task running the same command once a day is equivalent.

Removing landed leftovers (one-off or recurring)

node scripts/orphan-scan.js --clean-landed [--repo <path>]           # dry run
node scripts/orphan-scan.js --clean-landed [--repo <path>] --apply   # delete

Uses the existing safe removal, ignoring the age/count gates. Never touches live-session worktrees, the current worktree, locked or dirty worktrees, or anything not landed. Worktrees must also have been idle for 24 h. Branches are spared when they are long-lived (develop, staging, production, stable, trunk, release/*, hotfix/*) or still have an upstream on origin (a worktree on such a branch is removed, the branch stays). LANDED parked refs (parked/* incl. parked/autosave/*, wip/, backup/, salvage/) are removed too: a landed safety copy holds nothing the default branch lacks; unlanded ones are never touched. Remote branches are not deleted here (ship hygiene expires landed origin copies after 14 days). Stale lock files (>1 h) are cleared before the fetch --prune.

Read the full file on GitHub · 63 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 Changed · +6 lines 5af0170e8c5d
  2. 18d ago First seen · 57 lines · 35 tokens per session scan A 8b5843966f02

Subscribe to this mod's changes

orphan-scan is a skill published in the GitHub repository Jerry0022/dotclaude (6 stars, last pushed 11d ago), licensed MIT. It adds 35 tokens to every session and 823 once invoked, about $0.0001 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-10-20.

Related

orphan-scan compared with skills from other repositories

orphan-scan next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
orphan-scanJerry0022/dotclaudeSkill611d agoMITA35Claude Code
merge-batchdiegosouzapw/OmniRouteSkill83k6d agoMITA46Claude Code
prowler-commitprowler-cloud/prowlerSkill15kyesterdayApache-2.0A44Claude Code, Codex
gh-auth-isolationgithub/gh-awSkill5.6kyesterdayMITA20Claude Code, Codex
github-skillzeenie-ai/OpenCompanySkill1.1kyesterdayMITA51Claude Code
comet-githubrpamis/cometSkill3.3kyesterdayMITA72Claude Code, Codex
release-helperSahir619/fable-methodSkill2.3k1mo agoMITA43Claude Code