How to List Available Categories and Skill Counts Using the Claude-Red Installer
Run ./install.sh --list to display all skill categories in the Claude-Red repository alongside the number of SKILL.md files each contains.
The Claude-Red repository (SnailSploit/Claude-Red) organizes penetration testing and security skills into categorized directories. The install.sh script provides a built-in enumeration feature that scans the Skills/ directory structure and reports the inventory without performing any installation. This allows you to preview available content and plan selective deployments before running the full installer.
How the --list Flag Works
When you invoke the installer with the --list flag, the script bypasses all installation logic and executes the list_categories function directly. According to the source code in install.sh (lines 52–55), the presence of --list triggers an early exit path that prints the inventory and terminates immediately, ignoring any other arguments such as --target or --dry-run.
The underlying implementation resides in lines 31–38 of install.sh. The list_categories function performs the following operations:
- Prints the header "Available categories:"
- Iterates over each subdirectory inside
Skills/ - Counts
SKILL.mdfiles usingfind … -name SKILL.md | wc -l - Formats output as
category_name <count> skill(s)via theprintfcommand on line 37
Listing Categories from the Command Line
Basic Usage
To view the complete catalog of categories and their skill counts, execute:
./install.sh --list
Expected output:
Available categories:
web 16 skill(s)
wireless 14 skill(s)
cloud 1 skill(s)
mobile 1 skill(s)
iot 1 skill(s)
infrastructure 7 skill(s)
exploit-dev 6 skill(s)
fuzzing 4 skill(s)
recon 2 skill(s)
api 2 skill(s)
container 2 skill(s)
cicd 2 skill(s)
crypto 2 skill(s)
privesc 2 skill(s)
post-exploitation 3 skill(s)
forensics 2 skill(s)
supply-chain 2 skill(s)
social-engineering 2 skill(s)
network 1 skill(s)
ai 1 skill(s)
utility 2 skill(s)
(Actual counts reflect the current repository state.)
Combining with Other Options
The --list flag takes precedence over installation parameters. Even if you specify additional flags, the script displays only the category list:
./install.sh --target /tmp/claude --dry-run --list
As implemented in the conditional at line 52, this command ignores the --target and --dry-run arguments and exits after printing the category inventory.
Automation and Scripting
You can capture the category list into a variable for further processing:
#!/usr/bin/env bash
# Store category report
category_report=$(./install.sh --list)
# Log or process the inventory
printf "Claude‑Red skill inventory:\n%s\n" "$category_report"
This pattern is useful for CI/CD pipelines that need to validate the presence of specific categories before deployment.
Understanding the Source Implementation
The enumeration logic relies on standard Unix utilities. In install.sh, the list_categories function uses find to locate SKILL.md files within each category subdirectory of Skills/, piping results to wc -l for counting. The printf statement on line 37 ensures consistent column alignment between category names and their respective counts.
This approach guarantees an accurate count regardless of additional metadata files or subdirectories that might exist within category folders, as the search specifically targets files named exactly SKILL.md.
Summary
- Primary command:
./install.sh --listdisplays all categories and skill counts - Implementation: The
list_categoriesfunction ininstall.sh(lines 31–38) handles enumeration - Scanning method: Counts
SKILL.mdfiles withinSkills/subdirectories usingfindandwc -l - Flag behavior:
--listbypasses installation logic (lines 52–55) and exits immediately - Use cases: Inventory preview, CI/CD validation, and selective installation planning
Frequently Asked Questions
What file does the installer scan to count skills?
The installer specifically searches for files named SKILL.md within each category subdirectory under Skills/. This naming convention is hardcoded in the find command inside the list_categories function, ensuring only properly documented skills are counted.
Can I use --list with a custom target directory?
No. When the --list flag is present, the installer ignores the --target parameter and all other installation-related arguments. The script processes the list request at lines 52–55 before parsing target directories or dry-run modes.
How does the installer handle empty categories?
If a subdirectory within Skills/ contains no SKILL.md files, the find command returns zero, and the output displays 0 skill(s) for that category. The printf formatting on line 37 ensures consistent alignment even for empty categories.
Is the --list flag available in all versions of Claude-Red?
The --list functionality is part of the current install.sh implementation in the main branch of SnailSploit/Claude-Red. Earlier commits or forks may lack this feature if they predate the addition of the list_categories function (lines 31–38).
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →