{"id":"28f3c961-c21b-4d36-b3a5-0c7da0405676","shortId":"Fef94y","kind":"skill","title":"sn-image-doctor","tagline":"Environment diagnostic skill for SenseNova-Skills project.\nChecks that sn-image-base is properly installed and configured, validates dependencies\nand environment variables. Prompts user to configure missing required variables and saves\nthem to .env file. After configuration, relo","description":"# sn-image-doctor\n\n## Overview\n\n`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.\n\nThis skill performs comprehensive checks including:\n\n- Installation verification of SenseNova-Skills project\n- Python dependency validation\n- Environment variable configuration checks, with interactive prompts to configure missing required variables and save them to `.env`\n- Automatic environment reload after configuration changes, with agent restart suggestion if reload fails\n\n## Usage\n\nRun the doctor check to validate your environment:\n\n```bash\n# Basic check\npython scripts/check_environment.py\n\n# Verbose output with detailed diagnostics\npython scripts/check_environment.py --verbose\n```\n\n## Output Format\n\n### Text Output\n\n```\n=== SenseNova-Skills Environment Check ===\n\n[1/3] Checking sn-image-base installation...\n  ✅ Installation looks good\n\n[2/3] Checking Python dependencies...\n  ✅ Python 3.11.0\n  ✅ All required packages installed\n\n[3/3] Checking environment variables...\n  ❌ 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\n\n  Some required environment variables are missing.\n  Enter values below to save them to /path/to/.env.\n  Press Enter to skip a variable.\n\n  SN_API_KEY: <user input>\n\n  ✅ Saved to /path/to/.env: SN_API_KEY\n  🔄 Reloading environment...\n  ✅ Environment reloaded successfully\n\n=== Summary ===\n✅ Environment is properly configured\n```\n\nIf reload fails, the output will suggest restarting the agent:\n\n```\n  ✅ Saved to /path/to/.env: SN_API_KEY\n  🔄 Reloading environment...\n  ⚠️  Failed to reload environment: <error message>\n  💡 Suggestion: Restart the agent to apply new configuration\n```\n\n### Error Output\n\nWhen checks fail:\n\n```\n=== SenseNova-Skills Environment Check ===\n\n[1/3] Checking sn-image-base installation...\n  ❌ sn-image-base directory not found\n  Expected location: /path/to/skills/sn-image-base\n\n[2/3] Checking Python dependencies...\n  ❌ Missing packages: httpx, pillow\n  Run: pip install -r skills/sn-image-base/requirements.txt\n\n=== Summary ===\n❌ Environment check failed\nPlease fix the errors above before using SenseNova-Skills.\n```\n\n## Troubleshooting\n\n### sn-image-base Not Found\n\n**Problem:** `sn-image-base` directory not found\n\n**Solution:**\n\n```bash\n# Ensure you're in the project root\ncd /path/to/SenseNova-Skills\n\n# Verify the directory exists\nls -la skills/sn-image-base\n```\n\n### Missing Dependencies\n\n**Problem:** Required Python packages not installed\n\n**Solution:**\n\n```bash\n# Install dependencies\npip install -r skills/sn-image-base/requirements.txt\n\n# Or use a virtual environment\npython -m venv .venv\nsource .venv/bin/activate  # On Windows: .venv\\Scripts\\activate\npip install -r skills/sn-image-base/requirements.txt\n```\n\n### Missing Environment Variables\n\n**Problem:** Required environment variables not set\n\n**Solution:**\n\n```bash\n# If all capabilities use the same gateway, set only the global values.\nexport SN_API_KEY=\"your-api-key\"\nexport SN_BASE_URL=\"https://your-api-endpoint.com\"\n\n# Or create a .env file\ncat > .env << EOF\nSN_API_KEY=your-api-key\nSN_BASE_URL=https://token.sensenova.cn/v1\nSN_CHAT_TYPE=openai-completions\nSN_CHAT_MODEL=sensenova-6.7-flash-lite\nEOF\n\n# Load .env file\nsource .env  # Or use a tool like python-dotenv\n```\n\nFallback priority is capability-specific variable > domain shared variable > global variable. For example, text calls use `SN_TEXT_API_KEY` -> `SN_CHAT_API_KEY` -> `SN_API_KEY`; vision calls use `SN_VISION_API_KEY` -> `SN_CHAT_API_KEY` -> `SN_API_KEY`; image generation uses `SN_IMAGE_GEN_API_KEY` -> `SN_API_KEY`.\n\n### API Connectivity Issues\n\n**Problem:** Cannot reach API endpoints\n\n**Solution:**\n\n1. Verify network connectivity\n2. Check firewall settings\n3. Verify API endpoint URLs are correct\n4. Test with curl:\n\n   ```bash\n   curl -I https://your-api-endpoint.com\n   ```\n\n## Integration with Other Skills\n\nThis skill is designed to be run before using other skills in the SenseNova-Skills project:\n\n```bash\n# 1. Run doctor check\npython skills/sn-image-doctor/scripts/check_environment.py\n\n# 2. If checks pass, use other skills\npython skills/sn-image-base/scripts/sn_agent_runner.py sn-image-generate \\\n    --prompt \"A beautiful landscape\"\n```\n\n## Command-Line Options\n\n| Option | Description |\n|--------|-------------|\n| `--verbose` | Show detailed diagnostic information |\n| `--help` | Show help message |\n\n## Exit Codes\n\n| Code | Meaning |\n|------|---------|\n| `0` | All checks passed |\n| `1` | One or more checks failed |\n\n## See Also\n\n- `sn-image-base/SKILL.md` - Base-layer skill documentation\n- `sn-image-base/references/api_spec.md` - API specification\n- `sn-infographic/SKILL.md` - Example of a skill that depends on sn-image-base","tags":["image","doctor","sensenova","skills","opensensenova","agent","agent-skills","ai-agents","ai-assistant","data-analysis","document-processing","office-automation"],"capabilities":["skill","source-opensensenova","skill-sn-image-doctor","topic-agent","topic-agent-skills","topic-ai-agents","topic-ai-assistant","topic-data-analysis","topic-document-processing","topic-office-automation","topic-presentation-slides"],"categories":["SenseNova-Skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/OpenSenseNova/SenseNova-Skills/sn-image-doctor","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add OpenSenseNova/SenseNova-Skills","source_repo":"https://github.com/OpenSenseNova/SenseNova-Skills","install_from":"skills.sh"}},"qualityScore":"0.700","qualityRationale":"deterministic score 0.70 from registry signals: · indexed on github topic:agent-skills · 1627 github stars · SKILL.md body (4,912 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:53:04.913Z","embedding":null,"createdAt":"2026-05-15T06:53:10.065Z","updatedAt":"2026-05-18T18:53:04.913Z","lastSeenAt":"2026-05-18T18:53:04.913Z","tsv":"'-6.7':473 '/path/to/.env':227,239,265 '/path/to/sensenova-skills':362 '/path/to/skills/sn-image-base':309 '/references/api_spec.md':666 '/skill.md':656,672 '/v1':462 '0':59,640 '1':553,598,644 '1/3':159,293 '2':557,604 '2/3':169,310 '3':561 '3.11.0':174 '3/3':179 '4':568 'activ':401 'agent':122,262,278 'also':651 'api':186,190,197,204,235,241,267,431,435,451,455,510,514,517,524,528,531,539,542,544,550,563,667 'appli':280 'automat':115 'base':18,164,298,303,341,348,439,458,655,658,665,683 'base-lay':657 'bash':137,353,379,416,572,597 'basic':138 'beauti':619 'call':506,520 'cannot':548 'capability-specif':494 'capabl':419,495 'cat':447 'cd':361 'chang':120 'chat':464,470,513,527 'check':13,86,101,132,139,158,160,170,180,286,292,294,311,325,558,601,606,642,648 'code':637,638 'command':622 'command-lin':621 'complet':468 'comprehens':85 'configur':23,32,43,81,100,106,119,195,200,252,282 'connect':545,556 'correct':567 'creat':443 'curl':571,573 'depend':25,96,172,313,371,381,678 'descript':626 'design':583 'detail':145,629 'diagnost':6,146,630 'directori':304,349,365 'doctor':4,48,53,131,600 'document':661 'domain':498 'dotenv':490 'endpoint':551,564 'ensur':72,354 'enter':220,229 'env':40,114,445,448,479,482 'environ':5,27,66,98,116,136,157,181,216,244,245,249,270,274,291,324,390,407,411 'eof':449,477 'error':283,330 'exampl':504,673 'exist':366 'exit':636 'expect':307 'export':429,437 'fail':127,255,271,287,326,649 'fallback':491 'file':41,446,480 'firewal':559 'fix':328 'flash':475 'flash-lit':474 'format':151 'found':306,343,351 'gateway':423 'gen':185,203,538 'generat':189,211,534,616 'global':427,501 'good':168 'help':632,634 'httpx':316 'imag':3,17,47,52,163,184,188,202,210,297,302,340,347,533,537,615,654,664,682 'image-generation-specif':209 'includ':87 'infograph':671 'inform':631 'infrastructur':56 'instal':21,79,88,165,166,178,299,320,377,380,383,403 'integr':576 'interact':103 'issu':546 'key':187,191,198,205,236,242,268,432,436,452,456,511,515,518,525,529,532,540,543 'la':368 'landscap':620 'layer':659 'like':487 'line':623 'lite':476 'load':478 'locat':308 'look':167 'ls':367 'm':392 'mean':639 'messag':635 'miss':33,107,219,314,370,406 'model':471 'network':555 'new':281 'one':645 'openai':467 'openai-complet':466 'option':624,625 'output':143,150,153,257,284 'overrid':213 'overview':49 'packag':177,315,375 'pass':607,643 'perform':84 'pillow':317 'pip':319,382,402 'pleas':327 'press':228 'prioriti':492 'problem':344,372,409,547 'project':12,76,94,359,596 'prompt':29,104,617 'proper':20,78,251 'python':95,140,147,171,173,312,374,391,489,602,611 'python-dotenv':488 'r':321,384,404 're':356 'reach':549 'relo':44 'reload':117,126,243,246,254,269,273 'requir':34,108,176,215,373,410 'restart':123,260,276 'root':360 'run':68,129,318,586,599 'save':37,111,224,237,263 'script':400 'scripts/check_environment.py':141,148 'see':650 'sensenova':10,64,74,92,155,289,335,472,594 'sensenova-skil':9,63,73,91,154,288,334,593 'set':194,414,424,560 'share':499 'show':628,633 'skill':7,11,57,65,70,75,83,93,156,290,336,579,581,590,595,610,660,676 'skill-sn-image-doctor' 'skills/sn-image-base':369 'skills/sn-image-base/requirements.txt':322,385,405 'skills/sn-image-base/scripts/sn_agent_runner.py':612 'skills/sn-image-doctor/scripts/check_environment.py':603 'skip':231 'sn':2,16,46,51,162,183,196,201,234,240,266,296,301,339,346,430,438,450,457,463,469,508,512,516,522,526,530,536,541,614,653,663,670,681 'sn-image-bas':15,161,295,300,338,345,652,662,680 'sn-image-doctor':1,45,50 'sn-image-gener':613 'sn-infograph':669 'solut':352,378,415,552 'sourc':395,481 'source-opensensenova' 'specif':212,496,668 'success':247 'suggest':124,259,275 'summari':248,323 'test':569 'text':152,505,509 'tier':58 'token.sensenova.cn':461 'token.sensenova.cn/v1':460 'tool':486 'topic-agent' 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-assistant' 'topic-data-analysis' 'topic-document-processing' 'topic-office-automation' 'topic-presentation-slides' 'troubleshoot':337 'type':465 'url':440,459,565 'usag':128 'use':333,387,420,484,507,521,535,588,608 'user':30 'valid':24,61,97,134 'valu':221,428 'variabl':28,35,99,109,182,217,233,408,412,497,500,502 'venv':393,394,399 'venv/bin/activate':396 'verbos':142,149,627 'verif':89 'verifi':363,554,562 'virtual':389 'vision':519,523 'window':398 'your-api-endpoint.com':441,575 'your-api-key':433,453","prices":[{"id":"8f6727e1-45a6-47e9-a9fb-d3081c7c69cf","listingId":"28f3c961-c21b-4d36-b3a5-0c7da0405676","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"OpenSenseNova","category":"SenseNova-Skills","install_from":"skills.sh"},"createdAt":"2026-05-15T06:53:10.065Z"}],"sources":[{"listingId":"28f3c961-c21b-4d36-b3a5-0c7da0405676","source":"github","sourceId":"OpenSenseNova/SenseNova-Skills/sn-image-doctor","sourceUrl":"https://github.com/OpenSenseNova/SenseNova-Skills/tree/main/skills/sn-image-doctor","isPrimary":false,"firstSeenAt":"2026-05-15T06:53:10.065Z","lastSeenAt":"2026-05-18T18:53:04.913Z"}],"details":{"listingId":"28f3c961-c21b-4d36-b3a5-0c7da0405676","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"OpenSenseNova","slug":"sn-image-doctor","github":{"repo":"OpenSenseNova/SenseNova-Skills","stars":1627,"topics":["agent","agent-skills","ai-agents","ai-assistant","data-analysis","document-processing","office-automation","presentation-slides"],"license":"mit","html_url":"https://github.com/OpenSenseNova/SenseNova-Skills","pushed_at":"2026-05-15T04:43:37Z","description":"Modular SenseNova skills for building AI-powered office assistants and productivity workflows","skill_md_sha":"26c7f81b38791f95763a2d08e0a34fe1e4c5238d","skill_md_path":"skills/sn-image-doctor/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/OpenSenseNova/SenseNova-Skills/tree/main/skills/sn-image-doctor"},"layout":"multi","source":"github","category":"SenseNova-Skills","frontmatter":{"name":"sn-image-doctor","description":"Environment diagnostic skill for SenseNova-Skills project.\nChecks that sn-image-base is properly installed and configured, validates dependencies\nand environment variables. Prompts user to configure missing required variables and saves\nthem to .env file. After configuration, reloads environment and suggests agent restart if needed."},"skills_sh_url":"https://skills.sh/OpenSenseNova/SenseNova-Skills/sn-image-doctor"},"updatedAt":"2026-05-18T18:53:04.913Z"}}