claude-pilot: Skill for Claude Code

.claude/skills/safe-file-ops/SKILL.md

safe-file-ops is a skill for Claude Code from changoo89/claude-pilot. It costs 39 tokens per session (994 once invoked), scanned C, original, MIT.

A file-management workflow that removes tracked files through Git and moves other files into a project trash folder so they can be recovered.

In plain words
What is it for?
Use it when deleting files or folders, including cleanups involving both Git-tracked and untracked items.
Why use it?
It lowers the risk of permanently deleting the wrong files and keeps version-controlled removals recorded in Git.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

This is changoo89/claude-pilot's own configuration. It tells Claude Code how to work on claude-pilot itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything claude-pilot configures →

Part of the claude-pilot plugin — 32 skills, 11 commands, 14 agents, 2 MCP servers shipped together

Reuse

Borrowing it

Nothing to install: this file belongs to changoo89/claude-pilot. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/changoo89/claude-pilot/main/.claude/skills/safe-file-ops/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/changoo89/claude-pilot

Made for: Claude Code.

Or install claude-pilot, the plugin that ships this one along with the rest of its 32 skills, 11 commands, 14 agents, 2 MCP servers.

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 safe-file-ops

README.md
[![agentmods](https://agentmods.dev/badge/skills/changoo89/claude-pilot/safe-file-ops/github.svg)](https://agentmods.dev/skills/changoo89/claude-pilot/safe-file-ops)
Your own site
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/safe-file-ops"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/safe-file-ops/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 safe-file-ops

Your own site · 80×15
<a href="https://agentmods.dev/skills/changoo89/claude-pilot/safe-file-ops"><img src="https://agentmods.dev/badge/skills/changoo89/claude-pilot/safe-file-ops.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 994 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. 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.00039 $0.00994
Opus 5 $0.00019 $0.00497
Sonnet 5 $0.00008 $0.00199
Haiku 4.5 $0.00004 $0.00099

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

Security

Grade C, and why

safe-file-ops scanned grade C with 1 finding 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf .trash/
.claude/skills/safe-file-ops/SKILL.md · 160 lines

How it starts

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

Safe File Operations

Purpose

A skill for safely deleting files and folders. Git-tracked files are removed using git rm for safe version control removal, while non-tracked files are moved to the .trash directory for possible recovery.

Core Principles

  1. Git-tracked files: Use git rm for safe deletion (maintains version history)
  2. Non-tracked files: Move to .trash/ directory (recoverable)
  3. Safety: Never permanently delete - keep in trash for recovery
  4. Auto-detection: Automatically detect if files are git-tracked

Use Cases

  • When you need to delete files or folders
  • When cleaning up folders that are no longer needed
  • When deleting a mix of git-tracked and non-tracked files

Workflow

Step 1: Collect File/Folder List

Confirm the paths of files or folders the user wants to delete:

Please provide the paths of files or folders you want to delete.
(e.g., src/old-component.ts, tests/deprecated/, docs/draft.md)

Step 2: Check Git Tracking Status

Check if each file/folder is tracked by Git:

# Check if file is tracked by git
git ls-files --error-unmatch <filepath>

# Check git-tracked files in folder
git ls-files <folderpath>

Step 3: Separate Handling

Git-tracked files:

# Delete file (remove from staging area)
git rm <filepath>

# Delete folder (recursively)
git rm -r <folderpath>

Non-tracked files:

# Create .trash directory (if not exists)
mkdir -p .trash

# Move file (avoid path conflicts)
mv <filepath> .trash/

# Move folder
mv <folderpath> .trash/

Step 4: Report Summary

Report the list of processed files and their locations:

✅ Git-tracked files (deleted with git rm):
  - src/old-component.ts
  - lib/deprecated/

✅ Non-tracked files (moved to .trash/):
  - cache/temp.dat
  - logs/old-logs/

📁 All preserved files: .trash/

Examples

Example 1: Delete Single File

# Input: "Delete src/utils/legacy.ts"

# Check git status
$ git ls-files --error-unmatch src/utils/legacy.ts
src/utils/legacy.ts  # Git-tracked file confirmed

# Execute deletion
$ git rm src/utils/legacy.ts
rm 'src/utils/legacy.ts'

✅ Removed src/utils/legacy.ts from git.

Read the full file on GitHub · 160 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 · 160 lines · 39 tokens per session scan C 404280f11033

Subscribe to this mod's changes

safe-file-ops is a skill published in the GitHub repository changoo89/claude-pilot (20 stars, last pushed 7mo ago), licensed MIT. It adds 39 tokens to every session and 994 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). 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

security-pipeline

Use when security verification is needed - pre-commit security checks, vulnerability scanning, STRIDE threat analysis. Integrates with /handoff-verify --security and /commit-push-pr. CWE Top 25 based.

sangrokjung/claude-forge · 48 tokens

core-workflow

Detailed development workflow patterns, checklists, and standards. Auto-loads for complex tasks, planning, debugging, testing, or when explicit patterns are needed. Contains session protocols, git conventions, security checklists, testing strategy, and communication standards.

travisjneuman/.claude · 53 tokens

debug-systematic

Systematic 4-phase debugging methodology for complex, intermittent, or mysterious issues. Use when investigating bugs, race conditions, or unexplained failures.

travisjneuman/.claude · 33 tokens

auto-claude

Autonomous multi-agent coding with git worktree isolation, QA validation, and memory. Use for complex features requiring autonomous implementation.

travisjneuman/.claude · 30 tokens

OCR Review-to-Approval Loop

Drive a PR to an approved code review by looping OCR's multi-agent review and address steps. Runs /ocr:review then /ocr:address repeatedly until the review verdict is APPROVE, then one final /ocr:address for leftover suggestions, posting every review and every address round to the GitHub PR as comments. Use when the…

spencermarx/open-code-review · 178 tokens

create-pr

Create evidence-backed pull requests to the GitHub main branch with strict preflight, quality, and security gates. Use when users ask to create/submit/open/update a PR to main (including private repos), decide draft vs ready state, and provide reviewer-ready context for team review.

johnqtcg/awesome-skills · 59 tokens