Preface¶
In knowledge bases, project archives, and download directories, files with the same name but different paths, multiple backups, and email attachments saved separately can easily pile up into files with identical content. Comparing by eye or deduplicating by filename is both slow and unreliable. The following introduces the SkillHub community Skill “Duplicate Document Cleaner” (@user_08f07800/zyn): after installation, an Agent loads the in-package script logic to perform content-hash-based duplicate detection on a specified directory, supporting report-first and optional deletion on demand.
What Is It¶
“Duplicate Document Cleaner” is a community Skill published by user_08f07800 on SkillHub, located at @user_08f07800/zyn. Its current version is 1.0.0, and it is categorized under knowledge-management. The platform is marked with requires_api_key=false, so no additional API Key is required.
The Skill package’s main body is an executable Python script (filename SKILL.md in the repository), implementing a “Document Duplicate Cleaner”: it computes SHA-256 content hashes for supported office and text formats within a directory, groups files with identical hashes together, outputs a report, and optionally enters a cleanup flow. The SkillHub page’s introduction matches the Skill name and does not provide a longer separate description; specific capabilities are based on the in-package script.
Official entry points:
- SkillHub page: https://www.skillhub.cn/skills/user_08f07800/zyn
- API coordinate page: https://api.skillhub.cn/user_08f07800/zyn
(SkillHub displayed data sample: rating 100000, downloads 1000; refer to the page’s real-time display.)
Core Features¶
The following are all from the script implementation inside the Skill package and have been verified.
Scanning and Hashing¶
- Traverses files in the target directory (recursively scans subdirectories by default;
--no-recursivecan be used to scan only the current level). - Filters by extension, with built-in support including but not limited to:
.pdf,.docx,.doc,.xlsx,.xls,.pptx,.ppt,.txt,.md,.csv,.json,.xml,.html,.htm,.rtf,.odt,.ods,.odp,.eml,.msg, etc.;--extcan be used to add more extensions. - Skips common irrelevant directories:
.git,.svn,.hg,__pycache__,node_modules,.cache, etc. - Reads each file in chunks and computes its SHA-256; if reading fails, it prints a warning and skips that file.
Duplicate Grouping and Reporting¶
- Groups files with identical hash values together (a group requires at least 2 files to be considered duplicates).
- Within a group, sorts by modification time, treating the earliest modified file as the “original” and marking the rest as duplicates.
- The report outputs the number of groups, the number of duplicate files, and an estimated space savings; for text types such as
.txtand.md, it can attempt UTF-8 / GBK and other encodings to provide a short preview (up to about 200 characters). -o FILEcan be used to write the report to a file.
Cleanup Strategy¶
- Default is dry-run (
--dry-run): only lists the items to be deleted, without making any changes to the disk. - When
--deleteis used to enter actual deletion, the script will interactively ask: keep the whole group, delete all duplicates in the group, or selectively delete by number; before batch deletion, typingyis required for confirmation. -e/--excludecan be passed multiple times with regexes to exclude matching filenames or directory names.
Note: The determination is based on byte-level identity of the entire file. Files with different extensions but identical content will be considered duplicates; if the content is slightly modified, the hash will differ, and they will not be grouped together.
Installation and Activation¶
Installation via SkillHub CLI¶
First confirm that skillhub is installed on your machine (if not installed, refer to the installation script at https://skillhub.cn/install/skillhub.md). When installing the Skill, you must use --dir to point to the current Agent’s skills directory; otherwise, the default location ./skills/ may not be recognized.
command -v skillhub && skillhub --version
skillhub install zyn --namespace user_08f07800 --dir ~/.cursor/skills
The directory in the example above corresponds to Cursor; common paths for other clients (excerpted from the SkillHub installation documentation):
- Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, restart or refresh the Agent as required by your client so that @user_08f07800/zyn can be loaded.
Let AI Install for You¶
The prompt provided on the SkillHub page is: Please install @user_08f07800/zyn according to https://skillhub.cn/install/skillhub.md.
Typical Usage¶
The in-package script provides a command-line interface via argparse. After installation, the script is located at @user_08f07800/zyn/SKILL.md under the skills directory (the path depends on --dir). In an environment with Python 3 installed, you can directly execute the file with the interpreter (the first line of the file is #!/usr/bin/env python3).
Scan a directory and generate only a report (default dry-run, no deletion):
python3 ~/.cursor/skills/@user_08f07800/zyn/SKILL.md /path/to/documents
Scan the current directory, excluding paths whose names match temp or backup:
python3 ~/.cursor/skills/@user_08f07800/zyn/SKILL.md . -e "temp|backup"
Save the report to a file:
python3 ~/.cursor/skills/@user_08f07800/zyn/SKILL.md . -o duplicate_report.txt
After confirming the report is correct, enter the actual deletion flow (interactive confirmation will be required):
python3 ~/.cursor/skills/@user_08f07800/zyn/SKILL.md . --delete
In an Agent session, you can also directly describe the target directory and whether to only report, whether to exclude certain subdirectories, and the Agent that has loaded this Skill will invoke the script with the above parameters. The in-package example command writes duplicate_cleaner.py, which is inconsistent with the published filename SKILL.md; when executing, use the actual installation path.
Applicable Scenarios and Cautions¶
Suitable for:
- Content-level deduplication surveys of document libraries synced from local or cloud drives, project
docs/directories, and email export directories. - Scenarios where you need to first see the duplicate groups and potential space savings before deciding whether to delete (default dry-run).
Limitations and cautions:
- Only processes extensions listed by the script; files not in the list will be ignored unless supplemented with
--ext. - Identical hashes are considered duplicates without distinguishing the business meaning of “which copy should be kept”; the script defaults to keeping the file with the earliest modification time, so please verify the paths and versions yourself before deletion.
--deletewill actually callos.remove; it is recommended to back up first or run a dry-run in a copy of the directory.- Binary office formats (such as PDF, Office) are only hashed and their metadata displayed, without body content parsing; “same name with different content” or “near-duplicates” are not within the scope of this Skill.
- Interactive deletion requires a usable terminal stdin; purely non-interactive environments are more suitable for only using scanning and
-oreports, followed by manual handling.
Closing¶
“Duplicate Document Cleaner” consolidates duplicate document detection into a reproducible pipeline: recursive scanning, SHA-256 grouping, reporting, and optional cleanup, with dry-run as the default to reduce the risk of accidental deletion. If you are organizing knowledge-management assets, you can install @user_08f07800/zyn from SkillHub, run a report on the target directory first, and then decide whether to use --delete.
Official URL: https://www.skillhub.cn/skills/user_08f07800/zyn