Claude
Skills
Sign in
Back

list-recent-repos

Included with Lifetime
$97 forever

List recently worked-on repositories

General

What this skill does


# List Recent Repositories

This skill lists recently worked-on repositories across all machines.

## Instructions for Agent

### 1. Apply Parameters

- **count**: Number of results to return (default: 5)
- **filter**: Machine type filter (work, personal, all)

### 2. Call Python Script

Execute the query_memory.py script:

```bash
cd "${CLAUDE_PLUGIN_ROOT}"

# Detect Python command (python3 on Linux, python on Windows)
PYTHON_CMD=$(command -v python3 || command -v python)

# Try to use venv if available, create if needed, skip if venv creation fails
if [ -d "venv" ]; then
  # Activate venv (cross-platform)
  if [ -f "venv/bin/activate" ]; then
    source venv/bin/activate
  elif [ -f "venv/Scripts/activate" ]; then
    source venv/Scripts/activate
  fi
elif $PYTHON_CMD -m venv venv 2>/dev/null; then
  echo "Setting up Python environment (first time)..."
  if [ -f "venv/bin/activate" ]; then
    source venv/bin/activate
  elif [ -f "venv/Scripts/activate" ]; then
    source venv/Scripts/activate
  fi
  pip install -r requirements.txt
else
  echo "Note: Using system Python (venv creation not available)"
fi
# Use python3 on Linux/WSL, python on Windows
$PYTHON_CMD scripts/query_memory.py list-recent-repos \
  --config-repo "$YW_CONFIG_REPO_PATH" \
  --count {count} \
  --filter {filter}
```

### 3. Parse Results

Expected JSON output:
```json
[
  {
    "name": "dynamics-solutions",
    "description": "Dynamics solution packages...",
    "last_accessed": "2026-01-31T14:30:00Z",
    "last_machine": "work-main",
    "last_os": "windows",
    "clones": [
      {
        "machine": "work-main",
        "os": "windows",
        "path": "C:\\Users\\twatana\\repos\\dynamics-solutions",
        "last_accessed": "2026-01-31T14:30:00Z"
      }
    ],
    "tags": ["azure-devops", "dynamics"]
  },
  ...
]
```

### 4. Format and Display

**IMPORTANT:** Always show machine and OS information - this helps users track where repositories are located across multiple machines.

Present results in a clean list with this format:

```
5 most recently accessed repositories:

1. dynamics-solutions (work-main, Windows - today)
   Dynamics solution packages for the team
   Tags: azure-devops, dynamics

2. personal-blog (personal-pc, WSL - 3 days ago)
   Personal blog built with Hugo
   Tags: hugo, blog

3. azure-infra (work-devbox, Linux - 1 week ago)
   Infrastructure as code for Azure
   Tags: terraform, azure

...

Use /find-repo {name} to see all clones of a repository.
```

Highlight repositories:
- Worked on **today** or **this week**
- Current machine (if applicable)

### 5. Suggest Next Actions

If the user might want to resume work:
```
Suggestion: Use /search-memory to find specific work you did on these repos.
```

## Example Usage

**User:** "Show me 5 repos I worked on recently"

**Agent:**
1. Calls query_memory.py list-recent-repos --count 5
2. Formats results with descriptions and last access info
3. Displays in order of most recent access

Related in General