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

redisのその他のスキル

docs-sync
redis
masterブランチの実装と設定を分析し、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パス)、DIALECT 2クエリ構文、…
redis-security
redis
Redisのセキュリティガイダンス。認証(requirepassとACLユーザー)、TLS、ACLベースの最小権限アクセス制御、ネットワーク露出の制限などをカバー。
redis-semantic-cache
redis
Redis LangCacheによる、Redis Cloud上でのLLM応答のセマンティックキャッシングのガイダンス — SDKまたはREST APIを介したsearch/setの呼び出し、類似度しきい値の調整、…
redis-vector-search
redis
Redisベクトル検索のガイダンス:HNSWとFLATアルゴリズムの選択、ベクトルインデックス設定(次元数、距離メトリック、データ型)、フィルタリング付きハイブリッド検索…
bump-test-image
redis
共有のDEFAULT_DOCKER_CONFIGとCIマトリックス内のRedis dockerテストイメージ(redislabs/client-libs-test)のデフォルトを更新し、強制プッシュします…
i18n
redis
RedisInsight UI(i18next)の国際化規約。redisinsight/ui/** 配下のユーザー向け文字列を追加・変更する際に使用します。…の編集時…