clear

lis186's avatarfrom lis186

Clear saved SourceAtlas analysis results

⭐21stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill provides a streamlined way to manage and clear saved SourceAtlas analysis results from a project's local environment. It allows developers to maintain a clean workspace by selectively or globally deleting cached data—such as architectural patterns, flow analyses, and dependency maps—ensuring that subsequent code evaluations are performed on a fresh and accurate state.

Use Cases

  • Project Reset: Quickly wipe all previous SourceAtlas data before initiating a fresh architectural analysis on a new branch or version.
  • Targeted Data Management: Selectively remove specific analysis modules, such as outdated 'impact' or 'patterns' reports, while preserving other relevant history.
  • Storage Optimization: Efficiently manage local disk space by deleting large, redundant analysis files generated during intensive debugging or code review sessions.
  • Workflow Automation: Use the skill to ensure a clean slate before running automated scripts that rely on SourceAtlas for project documentation.
nameclear
descriptionClear saved SourceAtlas analysis results
modelhaiku
allowed-toolsBash, Read
argument-hint(optional) [target: overview|patterns|flows|history|impact|deps]

SourceAtlas: Clear Saved Results

Context

Target: $ARGUMENTS (default: all)

Your Task

Help user clear saved analysis results from .sourceatlas/ directory.

Step 1: Check what exists

ls -la .sourceatlas/ 2>/dev/null || echo "No .sourceatlas/ directory found"

Also check subdirectories:

# Count files in each subdirectory
for dir in patterns flows impact deps; do
    if [ -d ".sourceatlas/$dir" ]; then
        count=$(ls -1 ".sourceatlas/$dir" 2>/dev/null | wc -l)
        echo "$dir/: $count files"
    fi
done

Step 2: Report findings

List what will be deleted based on target:

  • If no argument or "all": list everything
  • If specific target (e.g., "patterns"): list only that

Example output:

Found the following saved analyses:
- overview.yaml (2025-12-12)
- patterns/ (3 files)
- history.md (2025-12-11)

Are you sure you want to delete?

Step 3: Wait for confirmation

Ask user to confirm. Do NOT proceed without explicit confirmation.

Acceptable confirmations:

  • "yes"
  • "ok"
  • "confirm"
  • "delete"
  • "sure"
  • etc.

Step 4: Delete if confirmed

Based on target:

# All (default, no argument)
rm -rf .sourceatlas/*

# Specific targets
rm -f .sourceatlas/overview.yaml    # for "overview"
rm -rf .sourceatlas/patterns/       # for "patterns"
rm -rf .sourceatlas/flows/          # for "flows"
rm -f .sourceatlas/history.md       # for "history"
rm -rf .sourceatlas/impact/         # for "impact"
rm -rf .sourceatlas/deps/           # for "deps"

Step 5: Confirm deletion

✅ Cleared [target or ".sourceatlas/"]

If nothing to clear

.sourceatlas/ directory does not exist or is already empty

Target Reference

Target Path Description
overview .sourceatlas/overview.yaml Project overview
patterns .sourceatlas/patterns/ Pattern analysis
flows .sourceatlas/flows/ Flow analysis
history .sourceatlas/history.md Temporal analysis
impact .sourceatlas/impact/ Impact analysis
deps .sourceatlas/deps/ Dependency analysis
(no argument) .sourceatlas/* Clear all