# Sn Image Doctor

Environment diagnostic skill for SenseNova-Skills project.

- Repository: https://github.com/OpenSenseNova/SenseNova-Skills (6002 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-image-doctor -g -a claude-code -y`
Codex: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-image-doctor -g -a codex -y`
Cursor: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-image-doctor -g -a cursor -y`
Gemini CLI: `npx skills add OpenSenseNova/SenseNova-Skills --skill sn-image-doctor -g -a gemini-cli -y`

## Description

Environment diagnostic skill for SenseNova-Skills project. Checks that sn-image-base is properly installed and configured, validates dependencies and environment variables. Prompts user to configure missing required variables and saves them to .env file. After configuration, reloads environment and suggests agent restart if needed.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# sn-image-doctor

## Overview

`sn-image-doctor` is an infrastructure skill (tier 0) that validates the SenseNova-Skills environment before running other skills. It ensures SenseNova-Skills project is properly installed and configured.

This skill performs comprehensive checks including:

- Installation verification of SenseNova-Skills project
- Python dependency validation
- Environment variable configuration checks, with interactive prompts to configure missing required variables and save them to `.env`
- Automatic environment reload after configuration changes, with agent restart suggestion if reload fails

## Usage

Run the doctor check to validate your environment:

```bash
# Basic check
python scripts/check_environment.py

# Verbose output with detailed diagnostics
python scripts/check_environment.py --verbose
```

## Output Format

### Text Output

```
=== SenseNova-Skills Environment Check ===

[1/3] Checking sn-image-base installation...
  ✅ Installation looks good

[2/3] Checking Python dependencies...
  ✅ Python 3.11.0
  ✅ All required packages installed

[3/3] Checking environment variables...
  ❌ SN_IMAGE_GEN_API_KEY: Image generation API key is not set; configure SN_API_KEY, or configure SN_IMAGE_GEN_API_KEY only for an image-generation-specific override

  Some required environment variables are missing.
  Enter values below to save them to /path/to/.env.
  Press Enter to skip a variable.

  SN_API_KEY: <user input>

  ✅ Saved to /path/to/.env: SN_API_KEY
  🔄 Reloading environment...
  ✅ Environment reloaded successfully

=== Summary ===
✅ Environment is properly configured
```

If reload fails, the output will suggest restarting the agent:

```
  ✅ Saved to /path/to/.env: SN_API_KEY
  🔄 Reloading environment...
  ⚠️  Failed to reload environment: <error message>
  💡 Suggestion: Restart the agent to apply new configuration
```

### Error Output

When checks fail:

```
=== SenseNova-Skills Environment Check ===

The rest: https://github.com/OpenSenseNova/SenseNova-Skills/blob/HEAD/skills/sn-image-doctor/SKILL.md
