home / skills / lis186 / sourceatlas / list

list skill

/plugin/commands/list

This skill lists all saved SourceAtlas analyses in the .sourceatlas directory and summarizes their status.

npx playbooks add skill lis186/sourceatlas --skill list

Review the files below or copy the command above to add this skill to your agents.

Files (1)
SKILL.md
2.8 KB
---
name: list
description: List saved SourceAtlas analysis results
model: haiku
allowed-tools: Bash
---

# SourceAtlas: List Saved Results

## Your Task

List all saved analysis results in the `.sourceatlas/` directory.

### Step 1: Check directory exists

```bash
ls -la .sourceatlas/ 2>/dev/null || echo "NOT_FOUND"
```

If output contains `NOT_FOUND` or directory is empty:

```
šŸ“ No saved analyses yet

Use the `--save` parameter to save analysis results:
- `/sourceatlas:overview --save`
- `/sourceatlas:pattern "api" --save`
- `/sourceatlas:history --save`
```

End.

### Step 2: List all files with details

```bash
find .sourceatlas -type f -exec ls -lh {} \; 2>/dev/null | sort
```

### Step 3: Format output

Format results into a table, calculate days since modification, and mark expired status (>30 days):

```
šŸ“ .sourceatlas/ saved analyses:

| Type | File | Size | Modified | Status |
|------|------|------|----------|--------|
| overview | overview.yaml | 2.3 KB | 3 days ago | āœ… |
| pattern | patterns/api.md | 1.5 KB | 45 days ago | āš ļø |
| pattern | patterns/repository.md | 2.1 KB | 5 days ago | āœ… |
| history | history.md | 4.2 KB | 60 days ago | āš ļø |
| flow | flows/checkout.md | 3.1 KB | 2 days ago | āœ… |
| impact | impact/user-model.md | 1.8 KB | 4 days ago | āœ… |
| deps | deps/react.md | 2.5 KB | 6 days ago | āœ… |

šŸ“Š Stats: 7 cached, 2 expired (>30 days)

šŸ’” Tips:
- Clear cache: `/sourceatlas:clear`
- Clear specific type: `/sourceatlas:clear patterns`
```

### Step 4: List expired items with refresh commands

If there are expired items (>30 days), output copyable re-analysis commands:

```
āš ļø Expired items (recommend re-analysis):

| File | Days | Re-analyze Command |
|------|------|-------------------|
| patterns/api.md | 45 days | `/sourceatlas:pattern "api" --force --save` |
| history.md | 60 days | `/sourceatlas:history --force --save` |

šŸ’” Copy the commands above to re-analyze
```

**Command generation rules**:

| Type | Command Format |
|------|----------------|
| overview | `/sourceatlas:overview --force --save` |
| overview-{dir} | `/sourceatlas:overview {dir} --force --save` |
| patterns/{name}.md | `/sourceatlas:pattern "{name}" --force --save` |
| history.md | `/sourceatlas:history --force --save` |
| flows/{name}.md | `/sourceatlas:flow "{name}" --force --save` |
| impact/{name}.md | `/sourceatlas:impact "{name}" --force --save` |
| deps/{name}.md | `/sourceatlas:deps "{name}" --force --save` |

**Note**: Convert `-` in filenames back to spaces for parameters (e.g., `api-endpoint.md` → `"api endpoint"`)

---

## Type Detection Rules

| File Path | Type |
|-----------|------|
| `overview.yaml` or `overview-*.yaml` | overview |
| `patterns/*.md` | pattern |
| `flows/*.md` | flow |
| `history.md` | history |
| `impact/*.md` | impact |
| `deps/*.md` | deps |

Overview

This skill lists saved SourceAtlas analysis results found in the .sourceatlas/ directory and summarizes their status. It detects saved types (overview, patterns, flows, history, impact, deps), computes age, flags items older than 30 days as expired, and provides copyable re-analysis commands. The output is concise and ready for CLI use or integration into slash-command workflows.

How this skill works

It checks for the .sourceatlas/ directory and returns a friendly message if none exists. If present, it enumerates files, determines each file type by path rules, captures file size and modification time, calculates days since modification, and marks expired items (>30 days). For expired entries it generates exact re-analysis commands following the command-generation rules, converting dashes in filenames back to spaces for parameters.

When to use it

  • Verify what cached SourceAtlas analyses exist in a repo
  • Audit stale analyses before running a new scan
  • Produce a quick report to decide which analyses to refresh
  • Integrate into CI checks to alert on expired cached analyses
  • Create maintenance tasks to clear or refresh cached outputs

Best practices

  • Run the listing from the repository root so .sourceatlas/ is detected reliably
  • Refresh expired items using the provided --force --save commands to preserve cache consistency
  • Use `--save` when running analysis commands you want to track for future listings
  • Clear specific types instead of full cache when only one category is outdated
  • Schedule periodic checks (weekly/monthly) to avoid many expired items building up

Example use cases

  • Developer runs the list to see which pattern analyses are stale before a release
  • CI job fails fast if critical overview.yaml is missing or expired
  • Team lead exports the table of saved analyses to decide which to re-run
  • Maintenance script uses listed re-analysis commands to refresh all expired items automatically
  • Onboarding script suggests which saved analyses to inspect first based on modification age

FAQ

What happens if .sourceatlas/ does not exist?

The skill reports no saved analyses and suggests how to save results using the --save parameter for overview, pattern, and history commands.

How is expiration determined?

Items older than 30 days are marked expired. The list includes days since modification so you can judge urgency.

How are re-analysis commands generated?

Commands follow type-specific templates (e.g., patterns/name → `/sourceatlas:pattern "name" --force --save`). Dashes in filenames are converted to spaces for parameters (api-endpoint.md → "api endpoint").