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:** Run `/brewcode:setup` first to install brew, ollama, grepai, etc.
---
## Mode: setup
Full grepai installation and project setup.
### Phase 1: Infrastructure Check
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/infra-check.sh" && echo "✅ infra-check" || echo "❌ infra-check FAILED"
```
> **STOP if ❌** — install missing components before continuing.
### Phase 2: MCP Configuration & Permissions
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/mcp-check.sh" && echo "✅ mcp-check" || echo