# How to List Available Categories and Skill Counts Using the Claude-Red Installer

> Easily list Claude-Red categories and skill counts with install.sh --list. Discover repository skills and their respective SKILL.md file numbers.

- Repository: [SnailSploit | Kai Aizen/Claude-Red](https://github.com/SnailSploit/Claude-Red)
- Tags: how-to-guide
- Published: 2026-09-14

---

**Run `./install.sh --list` to display all skill categories in the Claude-Red repository alongside the number of [`SKILL.md`](https://github.com/SnailSploit/Claude-Red/blob/main/SKILL.md) files each contains.**

The Claude-Red repository (SnailSploit/Claude-Red) organizes penetration testing and security skills into categorized directories. The [`install.sh`](https://github.com/SnailSploit/Claude-Red/blob/main/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`](https://github.com/SnailSploit/Claude-Red/blob/main/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`](https://github.com/SnailSploit/Claude-Red/blob/main/install.sh). The `list_categories` function performs the following operations:

1. Prints the header **"Available categories:"**
2. Iterates over each subdirectory inside `Skills/`
3. Counts [`SKILL.md`](https://github.com/SnailSploit/Claude-Red/blob/main/SKILL.md) files using `find … -name SKILL.md | wc -l`
4. Formats output as `category_name  <count> skill(s)` via the `printf` command on line 37

## Listing Categories from the Command Line

### Basic Usage

To view the complete catalog of categories and their skill counts, execute:

```bash
./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:

```bash
./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:

```bash
#!/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`](https://github.com/SnailSploit/Claude-Red/blob/main/install.sh), the `list_categories` function uses `find` to locate [`SKILL.md`](https://github.com/SnailSploit/Claude-Red/blob/main/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`](https://github.com/SnailSploit/Claude-Red/blob/main/SKILL.md).

## Summary

- **Primary command**: `./install.sh --list` displays all categories and skill counts
- **Implementation**: The `list_categories` function in [`install.sh`](https://github.com/SnailSploit/Claude-Red/blob/main/install.sh) (lines 31–38) handles enumeration
- **Scanning method**: Counts [`SKILL.md`](https://github.com/SnailSploit/Claude-Red/blob/main/SKILL.md) files within `Skills/` subdirectories using `find` and `wc -l`
- **Flag behavior**: `--list` bypasses 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`](https://github.com/SnailSploit/Claude-Red/blob/main/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`](https://github.com/SnailSploit/Claude-Red/blob/main/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`](https://github.com/SnailSploit/Claude-Red/blob/main/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).