skill-packs/ewerest-ai-chatbot/SKILL.md
Production Cloudflare Workers AI chatbot for ООО «Эверест» (B2B bearings, ewerest.ru) with conversation memory (D1), RAG over knowledge base (Vectorize + R2), bearing identification, ГОСТ⇄ISO analog lookup, and admin panel. Use whenever the user asks to create, deploy, fix, extend, or audit a Cloudflare Workers AI chatbot for Everest / bearings / ai-kb.35ewerest.workers.dev / b24-catalog. Also trigger on: создай бота на Workers AI, чат-бот Эверест, RAG бот подшипники, бот с памятью D1, векторный поиск Vectorize, база знаний R2, подбор аналогов в боте, ai-kb bot, Workers AI chatbot, Cloudflare AI bot with memory, deploy CF AI bot, системный промпт для бота подшипников, admin panel for Workers AI bot.
npx skillsauth add ArtemFilin1990/b24-catalog ewerest-ai-chatbotInstall 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.
Production-ready RAG-чатбот для B2B каталога подшипников. Разворачивается одной командой на
аккаунте 84cbacc4816c29c294101ec57a0bea5d, использует Workers AI + D1 + Vectorize + R2.
Триггеры:
ArtemFilin1990/b24-catalog по теме бота[User] ──HTTP──▶ [Worker: /chat]
│
├─▶ D1: chat_history(session_id, role, content, ts) ← память диалога
├─▶ Vectorize: query(embedding) ← top-K чанков KB
├─▶ R2: get(doc_id) ← полные документы
├─▶ D1: catalog(part_number, d, D, H, brand, ...) ← подшипники
└─▶ AI: llama-3.3-70b (chat completion с контекстом)
│
▼
Ответ + источники
Bindings (см. references/wrangler-template.toml):
AI — Workers AIDB — D1 (11a157a7-c3e0-4b6b-aa24-3026992db298)KB_INDEX — Vectorize index (embeddings KB)CATALOG_INDEX — Vectorize index (embeddings каталога, опционально)R2 — R2 bucket vedroASSETS — static admin UIcp references/wrangler-template.toml wrangler.toml — заполни IDs.bash scripts/deploy.sh — создаст Vectorize-индексы (если нет), применит D1-миграции, задеплоит Worker.scripts/seed_catalog.py --xlsx catalog.xlsx — заливка каталога в D1.https://<worker>.workers.dev/admin → правка system prompt, загрузка документов в KB./chat POST {session_id, message} → ответ с источниками.src/)| Файл | Ответственность |
|-----------------|----------------------------------------------------------------------|
| index.js | Router /chat, /admin/*, /upload, /ingest |
| memory.js | D1 история: saveTurn, loadHistory(session, limit=10) |
| rag.js | Embedding → Vectorize query → R2 fetch чанков → форматирование |
| bearings.js | normalize(part), findAnalog(gost|iso) с правилом NO DIRECT EQUIV |
| prompt.js | Сборка system prompt + context + history |
| admin.js | GET/PUT system_prompt, params (temp, max_tokens, top-K) |
Бот ОБЯЗАН в ответах:
NO DIRECT EQUIV[[TBD]] + где проверитьЛогика в src/bearings.js. System prompt в references/system-prompt.md.
session_id (клиент передаёт в заголовке или body).chat_history (до 10 последних реплик по сессии).scripts/cleanup.sql).POST /upload — файл (PDF/DOCX/TXT) → R2 vedro/docs/<doc_id>./ingest?doc_id=... — парсинг → чанки по ~500 токенов → embedding (@cf/baai/bge-base-en-v1.5 или мультиязычная модель) → upsert в Vectorize./chat:
KB_INDEX.query(vector, topK=5)CONTEXT блок системного промптаwrangler.toml в репо — есть ли уже bindings.src/* в репо (в src/).references/wrangler-template.toml → wrangler.toml, заполни IDs.scripts/deploy.sh./chat curl-ом.src/index.js через Read.src/ в скилле — найди missing модули.memory.js, rag.js).index.js чтобы вызывал их в /chat.scripts/d1_schema.sql.references/system-prompt.md — актуален ли.src/bearings.js — правило NO DIRECT EQUIV на месте.normalize().python scripts/seed_catalog.py --xlsx <path> (читает 79 строк, 5 семейств SKF/ГПЗ/FAG/ZWZ).POST /upload multipart → POST /ingest?doc_id=<id>.KB_INDEX.describe() — количество векторов выросло.Проверить:
chat_history, catalog, config)/admin требует токен (ADMIN_TOKEN secret)/chat принимает session_id| Задача | Модель | Примечание |
|-----------|---------------------------------------|------------------------------------|
| Chat | @cf/meta/llama-3.3-70b-instruct-fp8-fast | качество/скорость |
| Chat-alt | @cf/qwen/qwen2.5-coder-32b-instruct | для кода/JSON режима |
| Embedding | @cf/baai/bge-m3 | мультиязычная (RU+EN), 1024 dim |
| Re-rank | @cf/baai/bge-reranker-base | опционально после Vectorize |
{
"temperature": 0.3,
"max_tokens": 1024,
"catalog_top_k": 5,
"kb_top_k": 5,
"history_turns": 10,
"embedding_model": "@cf/baai/bge-m3",
"chat_model": "@cf/meta/llama-3.3-70b-instruct-fp8-fast"
}
Хранится в D1 config (key/value). Правится через /admin.
ADMIN_TOKEN # bearer для /admin/*
TELEGRAM_TOKEN # опционально — пуш уведомлений о лидах
BITRIX24_WEBHOOK # опционально — создание лида в CRM
Перед деплоем:
npx wrangler deploy --dry-run
bash scripts/smoke_test.sh # curl /chat, /admin, /upload
НЕ использовать для:
CF Workers AI docs)telegram-everest-bots skill)b24-everest-bearings skill)AGENT.md — routing between modesreferences/bearing-rules.md — строгие правила ГОСТ⇄ISOreferences/system-prompt.md — эталонный system promptreferences/wrangler-template.toml — шаблон конфигаreferences/d1-schema.md — полная схема БДdevelopment
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.