Token导航 LogoToken导航

Agent Skill · 运维和基础设施

managing-cluster-capacity(管理集群容量)

managing-cluster-capacity 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

managing-cluster-capacity 是运维和基础设施类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在运维和基础设施类的 2,449 个 Skill 里排第 1,915。

总安装 349周安装 15GitHub Stars 9下载 122核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:managing-cluster-capacity(管理集群容量)
来源仓库:https://github.com/cockroachlabs/cockroachdb-skills
仓库路径:skills/managing-cluster-capacity
安装命令:
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill managing-cluster-capacity
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill managing-cluster-capacity

这个 Skill 是做什么的

运维和基础设施类 Skill 处理部署、监控、日志和云资源,多数需要较高的执行权限。

managing-cluster-capacity 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息。适合在 Codex、Claude、Cursor、Gemini CLI 中围绕仓库状态、代码变更或协作事项进行整理。

通过 npx skills add 命令从指定 GitHub 仓库安装使用。需确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写操作。建议结合原始 README 核验具体用法后再部署到生产环境。

来源仓库内路径:skills/managing-cluster-capacity

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill manag…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

managing-cluster-capacity 怎么安装?

在终端执行 npx skills add https://github.com/cockroachlabs/cockroachdb-skills --skill managing-cluste…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

managing-cluster-capacity 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

managing-cluster-capacity 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

managing-cluster-capacity 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

managing-cluster-capacity 用的人多吗?

公开数据是累计安装 349 次,近一周安装 15 次,下载 122 次,GitHub 9 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

managing-cluster-capacity 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理运维和基础设施类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

运维和基础设施类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
brainstorming

头脑风暴 · Codex、Claude

3,148,776173,131操作浏览器MIT通过
copywriting

文案写作 · Codex、Claude

1,996,72425,583需要联网MIT通过
openclaw-secure-linux-cloud

OpenClaw secure linux cloud 命令行 · Codex、Claude

1,853,08840接触敏感数据未明确未通过
xget

xget 命令行 · Codex、Claude

1,799,28040执行命令未明确未通过
requesting-code-review

代码审查请求 · Codex、Claude

1,590,144173,103权限未标注MIT通过
managing-cluster-capacity

管理集群容量 · 本页

3499调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Managing Cluster Capacity

Manages cluster capacity across all CockroachDB deployment tiers. What "capacity" means varies by tier — Self-Hosted manages individual nodes, Advanced/BYOC manage node count and machine size, Standard manages provisioned vCPUs, and Basic auto-scales with cost controls.

When to Use This Skill

  • Permanently removing a node from a cluster (Self-Hosted)
  • Adding nodes to increase capacity (Self-Hosted)
  • Scaling cluster node count or machine size (Advanced, BYOC)
  • Adjusting provisioned compute (Standard)
  • Managing costs on a serverless cluster (Basic)
  • Replacing hardware or migrating infrastructure (Self-Hosted, BYOC)
  • Replacing a failed or dead node (Self-Hosted)
  • Managing storage utilization and disk pressure (Self-Hosted)

For temporary maintenance (not capacity changes): Use performing-cluster-maintenance. For pre-operation health check: Use reviewing-cluster-health.


Step 1: Gather Context

Required Context

QuestionOptionsWhy It Matters
Deployment tier?Self-Hosted, Advanced, BYOC, Standard, BasicDifferent capacity model per tier
Direction?Scale up (add capacity), Scale down (reduce capacity)Determines procedure

Additional Context (by tier)

If Self-Hosted (scaling down):

QuestionOptionsWhy It Matters
How many nodes to remove?1, multipleMulti-node decommission should be done simultaneously
Target node IDs?Node IDs from cockroach node statusRequired for CLI commands
Is the node alive or dead?Alive, DeadDead nodes use a different procedure
Deployment platform?Bare metal, VMs, KubernetesChanges CLI and cleanup steps
Current replication factor?3, 5, customMust have enough nodes remaining
Current node count?NumberValidates remaining capacity
Storage utilization?Low (<60%), Medium (60-80%), High (>80%)Determines urgency and whether storage maintenance is needed

If Advanced or BYOC:

QuestionOptionsWhy It Matters
Scale method?Cloud Console, API, TerraformDetermines procedure
Current and target configuration?e.g., 5 nodes → 3 nodes, or 4 vCPU → 8 vCPUValidates constraints
Cloud provider? (BYOC only)AWS, GCP, AzureAffects infrastructure verification

If Standard:

QuestionOptionsWhy It Matters
Current provisioned vCPUs?NumberContext for scaling decision
Target vCPUs?NumberValidates workload will fit

If Basic: Gather cost management goals — Basic auto-scales with no manual capacity control.

Context-Driven Routing


Self-Hosted Capacity Management

Applies when: Tier = Self-Hosted

Scaling Down: Decommission Nodes

Pre-Decommission Validation
-- All nodes live
SELECT n.node_id, n.is_live, n.build_tag
FROM crdb_internal.gossip_nodes n
JOIN crdb_internal.gossip_liveness l USING (node_id) ORDER BY n.node_id;

-- Ranges fully replicated
SELECT CASE WHEN array_length(replicas, 1) >= 3 THEN 'fully_replicated'
            ELSE 'under_replicated' END AS status, COUNT(*)
FROM crdb_internal.ranges_no_leases GROUP BY 1;

-- Remaining capacity check
SELECT node_id, store_id,
  ROUND(capacity / 1073741824.0, 2) AS total_gb,
  ROUND(available / 1073741824.0, 2) AS available_gb,
  ROUND((1 - available::FLOAT / capacity::FLOAT) * 100, 2) AS utilization_pct
FROM crdb_internal.kv_store_status ORDER BY node_id;

-- Replication factor
SHOW ZONE CONFIGURATION FOR RANGE default;

Remaining nodes must stay < 60% utilization after absorbing data. Node count after decommission must be >= replication factor.

If Node Is Alive: Drain Then Decommission
# Step 1: Drain
cockroach node drain <node_id> --certs-dir=<certs-dir> --host=<any-live-node>

# Step 2: Decommission (single node)
cockroach node decommission <node_id> --certs-dir=<certs-dir> --host=<any-live-node>

# Step 2: Decommission (multiple nodes — more efficient, do simultaneously)
cockroach node decommission <id_1> <id_2> <id_3> --certs-dir=<certs-dir> --host=<any-live-node>
If Node Is Dead: Replace Failed Node

When a node has been dead longer than server.time_until_store_dead (default 5m), CockroachDB automatically re-replicates its data to surviving nodes. Use this procedure to clean up the dead node and optionally add a replacement.

Step 1: Confirm the node is dead and data is safe

-- Confirm node is dead
SELECT node_id, is_live FROM crdb_internal.gossip_nodes WHERE node_id = <dead_node_id>;

-- Verify all ranges are fully replicated (no under-replicated after re-replication)
SELECT CASE WHEN array_length(replicas, 1) >= 3 THEN 'fully_replicated'
            ELSE 'under_replicated' END AS status, COUNT(*)
FROM crdb_internal.ranges_no_leases GROUP BY 1;

-- Check remaining capacity can handle the load
SELECT node_id, ROUND((1 - available::FLOAT / capacity::FLOAT) * 100, 2) AS utilization_pct
FROM crdb_internal.kv_store_status ORDER BY node_id;

If under-replicated ranges exist, wait for re-replication to complete before proceeding.

Step 2: Decommission the dead node (metadata cleanup)

cockroach node decommission <dead_node_id> --certs-dir=<certs-dir> --host=<any-live-node>

Step 3: Add a replacement node (recommended)

If remaining nodes are above 60% utilization, provision a replacement node using the Scaling Up: Add Nodes procedure.

Multiple dead nodes: Decommission all dead nodes simultaneously:

cockroach node decommission <id_1> <id_2> --certs-dir=<certs-dir> --host=<any-live-node>

See replacing-failed-nodes reference for detailed failure scenarios and recovery procedures.

Monitor Decommission Progress
cockroach node status --decommission --certs-dir=<certs-dir> --host=<any-live-node>

Wait for gossiped_replicas = 0 and membership = 'decommissioned'. Then stop the process on the decommissioned node.

Cancel a Decommission
cockroach node recommission <node_id> --certs-dir=<certs-dir> --host=<any-live-node>

Only works while still in decommissioning state.

Scaling Up: Add Nodes

  1. Provision new hardware/VM with same specs as existing nodes
  2. Install same CockroachDB version (cockroach version to confirm)
  3. Start node with --join pointing to existing cluster nodes
  4. Verify join: SELECT node_id, address, is_live FROM crdb_internal.gossip_nodes n JOIN crdb_internal.gossip_liveness l USING (node_id) ORDER BY node_id;
  5. Data rebalances automatically — monitor with: SELECT node_id, range_count, lease_count FROM crdb_internal.kv_store_status ORDER BY node_id;

Post-Scaling Verification

SELECT CASE WHEN array_length(replicas, 1) >= 3 THEN 'fully_replicated'
            ELSE 'under_replicated' END AS status, COUNT(*)
FROM crdb_internal.ranges_no_leases GROUP BY 1;

SELECT node_id, range_count, lease_count,
  ROUND((1 - available::FLOAT / capacity::FLOAT) * 100, 2) AS utilization_pct
FROM crdb_internal.kv_store_status ORDER BY node_id;

Advanced Scaling

Applies when: Tier = Advanced

Advanced clusters are managed by Cockroach Labs. Capacity is adjusted by changing node count or machine size.

Via Cloud Console

  1. Cluster → Capacity
  2. Adjust node count or machine type (vCPUs per node)
  3. CRL handles all node operations (drain, decommission, provisioning) safely
  4. Monitor progress in Cloud Console

Via Cloud API

# Scale node count
curl -X PATCH -H "Authorization: Bearer $COCKROACH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"config": {"num_nodes": <new_count>}}' \
  "https://cockroachlabs.cloud/api/v1/clusters/<cluster-id>"

Via Terraform

resource "cockroach_cluster" "example" {
  dedicated {
    num_virtual_cpus = 8     # vCPUs per node
    storage_gib      = 150
    num_nodes        = 5     # total nodes
  }
}

Pre-Scaling Check

-- Ensure no disruptive jobs are running before scaling down
WITH j AS (SHOW JOBS)
SELECT job_type, status, COUNT(*) FROM j WHERE status = 'running' GROUP BY 1, 2;

Constraints

  • Minimum: 3 nodes x 4 vCPUs (12 vCPUs total)
  • Scale down: Data must fit on remaining nodes; zone configs must be satisfiable
  • Scale up: Additional nodes available within your plan limits

BYOC Scaling

Applies when: Tier = BYOC

Follow all Advanced Scaling steps. BYOC scaling is managed through the same Cloud Console/API/Terraform interfaces.

Cloud Provider Verification (after scaling down)

If AWS:

aws ec2 describe-instances --filters "Name=tag:cockroach-cluster,Values=<cluster-name>" \
  --query 'Reservations[].Instances[].{ID:InstanceId,State:State.Name}'

If GCP:

gcloud compute instances list --filter="labels.cockroach-cluster=<cluster-name>"

If Azure:

az vm list --resource-group <rg> --query "[?tags.cockroachCluster=='<name>']"

Additional BYOC Considerations

  • Verify security groups/firewall rules after scaling
  • Update reserved instance or committed use discount allocations
  • Verify network connectivity (PrivateLink/PSC/VPC Peering) is unaffected
  • Check cloud billing reflects the new instance count

Standard Compute Management

Applies when: Tier = Standard

Standard is a multi-tenant managed service. There are no individual nodes. Capacity is managed by adjusting provisioned compute (vCPUs).

Adjust Provisioned vCPUs

  1. Cloud Console → Cluster → Capacity
  2. Increase or decrease provisioned vCPUs
  3. Change takes effect without downtime

Before Scaling Down

  • Review CPU utilization in Cloud Console — ensure workload fits within reduced compute
  • Storage is usage-based and unaffected by compute changes

After Scaling

Monitor P99 latency and QPS in Cloud Console for 24-48 hours. If latency increases after scaling down, scale compute back up.


Basic Cost Management

Applies when: Tier = Basic

Basic is a serverless offering that auto-scales. There are no nodes or provisioned compute to manage. Capacity scales automatically based on demand. Cost is managed through spending controls.

Manage Spending

  • Set spending limits: Cloud Console → Cluster → Settings → configure monthly spending cap
  • Review usage: Cloud Console shows Request Unit (RU) consumption over time
  • Optimize queries: Reduce RU consumption through query tuning and indexing
  • Archive data: Delete unused tables or databases to reduce storage costs

When to Consider Upgrading

If you need explicit control over compute capacity (guaranteed vCPUs), consider upgrading to Standard. If you need dedicated infrastructure, consider Advanced.


Safety Considerations

OperationTierReversible?
cockroach node decommissionSHRecommission only before completion
Stop decommissioned nodeSHNo (must rejoin as new node)
Add node to clusterSHYes (decommission to remove)
Scale via Console/APIADV/BYOCContact support to reverse
Adjust provisioned vCPUsSTDYes (scale back)
Set spending limitBASYes (adjust anytime)

Critical (Self-Hosted):

  • Never decommission below the replication factor
  • Always drain before decommission (for live nodes)
  • Decommission multiple nodes simultaneously (not sequentially)
  • Verify remaining capacity can absorb the data
  • For dead nodes: wait for re-replication to complete before decommissioning
  • Monitor storage utilization — nodes above 80% risk performance degradation

Troubleshooting

IssueTierFix
Decommission hangsSHCheck zone config constraints; investigate stalled ranges
Recommission failsSHNode already fully decommissioned; must rejoin as new
New node not rebalancingSHWait for automatic rebalancing; check range_count
Scale-down rejectedADV/BYOCBelow minimum or data won't fit
Latency spike after reductionSTDScale provisioned vCPUs back up
Cloud instances not cleaned upBYOCContact support; verify in cloud console
Dead node not re-replicatingSHCheck server.time_until_store_dead; verify surviving nodes have capacity
Storage utilization high after scale-downSHAdd replacement node or increase disk size

References

Skill references:

Related skills:

Official CockroachDB Documentation:

平台分布

Codex

34.8%
按下载量换算42

Claude

33.33%
按下载量换算41

Cursor

19.68%
按下载量换算24

Gemini CLI

9.91%
按下载量换算12

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills