duplicate-file-scanner

A read-only, zero-risk duplicate-file finder. Responds to user requests such as “find duplicate files / clean duplicate photos / disk has duplicates / which files have identical content / reclaim space / duplicate.”

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "duplicate-file-scanner" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0f59a5ed5d52f163c6a4d4930721e8b3e701763488edbfe30c08046907a0928c. Verify the upstream source and version against https://skillhub.cn/skills/user_cb37ec27/duplicate-file-scanner before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A read-only, zero-risk duplicate-file finder. Responds to user requests such as “find duplicate files / clean duplicate photos / disk has duplicates / which files have identical content / reclaim space / duplicate.”

0 Downloads

Introduction source: third_party · user_cb37ec27 · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: duplicate-file-scanner
slug: duplicate-file-scanner
displayName: 重复文件扫描器
description: 只读、零风险的重复文件查找器。当用户说"找重复文件/清理重复照片/磁盘有重复/哪些文件内容一样/回收空间/duplicate
  files/重复文件扫描"时使用。通过 sha256 内容哈希比对,找出目录中内容完全相同的文件并生成可复核报告,绝不自动删除,隐私安全、纯本地。
version: 1.0.0
category: 效率工具
platforms:
  - WorkBuddy
  - Claude Code
  - Cursor
  - QClaw
  - ima
author: Dream
license: MIT
disable: true

重复文件扫描器(Duplicate File Scanner)

电脑和手机备份里往往散落着大量内容完全相同的文件——重复下载的安装包、多次拷贝的文档、手机连拍导出的重复照片、误同步的副本……手动翻找费时,直接删又怕删错。

这个 skill 通过 sha256 内容哈希找出「内容逐字节相同」的文件,生成一份可复核的报告:列出每个重复分组、文件路径、体积,以及总共能回收多少空间。它只扫描、只报告,绝不自动删除任何文件——删除动作交还给你人工确认,安全零风险。

适用场景

  • 磁盘快满了,想清理却不敢乱删的人
  • 多年手机照片/视频备份里疑似有大量重复
  • 整理 Download、Desktop、文档目录,想先看清有多少重复
  • 任何「怀疑有重复文件但不确定在哪、有多少」的时刻

核心能力

  • 内容级比对:不是比文件名,而是比文件内容(sha256),同名不同内容不会误报,异名同内容不会漏报。
  • 三阶段提速:先按文件大小分组 → 再比前 1MB 哈希初筛 → 最后对疑似项算完整哈希确认,大目录也能跑。
  • 只读安全:全程不修改、不删除任何文件,符合个人文件安全规范。
  • 灵活过滤:可按最小体积、扩展名过滤,减少噪音(如只看图片、只查大于 1MB 的文件)。
  • 多种报告格式:markdown(默认,适合贴笔记)、json(适合二次处理)、txt(纯文本)。

用法

脚本位置:<skill目录>/dupesweep.py(零依赖,仅需 Python 3)。

执行时用受管理的 Python:/Users/simon/.workbuddy/binaries/python/versions/3.13.12/bin/python3 <skill目录>/dupesweep.py <参数>

命令与参数

python3 dupesweep.py <目录...> [--min-size N] [--ext png,jpg] [--top N] [--format md|json|txt] [--output 报告路径]
  • 目录...:一个或多个要扫描的目录(必填,可多个)。
  • --min-size N:最小文件体积(字节),小于此值不计入,默认 1024。可按需调大(如 1048576 = 1MB)减少噪音。
  • --ext png,jpg,mp3,pdf:只扫描指定扩展名(逗号分隔),不填则扫描全部。
  • --top N:报告最多展示 N 个重复组,默认 50;设很大(如 99999)可显示全部。
  • --format:报告格式,默认 md;可选 json / txt。
  • --output 路径:将报告写入文件,留空则打印到终端。

示例

示例 1:扫描「下载」目录,只看图片,找出重复

/Users/simon/.workbuddy/binaries/python/versions/3.13.12/bin/python3 \
  ~/.workbuddy/skills/duplicate-file-scanner/dupesweep.py \
  ~/Downloads --ext png,jpg,heic --min-size 10240

示例 2:扫描多个目录,导出 json 报告到文件

/Users/simon/.workbuddy/binaries/python/versions/3.13.12/bin/python3 \
  ~/.workbuddy/skills/duplicate-file-scanner/dupesweep.py \
  ~/Documents ~/Desktop --format json --output ~/dup_report.json

示例 3:只查大于 5MB 的重复文件(快速看大块头)

/Users/simon/.workbuddy/binaries/python/versions/3.13.12/bin/python3 \
  ~/.workbuddy/skills/duplicate-file-scanner/dupesweep.py \
  /Volumes/PhotoBackup --min-size 5242880 --top 99999

执行步骤(给 AI 助手)

  1. 与用户确认要扫描的目录(默认可建议 ~/Downloads、~/Desktop、~/Documents 之一,或用户指定的路径)。
  2. 询问是否需要过滤(扩展名 / 最小体积);没有特别要求就用默认值。
  3. 用受管理 Python 运行上面的命令,把报告打印或写入文件交给用户。
  4. 明确告知:报告只列出重复,未删除任何文件;若用户要清理,请其逐组人工核对后在文件管理器/回收站中处理(遵循个人文件安全规范,不使用 rm -rf)。

报告样例(markdown)

# 重复文件扫描报告

- 扫描文件数:**1280**(跳过 42 个过小/无法访问的文件)
- 重复分组数:**37**
- 可回收空间:**2.4GB**

> ⚠️ 本报告仅列出内容完全相同的文件,**未做任何删除**。请人工核对后再处理。

## 组 1 · 3 份 · 单文件 850MB · 可回收 1.7GB
- `/Volumes/PhotoBackup/IMG_001.JPG`
- `/Volumes/PhotoBackup/DCIM/Camera/IMG_001(1).JPG`
- `/Users/simon/Downloads/IMG_001_copy.JPG`

边界与说明

  • 默认跳过隐藏目录(.git、node_modules 等)以提速;如需全量扫描可后续扩展参数。
  • 符号链接不计入,避免循环与误报。
  • 删除不在本技能职责内——安全优先,交给用户确认。
  • 纯本地执行,不上传任何文件内容,隐私安全。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决磁盘空间清理、重复照片识别等高频刚需场景
  • 受众广泛,实用性强
Trigger Precision95/100

Highlights

  • 触发词覆盖多种用户表达变体,边界清晰
Structure and Standards95/100

Highlights

  • 执行步骤清晰,含端到端示例
  • frontmatter 完整,结构规范
Execution Reliability90/100

Highlights

  • 工具来源明确,参数说明清晰
  • 安全机制完善,明确告知未删除文件
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.