---
name: eck:list-user-catalog
version: "0.7.4"
description: Read-only display of user-harvested improvements in user-catalog.yaml with source attribution.
disable-model-invocation: false
---

# List User Catalog

Display the contents of `$ECK_HOME/user-catalog.yaml` in a formatted view with source attribution. **Read-only** — never modifies any files.

---

## Visual Framework

Follow these conventions for all terminal output displayed to the user via the Bash tool.

### Output Mode Awareness

Before producing output, read the user's preferred output mode:

```bash
cat $ECK_HOME/user-preferences.json 2>/dev/null
```

Extract the `outputMode` field and adapt verbosity:

- **guided** — Add explanatory prose after key steps. Describe what is happening and why.
- **standard** (default) — Balanced. Show steps with brief context for non-obvious decisions.
- **concise** — Steps and summary box only. No prose, no explanations.

If the file is missing or `outputMode` is absent, use **standard**.

### ANSI Colors

Declare these variables at the top of **every** Bash tool call (shell state does not persist between calls):

```bash
source $ECK_HOME/colors.sh
```

Every color sequence **must** end with `${RESET}`. No exceptions.

### Stage Banners

Mark major stage transitions with a bold banner. One blank line before and after.

```bash
echo ""
printf '%b\n' "${ORANGE}${BOLD}STAGE NAME${RESET}"
echo ""
```

### Status Symbols

| Symbol | Meaning          | Color       |
| ------ | ---------------- | ----------- |
| `[*]`  | Active / running | `${CYAN}`   |
| `[x]`  | Completed        | `${GREEN}`  |
| `[!]`  | Error            | `${RED}`    |
| `[-]`  | Skipped          | `${DIM}`    |
| `[>]`  | In progress      | `${YELLOW}` |
| `[ ]`  | Pending          | `${DIM}`    |

```bash
printf '%b\n' "${GREEN}[x]${RESET} Step completed"
printf '%b\n' "${RED}[!]${RESET} Something failed"
```

No emoji in output. Use only these bracket symbols for status.

### Summary Boxes

Display at checkpoints and at the end of the skill. One blank line before and after.

```bash
echo ""
printf '%b\n' "${ORANGE}${BOLD}Title${RESET}"
echo ""
printf '%b\n' "Label: Value"
echo ""
```

### Error Format

```bash
printf '%b\n' "${RED}[!]${RESET} Error message here"
printf '%b\n' "    ${DIM}Recovery guidance here.${RESET}"
```

### Spacing Rules

- One blank line before and after stage banners and summary boxes.
- No blank lines within step lists.
- Maximum output line width: 70 characters.

### Statusline Stage Updates

At the **start** of each stage, update the statusline:

```bash
bash $ECK_HOME/update-stage.sh "{Statusline text from table}"
```

At **skill completion** (success or error), reset:

```bash
bash $ECK_HOME/update-stage.sh
```

---

## Task Registration

| Stage | Subject                 | Active Form        | Statusline      |
| ----- | ----------------------- | ------------------ | --------------- |
| 1     | Stage 1: Pre-Flight     | Verifying catalog  | Preflight (1/3) |
| 2     | Stage 2: Load and Parse | Parsing catalog    | Parse (2/3)     |
| 3     | Stage 3: Display        | Displaying catalog | Display (3/3)   |

## Usage

```bash
/eck:list-user-catalog                        # Show full user catalog
/eck:list-user-catalog --type {type}          # Filter by component type
```

---

## Stage 1: Pre-Flight

### Inputs

- `$ECK_HOME/user-catalog.yaml`
- Optional `--type` flag from `$ARGUMENTS`

### Activities

```bash
ls $ECK_HOME/user-catalog.yaml
```

**If not found:**

```bash
printf '%b\n' "${RED}[!]${RESET} No user catalog found at $ECK_HOME/user-catalog.yaml"
echo ""
printf '%b\n' "    ${DIM}The user catalog is populated by /eck:push-to-user-catalog,${RESET}"
printf '%b\n' "    ${DIM}which harvests improvements from managed projects.${RESET}"
printf '%b\n' "    ${DIM}No items have been harvested yet.${RESET}"
echo ""
printf '%b\n' "    ${DIM}To get started:${RESET}"
printf '%b\n' "    ${DIM}1. Make improvements to a managed project's infrastructure${RESET}"
printf '%b\n' "    ${DIM}2. Run /eck:push-to-user-catalog to harvest improvements${RESET}"
printf '%b\n' "    ${DIM}3. Run /eck:pull-from-user-catalog to apply to other projects${RESET}"
```

### Outputs

- Confirmation that `user-catalog.yaml` exists

### Exit Criteria

- Catalog file is found, or error is displayed and skill stops

---

## Stage 2: Load & Parse

### Inputs

- `$ECK_HOME/user-catalog.yaml`

### Activities

Read and parse `$ECK_HOME/user-catalog.yaml`.

### Outputs

- Parsed catalog data: all harvested components with metadata

### Exit Criteria

- Catalog is fully parsed and component list is available

---

## Stage 3: Display

### Inputs

- Parsed catalog data from Stage 2
- Optional `--type` filter flag

### Activities

### 3.1: Header

```bash
echo ""
printf '%b\n' "${ORANGE}${BOLD}User Catalog${RESET}"
echo ""
printf '%b\n' "Path: $ECK_HOME/"
printf '%b\n' "Items: {TOTAL_COUNT}"
printf '%b\n' "Sources: {UNIQUE_PROJECT_COUNT} projects"
echo ""
```

### 3.2: Component Table

```
| Name | Type | Source Project | Harvested | Checksum |
|------|------|----------------|-----------|----------|
| {name} | {type} | {source_project} | {harvested_at} | {checksum_short} |
```

Group by type if more than 10 items.

### 3.3: Summary

```bash
echo ""
printf '%b\n' "${DIM}Total: {N} harvested components from {N} projects${RESET}"
printf '%b\n' "${DIM}By type: {type}: {N}, {type}: {N}, ...${RESET}"
```

If `--type` flag was provided, only show matching entries.

### Outputs

- Formatted user catalog display in terminal

### Exit Criteria

- All components displayed; statusline reset

---

## Error Recovery

| Error                  | Recovery                                                 |
| ---------------------- | -------------------------------------------------------- |
| User catalog not found | No items harvested yet — run `/eck:push-to-user-catalog` |
| Parse error            | Report malformed YAML and suggest manual review          |

---

## Related Documents

- [List Global Catalog](../list-global-catalog/SKILL.md)
- [List Project Catalog](../list-project-catalog/SKILL.md)
- [Push To User Catalog](../push-to-user-catalog/SKILL.md)
- [Pull From User Catalog](../pull-from-user-catalog/SKILL.md)
