brewcodegrepailisted
Install: claude install-skill kochetkov-ma/claude-brewcode
# grepai Skill
> **Environment:** Ollama + bge-m3 | GOB storage | Java/Kotlin/JS/TS
<instructions>
## Mode Detection
### Step 1: Detect Mode (MANDATORY FIRST STEP)
**EXECUTE** using Bash tool — detect mode from skill arguments:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/detect-mode.sh" "$ARGUMENTS"
```
Use `$ARGUMENTS` directly - it contains the skill invocation arguments.
Output format:
```
ARGS: [arguments received]
MODE: [detected mode]
```
**Use the MODE value and GOTO that section below.**
### Mode Reference
| Keyword in args | MODE |
|-----------------|------|
| upgrade, апгрейд | upgrade |
| optimize, update, улучши, обнови | optimize |
| stop, halt, kill | stop |
| start, watch | start |
| status, doctor, check, health | status |
| setup, configure, init | setup |
| reindex, rebuild, refresh | reindex |
| (empty) + .grepai/ exists | start |
| (empty) + no .grepai/ | setup |
| (unrecognized text) | prompt |
> **Prerequisites:** Homebrew, Ollama, the bge-m3 model, and the grepai CLI. The `setup` mode below runs `infra-check.sh` to verify them and, if anything is missing, offers to auto-install everything via `scripts/install.sh` (after confirmation).
---
## Mode: setup
Full grepai installation and project setup.
### Phase 1: Infrastructure Check & Auto-Install
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/infra-check.sh" && echo "✅ infra-check" || echo "⚠️ infra-check: prerequisites missing"
```
- Printed `✅ infra-check` (all pre