brewcode/skills/grepai/SKILL.md
Manages grepai semantic search (setup, status, start, stop, reindex, optimize, upgrade).
npx skillsauth add kochetkov-ma/claude-brewcode brewcode:grepaiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
<instructions>Environment: Ollama + bge-m3 | GOB storage | Java/Kotlin/JS/TS
EXECUTE using Bash tool — detect mode from skill arguments:
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.
| 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:setupfirst to install brew, ollama, grepai, etc.
Full grepai installation and project setup.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/infra-check.sh" && echo "✅ infra-check" || echo "❌ infra-check FAILED"
STOP if ❌ — install missing components before continuing.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/mcp-check.sh" && echo "✅ mcp-check" || echo "❌ mcp-check FAILED"
This script configures MCP server and allowedTools permissions.
STOP if ❌ — fix MCP configuration before continuing.
SPAWN the bc-grepai-configurator agent using Task tool:
| Parameter | Value |
|-----------|-------|
| subagent_type | brewcode:bc-grepai-configurator |
| prompt | Configure grepai for this project. Analyze all build files, test patterns, source structure. Generate optimal .grepai/config.yaml. |
| model | opus |
Context:
BC_PLUGIN_ROOTis available in agent context (injected by pre-task.mjs hook).
WAIT for agent to complete before proceeding.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/init-index.sh" && echo "✅ init-index" || echo "❌ init-index FAILED"
STOP if ❌ — check
.grepai/logs/grepai-watch.logfor errors.
⏳ Synchronous — Large projects (5k+ files) take 10-30+ min. Monitor:
tail -f .grepai/logs/grepai-watch.log
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/create-rule.sh" && echo "✅ create-rule" || echo "❌ create-rule FAILED"
STOP if ❌ — manually create rule in
.claude/rules/.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/verify.sh" && echo "✅ verify" || echo "❌ verify FAILED"
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/status.sh" && echo "✅ status" || echo "❌ status FAILED"
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/start.sh" && echo "✅ start" || echo "❌ start FAILED"
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/stop.sh" && echo "✅ stop" || echo "❌ stop FAILED"
Full index rebuild: stop watch → clean → rebuild → restart.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/reindex.sh" && echo "✅ reindex" || echo "❌ reindex FAILED"
⏳ Synchronous — Monitor:
tail -f .grepai/logs/grepai-watch.log
Re-analyze project and regenerate config with backup.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/optimize.sh" && echo "✅ optimize-backup" || echo "❌ optimize-backup FAILED"
STOP if ❌ — check if .grepai/config.yaml exists.
SPAWN the bc-grepai-configurator agent using Task tool:
| Parameter | Value |
|-----------|-------|
| subagent_type | brewcode:bc-grepai-configurator |
| prompt | Re-analyze project and regenerate .grepai/config.yaml. Compare with existing config, optimize boost patterns, update trace languages. |
| model | opus |
Context:
BC_PLUGIN_ROOTis available in agent context (injected by pre-task.mjs hook).
WAIT for agent to complete.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/reindex.sh" && echo "✅ reindex" || echo "❌ reindex FAILED"
Update grepai CLI via Homebrew.
EXECUTE using Bash tool:
bash "${CLAUDE_SKILL_DIR}/scripts/upgrade.sh" && echo "✅ upgrade" || echo "❌ upgrade FAILED"
Use AskUserQuestion to ask which operation to run:
header: "grepai"
question: "Which grepai operation do you want to run?"
options:
- label: "setup"
description: "Initialize and configure semantic search for this project"
- label: "status"
description: "Check health, index stats, doctor"
- label: "start / watch"
description: "Start watch mode (auto-index on file changes)"
- label: "optimize"
description: "Update and rebuild the search index"
For stop, reindex, upgrade — user types via Other. After answer, GOTO that mode section.
</instructions># grepai [MODE]
## Detection
| Field | Value |
|-------|-------|
| Arguments | `$ARGUMENTS` |
| Mode | `[detected mode]` |
## Status
| Component | Status |
|-----------|--------|
| grepai CLI | [✅/❌] |
| ollama | [✅/❌] |
| bge-m3 model | [✅/❌] |
| MCP | [✅/❌] |
| Permissions | [✅/❌] allowedTools |
| .grepai/ | [✅/❌] |
| index | [size/indexing] |
| watch | [running/stopped] |
| rule | [✅/⚠️] |
## Actions Taken
- [action 1]
- [action 2]
## Next Steps
- [if any issues, list resolution steps]
devops
Publish content to brewpage.app — text, markdown, any file, or multi-file site. Asks namespace and password, returns public URL. Triggers: publish, share link, upload to brewpage, host page, brewpage, publish site, upload site, upload directory, deploy site, сделай публичную ссылку, опубликуй.
tools
Toggles terse-output mode for Claude Code - injects brief directives into main conversation (SessionStart) and sub-agent prompts (PreToolUse:Task) to cut preamble and filler. Profiles: light, medium, aggressive. Scope: global or project (project overrides). Triggers: think-short, be terse, think shorter, reduce tokens mode, level 1/2/3.
devops
Publish content to brewpage.app — text, markdown, JSON, file, or multi-file site. Asks namespace and password, returns public URL. Triggers: publish, share link, upload to brewpage, host page, brewpage, publish site, upload site, upload directory, deploy site, сделай публичную ссылку, опубликуй.
tools
Disables or enables individual plugin skills by writing skillOverrides to ~/.claude/settings.json (survives plugin updates). Modes: off, user-invocable-only, name-only. Triggers: disable skill, enable skill, toggle skill, hide skill, skill-toggle.