agentleFS
3akat-system3akat-system/nexus-starter/.claude/skills/qa-agent/SKILL.md

qa-agent

Skill0 starsChanged 6 months agoMITView on GitHub

QA Agent — API and application testing. TRIGGER when: протестируй, test, тест, проверь API, check API, health check API, тесты API, API tests, работает ли, is it working, smoke test, проверь эндпоинты, check endpoints, regression test, API тест, API test, проверь что не сломалось, check nothing is broken, всё работает, everything works. Contains: API endpoint testing, smoke tests, regression check, health verification, test report.

  • Reads credentials
  • Sends data out

9 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use release-manager.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • exzmSkill

    release-manager

    Manages releases as a Release Manager/Tech Lead. Verifies all steps are completed successfully, checks tests, code review status, documentation, and requirements compliance. Creates commit messages, release notes, determines version bumps, and makes release decisions. Use when preparing releases, creating changelogs, or when the user requests release management.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 9 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If at least one test failed — send an alert:

    line 232

“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

QA Agent — API and Application Testing

Role

You are the QA Agent. You run smoke tests, check API endpoints, detect regressions, and generate reports. Save to Agent-Notes/qa-report.md (overwrite) and Agent-Notes/qa-history/YYYY-MM-DD.md (archive). On FAIL — send a Telegram alert.


Servers and SSH

ServerIPSSH CommandPM2 Processes
Beget Fuji155.212.210.165ssh -i ~/.ssh/id_rsa root@155.212.210.165fuji-routes, staff-bot, orders-bot
Beget PlusOne31.128.42.61ssh -i ~/.ssh/id_rsa root@31.128.42.61plusone-bot
Aeza (VPN, NEXUS)46.226.162.87ssh -i ~/.ssh/vpn_server_key root@46.226.162.87nexus-bot-v2, nexus-max, nexus-local, nexus-dashboard, vpn-bot

Always use explicit ssh -i key root@IP. Aliases are unreliable in subagents.


1. Fuji-master (155.212.210.165)

Base URL: http://localhost:3000 via SSH (direct access without TLS)

PM2 Status

ssh root@155.212.210.165 "pm2 status 2>&1 | head -20"

Smoke Test Endpoints

# Ping
ssh root@155.212.210.165 "curl -s -w '\n%{http_code} %{time_total}s' http://localhost:3000/api/ping"

# Главная страница
ssh root@155.212.210.165 "curl -s -o /dev/null -w '%{http_code} %{time_total}s' http://localhost:3000/"

# API без авторизации — должен вернуть 401
ssh root@155.212.210.165 "curl -s -o /dev/null -w '%{http_code}' http://localhost:3000/api/orders"

Auth + Full Test (with token)

# Step 1: find .env on server
ssh root@155.212.210.165 "find /var -name '.env' 2>/dev/null | xargs grep -l 'AUTH_PASSWORD' 2>/dev/null | head -3"

# Step 2: get token (using password found in .env)
TOKEN=$(ssh root@155.212.210.165 "curl -s http://localhost:3000/api/auth/login \
  -X POST -H 'Content-Type: application/json' \
  -d '{\"login\":\"admin\",\"password\":\"ПАРОЛЬ_ИЗ_ENV\"}'" | node -e "process.stdin.resume(); let d=''; process.stdin.on('data',c=>d+=c); process.stdin.on('end',()=>{try{console.log(JSON.parse(d).token||'')}catch{console.log('')}})")

# Step 3: test endpoints with token
for ENDPOINT in /api/orders /api/staff /api/clients /api/settings /api/route-points; do
  ssh root@155.212.210.165 "curl -s -w '\n%{http_code} %{time_total}s' \
    -H 'Authorization: Bearer $TOKEN' http://localhost:3000$ENDPOINT" | tail -1
done

Boss Cabinet (separate role — admin)

# Boss Cabinet эндпоинты — требуют токен пользователя с ролью boss/admin
for ENDPOINT in /api/boss/production/history /api/boss/managers /api/boss/routes/volume; do
  ssh root@155.212.210.165 "curl -s -o /dev/null -w '$ENDPOINT → %{http_code} %{time_total}s\n' \
    -H 'Authorization: Bearer $TOKEN' http://localhost:3000$ENDPOINT"
done

Critical Fuji Endpoints

#MethodEndpointExpectedDescription
1GET/api/ping200Health check
2POST/api/auth/login200 + tokenAuth
3GET/api/orders200 + arrayOrder list
4GET/api/staff200 + arrayStaff list
5GET/api/clients200 + arrayClient list
6GET/api/settings200Settings
7GET/api/route-points200 + arrayRoute points
8GET/api/boss/production/history200Production history
9GET/api/boss/managers200 + arrayManager list
10GET/api/boss/routes/volume200 + arrayRoute volume
11GET/ (app.html)200Web dashboard

2. PlusOne (31.128.42.61)

PM2 Status

ssh -i ~/.ssh/id_rsa root@31.128.42.61 "pm2 status 2>&1 | head -10"

Logs

ssh -i ~/.ssh/id_rsa root@31.128.42.61 "pm2 logs --lines 15 --nostream 2>&1 | tail -15"

Expectations: plusone-bot status=online, no Error/FATAL.


3. NEXUS-Bot + nexus-max + nexus-local (46.226.162.87)

PM2 Status of All Processes

ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 jlist 2>/dev/null | \
  node -e \"const p=JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); \
  p.forEach(x=>{ \
    const s=x.pm2_env.status==='online'?'✅':'❌'; \
    const mem=Math.round(x.monit.memory/1024/1024); \
    console.log(s,x.name,'|',mem+'MB','| restarts:',x.pm2_env.restart_time); \
  })\""

nexus-bot-v2 (Telegram)

# PM2 статус
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 status nexus-bot-v2 2>&1 | tail -5"

# Логи — нет ли Error/FATAL
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 logs nexus-bot-v2 --lines 15 --nostream 2>&1 | tail -15"

Expectations: status=online, <5 restarts per hour, no Error/FATAL.

nexus-max (Max мессенджер, порт 3200)

# PM2 статус
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 status nexus-max 2>&1 | tail -5"

# Логи
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 logs nexus-max --lines 10 --nostream 2>&1 | tail -10"

# Webhook endpoint доступен
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 \
  "curl -s -o /dev/null -w '%{http_code}' http://localhost:3200/health 2>/dev/null || echo 'no health endpoint'"

# Проверка Max webhook подписки (заменить TOKEN)
# curl -s "https://botapi.max.ru/subscriptions" -H "Authorization: <BOT_TOKEN>"

Expectations: status=online, port 3200 listening.

nexus-local (Claude агент, CouchDB queue)

# PM2 статус
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 status nexus-local 2>&1 | tail -5"

# Нет ли 401/COUCH ошибок
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 logs nexus-local --err --lines 10 --nostream 2>&1 | tail -10"

Expectations: status=online, no ANTHROPIC_API_KEY/401/COUCH errors.


4. VPN-Service (46.226.162.87)

PM2 процесс: vpn-bot | Лендинг: https://nexusvpn.site

Landing and Bot

# Лендинг доступен
curl -s -o /dev/null -w '%{http_code}' https://nexusvpn.site

# PM2 статус
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 status vpn-bot 2>&1 | tail -5"

# Нет новых ошибок (фильтр — не показывать строки до текущего запуска)
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 logs vpn-bot --err --lines 10 --nostream 2>&1 | tail -10"

# SSL сертификат nexusvpn.site
echo | openssl s_client -servername nexusvpn.site -connect nexusvpn.site:443 2>/dev/null \
  | openssl x509 -noout -dates 2>/dev/null

Known VPN Bot Statuses

IssueStatusDate
Subscription URL duplicated (...9443https://...9443/sub/...)✅ Fixed2026-04-27
ROBOKASSA_PASS2 not set — payment webhook disabled⏳ Waiting for Robokassa activation—

Important: ROBOKASSA_PASS2 not set — webhook server disabled in logs — this is expected behavior until Robokassa is activated. Not a FAIL.


5. nexus-system.ru (Aeza)

# Сайт доступен
curl -s -o /dev/null -w '%{http_code}' https://nexus-system.ru

# SSL
echo | openssl s_client -servername nexus-system.ru -connect nexus-system.ru:443 2>/dev/null \
  | openssl x509 -noout -dates 2>/dev/null

6. nexus-dashboard (panel.nexus-system.ru)

# PM2 статус
ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "pm2 status nexus-dashboard 2>&1 | tail -5"

# Дашборд отвечает
curl -s -o /dev/null -w '%{http_code}' https://panel.nexus-system.ru

Response Time Thresholds

TimeRating
< 200ms✅ excellent
200-500ms⚠️ normal
500ms-2s⚠️ slow
> 2s❌ critical

Telegram Alert on FAIL

If at least one test failed — send an alert:

# Variables are taken from /root/.env on Aeza
TG_TOKEN="<NEXUS_BOT_TOKEN из /root/.env>"
TG_CHAT="<NEXUS_ADMIN_CHAT из /root/.env>"
# Or load: ssh -i ~/.ssh/vpn_server_key root@46.226.162.87 "cat /root/.env | grep -E 'NEXUS_BOT_TOKEN|NEXUS_ADMIN_CHAT'"

curl -s -X POST "https://api.telegram.org/bot${TG_TOKEN}/sendMessage" \
  -d chat_id="$TG_CHAT" \
  -d parse_mode="HTML" \
  -d text="🔴 <b>QA FAIL — $(date '+%Y-%m-%d %H:%M')</b>%0A%0A<b>Проблемы:</b>%0A$(echo "$FAILS" | sed 's/$/\n/g')"

Testing Algorithm

  1. PM2 status — all processes online?
  2. Smoke test — basic GET without auth
  3. Auth test — GET with Bearer token (password from .env on server)
  4. Boss Cabinet — /api/boss/* endpoints
  5. nexus-max — PM2 online, port 3200 listening
  6. nexus-local — PM2 online, no COUCH/401 errors
  7. VPN — landing 200, PM2 online, SSL valid
  8. nexus-system.ru — 200, SSL valid
  9. Collect FAILs — all non-OK results into a list
  10. If FAIL > 0 — send Telegram alert

Report Format

## 🧪 QA Report — YYYY-MM-DD HH:MM

### Фуджи-мастер

| # | Endpoint | Status | Time | Result |
|---|----------|--------|------|--------|
| 1 | GET /api/ping | 200 ✅ | 12ms | OK |
| 2 | POST /api/auth/login | 200 ✅ | 45ms | token received |
| 3 | GET /api/orders | 200 ✅ | 120ms | 47 records |
| 4 | GET /api/staff | 200 ✅ | 35ms | 8 records |
| 5 | GET /api/clients | 200 ✅ | 28ms | 12 records |
| 6 | GET /api/settings | 200 ✅ | 15ms | OK |
| 7 | GET /api/route-points | 200 ✅ | 22ms | 8 records |
| 8 | GET /api/boss/production/history | 200 ✅ | 45ms | 14 records |
| 9 | GET /api/boss/managers | 200 ✅ | 18ms | 3 records |
| 10 | GET /api/boss/routes/volume | 200 ✅ | 55ms | 7 records |

### Aeza PM2

| Процесс | Status | Memory | Restarts | Verdict |
|---------|--------|--------|----------|---------|
| nexus-bot-v2 | ✅ online | 72mb | 5 | OK |
| nexus-max | ✅ online | 70mb | 50* | OK (*исторические) |
| nexus-local | ✅ online | 85mb | 4 | OK |
| nexus-dashboard | ✅ online | 94mb | 0 | OK |
| vpn-bot | ✅ online | 82mb | 1 | OK |

### VPN
- nexusvpn.site: ✅ 200
- SSL: valid until YYYY-MM-DD

### nexus-system.ru
- nexus-system.ru: ✅ 200

### Проблемы
1. ❌ описание

### Итог: X/Y тестов прошли (Z%)

Сохранение

# Текущий отчёт (перезапись):
Agent-Notes/qa-report.md

# Архив (не удалять!):
Agent-Notes/qa-history/YYYY-MM-DD.md

Создать директорию при первом запуске: mkdir -p Agent-Notes/qa-history/


Правила

  1. Только GET — не модифицируй данные, не создавай/удаляй записи
  2. Пароли из .env — брать с сервера, не хардкодить
  3. 500 → покажи тело ответа — стектрейс поможет диагностировать
  4. Замеряй время каждого запроса через %{time_total}
  5. FAIL → Telegram — не молчи, если что-то упало
  6. Историю не удалять — qa-history/ содержит архив для сравнения
  7. ROBOKASSA_PASS2 not set — не считать FAIL до активации Robokassa

Интеллект агента — принятие решений

Decision Tree (додумывай сам)

Проблема обнаружена?
├─ PM2 процесс errored/stopped
│  ├─ Один процесс → просто FAIL в отчёт
│  └─ >2 процесса на сервере → вероятно проблема самого сервера → проверить uptime/disk
│
├─ HTTP 500
│  ├─ На одном эндпоинте → баг в коде, показать тело ответа
│  └─ На всех → сервер/БД проблема → предложить: "запусти db-health" или "проверь логи"
│
├─ HTTP 401/403
│  ├─ На /api/orders → токен невалидный → попробовать повторную авторизацию
│  └─ На /api/boss/* → роль пользователя не boss → указать в отчёте
│
├─ Время ответа > 2s
│  ├─ Один эндпоинт → медленный SQL → предложить: "запусти db-health"
│  └─ Все эндпоинты → перегрузка → предложить: "проверь логи и ресурсы"
│
├─ SSL expiry < 7 дней
│  └─ КРИТИЧНЫЙ FAIL → Telegram-алерт с текстом "SSL expires in N days!"
│
└─ Всё ОК
   └─ Записать отчёт, никаких алертов

Кросс-агентная интеграция

СитуацияДействие
После deployDeploy Agent → автоматически вызывает QA Agent
DB медленноQA видит > 2s → предлагает запустить /db-health
Сервер упалQA видит PM2 errored → предлагает запустить /debug-server
Security concernQA видит 500 с stack trace → предлагает /security-check
Всё ОК после deployQA подтверждает deploy успешен → запись в deploy-log

Самообучение

После каждого прогона — дописать в Agent-Notes/qa-lessons.md:

## YYYY-MM-DD
- [факт] описание: что обнаружил, что было неожиданным
- [правило] если X → то Y (новый паттерн для будущих прогонов)

Перед следующим прогоном — прочитать qa-lessons.md и учесть накопленные паттерны.

Режимы запуска

КомандаРежимЧто проверяет
протестируй всёFullВсе серверы, все эндпоинты
проверь фуджиTargetedТолько Фуджи сервер
smoke testQuickPM2 status + /ping на всех серверах
проверь после деплоя XPost-deployТолько X проект, повышенное внимание к регрессиям

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.