Auto-sync from website-creator
This commit is contained in:
132
README.md
Normal file
132
README.md
Normal file
@@ -0,0 +1,132 @@
|
||||
# OpenCode Skills
|
||||
|
||||
Personal collection of OpenCode skills for AI-powered terminal coding assistant.
|
||||
|
||||
## Skills
|
||||
|
||||
### image-generation
|
||||
Generate AI images from text prompts using Chutes AI.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 scripts/image_gen.py "a sunset over mountains"
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Customizable dimensions (576-2048px)
|
||||
- Adjustable inference steps
|
||||
- Seed control for reproducibility
|
||||
- Multiple guidance parameters
|
||||
|
||||
### image-edit
|
||||
Edit images with AI using text prompts and source images.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 scripts/image_edit.py "make it look like oil painting" photo.jpg
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Style transfer
|
||||
- Object modification
|
||||
- Negative prompts
|
||||
- Customizable output size
|
||||
|
||||
### skill-creator
|
||||
Create new OpenCode skills with proper structure and templates.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 scripts/create_skill.py <skill-name> "<description>"
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Auto-generates SKILL.md with proper frontmatter
|
||||
- Creates script template with env loading
|
||||
- Validates skill naming conventions
|
||||
- Sets up .env.example and requirements.txt
|
||||
|
||||
### image-analyze
|
||||
Analyze images with vision AI when the current model doesn't support images.
|
||||
|
||||
**Usage:**
|
||||
```bash
|
||||
python3 scripts/analyze_image.py photo.jpg "Describe what you see"
|
||||
```
|
||||
|
||||
**Features:**
|
||||
- Image description and analysis
|
||||
- Text extraction (OCR-like)
|
||||
- UI/diagram interpretation
|
||||
- Custom analysis prompts
|
||||
|
||||
## Quick Install (Recommended)
|
||||
|
||||
Use the automated installer - it will:
|
||||
- Detect all skills in the repo
|
||||
- Prompt for required environment variables
|
||||
- Create `.env` files with your credentials
|
||||
- Install skills to OpenCode (global or per-project)
|
||||
- Install Python dependencies
|
||||
|
||||
```bash
|
||||
./scripts/install-skills.sh
|
||||
```
|
||||
|
||||
## Manual Setup
|
||||
|
||||
If you prefer manual setup:
|
||||
|
||||
1. Install dependencies:
|
||||
```bash
|
||||
pip install -r skills/image-generation/scripts/requirements.txt
|
||||
pip install -r skills/image-edit/scripts/requirements.txt
|
||||
```
|
||||
|
||||
2. Configure API token:
|
||||
```bash
|
||||
cp skills/image-generation/scripts/.env.example skills/image-generation/scripts/.env
|
||||
cp skills/image-edit/scripts/.env.example skills/image-edit/scripts/.env
|
||||
# Edit .env files and add your CHUTES_API_TOKEN
|
||||
```
|
||||
|
||||
3. Install skills to OpenCode:
|
||||
```bash
|
||||
# Global install (available for all projects)
|
||||
mkdir -p ~/.config/opencode/skills
|
||||
cp -r skills/* ~/.config/opencode/skills/
|
||||
|
||||
# Or project-specific install
|
||||
mkdir -p .opencode/skills
|
||||
cp -r skills/* .opencode/skills/
|
||||
```
|
||||
|
||||
Then use naturally:
|
||||
```
|
||||
> Generate an image of a futuristic city
|
||||
> Edit photo.jpg to look like watercolor painting
|
||||
> Create a new skill called "weather-check" for getting weather data
|
||||
```
|
||||
|
||||
## Creating New Skills
|
||||
|
||||
Use the skill-creator to scaffold new skills:
|
||||
|
||||
```bash
|
||||
python3 skills/skill-creator/scripts/create_skill.py my-new-skill "Description of what it does"
|
||||
```
|
||||
|
||||
Then edit the generated files:
|
||||
1. `SKILL.md` - Define commands and options
|
||||
2. `scripts/my_new_skill.py` - Implement the functionality
|
||||
3. `scripts/.env.example` - Add required environment variables
|
||||
|
||||
## Security
|
||||
|
||||
- `.env` files are gitignored (never commit actual credentials)
|
||||
- Use `.env.example` as template only
|
||||
- Images are saved locally to avoid memory usage in context
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user