git-safety

от redis

Критические защитные барьеры для защищённых веток: никогда не коммитить, не пушить и не форс-пушить напрямую в ветки main, latest или release; никакого деструктивного изменения истории…

npx skills add https://github.com/redis/redisinsight --skill git-safety

Git Safety Rules for AI Agents

🚫 CRITICAL: Protected Branch Rules

AI agents must NEVER commit to or push to protected branches under any circumstances.

Protected Branches

  • main - Primary production branch
  • latest - Latest stable release
  • release/* - Release branches (e.g., release/v2.0.0)

This is a non-negotiable rule that applies to all scenarios:

Prohibited Actions

  • ❌ Direct commits - Never run git commit while on a protected branch
  • ❌ Direct pushes - Never run git push origin <protected-branch> or git push while on a protected branch
  • ❌ Force pushes - Never run git push --force or git push -f targeting protected branches
  • ❌ Merging into protected branches locally - Never run git merge <branch> while on a protected branch
  • ❌ Rebasing protected branches - Never run git rebase while on a protected branch
  • ❌ Resetting protected branches - Never run git reset while on a protected branch

Required Workflow

  1. Always create a feature branch before making any changes
  2. Verify current branch before any git operation using git branch --show-current
  3. Create Pull Requests for all changes - let the review process handle merging

Pre-Push Checklist

Before executing any push command, AI agents must:

  1. ✅ Confirm current branch is NOT a protected branch (main, latest, release/*)
  2. ✅ Verify the remote and branch target

Error Recovery

If accidentally on a protected branch with uncommitted changes:

  1. Stash changes: git stash
  2. Create new branch: git checkout -b <appropriate-branch-name>
  3. Apply changes: git stash pop
  4. Continue work on the new branch

Rationale

  • Protected branches represent production-ready or release code
  • All changes must go through code review via Pull Requests
  • Direct pushes bypass CI/CD checks and team review
  • Mistakes on protected branches can affect the entire team and deployment pipeline

Больше skills от redis

docs-sync
redis
Проанализировать реализацию и конфигурацию основной ветки, чтобы найти отсутствующую, неверную или устаревшую документацию в docs/, README.md и README каждого пакета. Использовать…
redis-query-engine
redis
Руководство по Redis Query Engine (RQE), охватывающее проектирование схемы FT.CREATE, выбор типов полей (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR), синтаксис запросов DIALECT 2,…
redis-search
redis
Руководство по Redis Search, охватывающее проектирование схемы FT.CREATE, выбор типов полей (TEXT, TAG, NUMERIC, GEO, GEOSHAPE, VECTOR, JSON path), синтаксис запросов DIALECT 2,…
redis-security
redis
Руководство по безопасности Redis, охватывающее аутентификацию (requirepass и пользователи ACL), TLS, контроль доступа на основе ACL с минимальными привилегиями, ограничение сетевого доступа через…
redis-semantic-cache
redis
Руководство Redis LangCache по семантическому кэшированию ответов LLM на Redis Cloud — вызов search/set через SDK или REST API, настройка порога схожести,…
redis-vector-search
redis
Руководство по векторному поиску Redis, охватывающее выбор алгоритма HNSW vs FLAT, конфигурацию векторного индекса (размерность, метрика расстояния, тип данных), гибридный поиск с фильтрацией…
bump-test-image
redis
Обновите стандартный Docker-образ для тестирования Redis (redislabs/client-libs-test) в общем DEFAULT_DOCKER_CONFIG и в CI-матрице, затем выполните force-push…
i18n
redis
Соглашения по интернационализации для интерфейса RedisInsight (i18next). Используйте при добавлении или изменении пользовательских строк в redisinsight/ui/**, редактировании…