Instalar en Claude Code
Copiargit clone https://github.com/pcx-wave/vibe-skill ~/.claude/skills/vibeDespués abre una sesión nueva de Claude Code; el skill carga automáticamente.
Definición
SKILL.md
# Vibe Orchestrator
## /vibeon | /vibeoff | /vibestatus
Toggle auto-delegate mode — Vibe automatically handles coding tasks without requiring `/vibe` each time.
| Command | Action |
|---------|--------|
| `/vibeon` | `touch ~/.local/share/vibe-auto.flag` → confirm "Auto-vibe ON" |
| `/vibeoff` | `rm -f ~/.local/share/vibe-auto.flag` → confirm "Auto-vibe OFF" |
| `/vibestatus` | report auto-mode (ON/OFF) **and** active model override |
For `/vibestatus`, run both checks and print two lines:
```
Auto-vibe: ON | OFF
Model: <alias> (override) OR Model: deepseek-flash (config default)
```
### Auto-mode pre-filter (when flag is set)
When `vibe-auto.flag` exists, apply this gate **before** loading the full skill:
| Task signal | Action |
|---|---|
| 1 file, ≤10 lines, exact location already known | Edit directly — do NOT invoke the skill |
| Logic non-trivial, location unclear, multiple files, HTML/JS content, or >1 change | Invoke `/vibe` as normal |
---
## /vibe-report
If the user invokes `/vibe-report`, run `~/tools/delegate-report` with any flags
extracted from the arguments, display output verbatim, and stop.
| User says | Flag |
|-----------|------|
| "last 7 days", "7d" | `--since 7` |
| "last 30 days", "30d" | `--since 30` |
| "project foo" | `--project foo` |
| "only failures", "fails", "bugs" | `--fails` |
| "adapt", "adaptations", "by adaptation" | `--adapt` |
| "all delegates", "everything", "compare delegates" | `--all` |
| "delegate foo", "only opencode" | `--delegate foo` |
| (nothing) | (no flags — vibe runs only) |
The report defaults to **vibe runs only**. The log is shared across delegate
tools (vibe, opencode, gemini); use `--all` for the cross-delegate comparison
or `--delegate NAME` to scope to a different one.
---
## /vibe-model-pick | /vibe-model-clear
Override the Vibe model for all subsequent delegations without touching `~/.vibe/config.toml`.
| Command | Action |
|---------|--------|
| `/vibe-model-pick <alias>` | `echo <alias> > ~/.local/share/vibe-model.flag` → confirm |
| `/vibe-model-clear` | `rm -f ~/.local/share/vibe-model.flag` → confirm "back to config default" |
**Available aliases** (from `~/.vibe/config.toml`):
| Alias | Model | Provider | Notes |
|-------|-------|----------|-------|
| `deepseek-flash` | deepseek-v4-flash | DeepSeek | Default — fast, cheap; solid for inline edits |
| `mistral-medium-3.5` | mistral-vibe-cli-latest | Mistral | Stronger reasoning; reliable for inline edits |
| `devstral-small` | devstral-small-latest | Mistral | Agent-mode — read/explore only, weak at inline edits |
| `local` | devstral (llamacpp) | Local | Requires local server on :8080 |
Run the bash command, print one confirmation line showing the active model, and stop.
---
When the user invokes `/vibe <instruction>`, Claude delegates the implementation
to Mistral Vibe via its programmatic mode, supervises in real time, and reports.
---
## Known Limits
Hard constraints — not config options. Full details in `SKILL-reference.md`.
- **UTF-8 / special chars** → silent `search_replace` match failure. Use `python3 str.replace()` for accented chars or emoji.
- **Code duplication** → Vibe may re-insert a block already written. Grep for duplicate definitions after every run.
- **HTML in prompt** → tags like `<div>` are shell redirects (exit 127). Write HTML content to a temp file; reference the path in the prompt.
- **Source code in bash heredoc** → quotes/backslashes mangle. Use `search_replace` directly; never a helper script that replaces code.
- **Orchestration chain** → 6 failure points in order: CLI auth → pseudo-TTY → stream parser → TOML pricing → git diff → JSON log. When a run produces unexpected results, work down this list. Full details in `SKILL-reference.md`.
---
## Step 1 — Detect workdir
1. `git rev-parse --show-toplevel` in the current directory.
2. If ambiguous or no git repo → ask with `AskUserQuestion`.
---
## Step 2 — Decompose the task
**Critical rule**: keep tasks **atomic and focused** — one objective, one prompt.
| Size | Definition | Max turns | Approach |
|------|-----------|-----------|----------|
| **Trivial** | 1 file, change is obvious and located | — | **Skip delegation — edit directly** |
| **Simple** | 1 file, non-trivial logic or unknown location | 5–8 | 1 vibe call |
| **Medium** | 2–3 related files, 1 objective | 8–12 | 1 structured vibe call |
| **Complex** | >3 files OR business logic OR DB migrations | — | **Break into sub-tasks** |
**Decomposition for complex tasks:**
```
Sub-task 1: Explore / read relevant files (read-only, 5 turns)
Sub-task 2: Implement change A in file X (8 turns)
Sub-task 3: Implement change B in file Y (8 turns)
Sub-task 4: Verify / test (5 turns)
```
→ Check git diff between each sub-task before launching the next.
---
## Step 3 — Write the Vibe prompt
The prompt must be **self-contained**.
**Structure:**
```
Stack: Python/Flask, SQLAlchemy, SQLite
Key files: app.py (routes + fetch), models.py (Entry)
TASK: [one single thing to do, stated as an imperative]
CONSTRAINTS:
- [what must not break]
- [expected format if relevant]
VERIFY: grep for "def function_name" in file.py and confirm it exists.
```
**Formulation rules:**
- One task per prompt — never "also do X and Y"
- Name the exact files to modify
- Include a grep-based verification criterion (not a file re-read)
- Language: English (better Mistral performance)
**Prompt adaptations:**
- **Any task that defines or calls a specific function**: include the exact signature — `def validate(data: dict) -> tuple[bool, list[str]]:`.
- **No fixed signature, but conventions matter**: point at the file to read first ("read app.py, follow its route/jsonify style") instead — don't do both, they're substitutes.
- **Write/modify tasks**: append an output format block:
```
OUTPUT FORMAT:
Modified: <file>
Does: <one line>
No other prose.
```
> ⚠️ **Shell safety**: if the prompt contains UTF-8 accented chars, emojis,
> `:` in