sn-image-doctor
Skill này làm gì
Skill này kiểm tra xem các công cụ SenseNova-Skills đã được cài và thiết lập đúng chưa. Skill dành cho người gặp lỗi từ các skill SenseNova và muốn biết còn thiếu gì.
Khi nào nên dùng
- ✓Khi một skill SenseNova thất bại và bạn muốn kiểm tra cài đặt.
- ✓Khi bạn vừa cài SenseNova-Skills và muốn xác nhận nó đã sẵn sàng.
- ✓Khi bạn cần thêm một khóa API còn thiếu vào cấu hình SenseNova.
Liên kết skill
https://github.com/OpenSenseNova/SenseNova-Skills/blob/main/skills/sn-image-doctor/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Kiểm tra xem cài đặt SenseNova-Skills của tôi đã đầy đủ chưa và cho tôi biết khóa nào còn thiếu.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chạy một kiểm tra xem cài đặt, các gói Python và biến môi trường, rồi đề nghị lưu các giá trị còn thiếu vào file cài đặt.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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:
# 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 ===
[1/3] Checking sn-image-base installation...
❌ sn-image-base directory not found
Expected location: /path/to/skills/sn-image-base
[2/3] Checking Python dependencies...
❌ Missing packages: httpx, pillow
Run: pip install -r skills/sn-image-base/requirements.txt
=== Summary ===
❌ Environment check failed
Please fix the errors above before using SenseNova-Skills.
Troubleshooting
sn-image-base Not Found
Problem: sn-image-base directory not found
Solution:
# Ensure you're in the project root
cd /path/to/SenseNova-Skills
# Verify the directory exists
ls -la skills/sn-image-base
Missing Dependencies
Problem: Required Python packages not installed
Solution:
# Install dependencies
pip install -r skills/sn-image-base/requirements.txt
# Or use a virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -r skills/sn-image-base/requirements.txt
Missing Environment Variables
Problem: Required environment variables not set
Solution:
# If all capabilities use the same gateway, set only the global values.
export SN_API_KEY="your-api-key"
export SN_BASE_URL="https://your-api-endpoint.com"
# Or create a .env file
cat > .env << EOF
SN_API_KEY=your-api-key
SN_BASE_URL=https://token.sensenova.cn/v1
SN_CHAT_TYPE=openai-completions
SN_CHAT_MODEL=sensenova-6.8-flash-lite
EOF
# Load .env file
source .env # Or use a tool like python-dotenv
Fallback 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.
API Connectivity Issues
Problem: Cannot reach API endpoints
Solution:
Verify network connectivity
Check firewall settings
Verify API endpoint URLs are correct
Test with curl:
curl -I https://your-api-endpoint.com
Integration with Other Skills
This skill is designed to be run before using other skills in the SenseNova-Skills project:
# 1. Run doctor check
python skills/sn-image-doctor/scripts/check_environment.py
# 2. If checks pass, use other skills
python skills/sn-image-base/scripts/sn_agent_runner.py sn-image-generate \
--prompt "A beautiful landscape"
Command-Line Options
| Option | Description |
|---|---|
| `--ve |
Câu hỏi thường gặp
Skill có hiển thị khóa API của tôi không?
Skill báo biến nào còn thiếu và chỉ lưu giá trị khi bạn tự nhập.
Tôi có cần khởi động lại agent không?
Đôi khi. Nếu việc tải lại thất bại, skill gợi ý khởi động lại agent.
Có chế độ chi tiết không?
Có. Tùy chọn verbose hiển thị chẩn đoán chi tiết hơn.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 6.0k
- Vị trí xếp hạng
- #14460
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
sn-code-video
6.0kDạy agent của bạn làm video chạy bằng code với Canvas, SVG, Three.js hoặc Remotion, kiểm tra từng khung hình và xuất ra MP4.
sn-image-base
6.0kCung cấp cho các skill khác những công cụ cấp thấp để tạo ảnh, nhận diện nội dung hình ảnh và tối ưu văn bản bằng dịch vụ SenseNova.
sn-image-imitate
6.0kGiúp agent của bạn tạo một ảnh mới sao chép phong cách của ảnh tham khảo, trong khi đổi nội dung cho khớp với yêu cầu của bạn.
sn-image-resume
6.0kGiúp agent của bạn biến nội dung sơ yếu lý lịch thành một ảnh CV được thiết kế theo phong cách portfolio, với lựa chọn phong cách tùy chọn.
Skill tương tự
openclaw-update
394kGiúp agent của bạn cập nhật OpenClaw Gateway đang có, chọn cách cập nhật phù hợp với cách cài đặt và giữ phiên làm việc của bạn hoạt động.
diagnose-gateway
394kGiúp agent của bạn tìm hiểu vì sao OpenClaw Gateway bị lỗi bằng cách kiểm tra cài đặt, kênh và cổng mà không thay đổi gì.
crabbox-apps
394kGiúp agent của bạn mở và chạy một app trên máy đám mây tạm thời, rồi hiển thị giao diện của nó trong thanh bên của chat.