Skip to content
Back to skills

Diagnose

ASecurity

Run safe diagnostic commands on the remote memory server. Use for checking logs, container status, disk usage, memory, and running read-only database queries.

  • 3 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
devopsbashsqldockerapidatabase

Works with

  • api

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add mruwnik/memory --skill diagnose --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Diagnose?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Diagnose
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mruwnik-diagnose/badge)](https://www.skillsdirectory.com/skills/mruwnik-diagnose)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: diagnose
description: Run safe diagnostic commands on the remote memory server. Use for checking logs, container status, disk usage, memory, and running read-only database queries.
---

# Server Diagnostics

The diagnostics script is at `tools/diagnose.sh`. It provides safe, read-only commands for inspecting the remote server `memory` at `/home/ec2-user/memory`.

There are two deployments:

* memory - my personal stuff
* chris - Equistamp stuff

The default is to use the `memory` version - to use the `chris` one, call with `DEPLOY_DIR=/home/ec2-user/chris`

## Commands

### Status (overview)
Get overall system health:
```bash
./tools/diagnose.sh status
```
Shows: container status, memory, disk, and recent errors.

### Logs
View docker logs:
```bash
./tools/diagnose.sh logs              # all services, last 100 lines
./tools/diagnose.sh logs api          # specific service
./tools/diagnose.sh logs api 500      # last 500 lines
./tools/diagnose.sh logs worker 200   # worker logs
```

### Container Status
```bash
./tools/diagnose.sh ps
```

### System Resources
```bash
./tools/diagnose.sh disk    # disk usage breakdown
./tools/diagnose.sh mem     # memory usage
./tools/diagnose.sh top     # top processes by memory
```

### File Operations
```bash
./tools/diagnose.sh ls <path>              # list directory
./tools/diagnose.sh cat <file>             # view file
./tools/diagnose.sh tail <file> [lines]    # tail file (default: 50)
./tools/diagnose.sh grep <pattern> <path>  # search files
```

### Database Queries
Run read-only SQL queries (SELECT only):
```bash
./tools/diagnose.sh db "SELECT count(*) FROM source_item"
./tools/diagnose.sh db "SELECT * FROM source_item ORDER BY created_at DESC LIMIT 5"
./tools/diagnose.sh db "SELECT status, count(*) FROM source_item GROUP BY status"
```
Non-SELECT queries are blocked for safety.

## Common Diagnostics

**Check why API is failing:**
```bash
./tools/diagnose.sh logs api 200
```

**Check worker processing:**
```bash
./tools/diagnose.sh logs worker 100
```

**Database stats:**
```bash
./tools/diagnose.sh db "SELECT count(*) FROM source_item"
./tools/diagnose.sh db "SELECT modality, count(*) FROM source_item GROUP BY modality"
```

**Find recent errors:**
```bash
./tools/diagnose.sh status   # includes error grep
./tools/diagnose.sh grep "ERROR" src/
```

**Check disk space:**
```bash
./tools/diagnose.sh disk
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.