Token导航 LogoToken导航TokenDH.com
开发敏感数据github未标认证来源可访问许可证需确认审计通过

coderabbit-multi-env-setupCoderabbit 多环境设置

Agent Skill

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

总安装

588

周安装

24

GitHub Stars

2,087

下载量

188
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:coderabbit-multi-env-setup(Coderabbit 多环境设置)
来源仓库:https://github.com/jeremylongshore/claude-code-plugins-plus-skills
仓库路径:skills/coderabbit-multi-env-setup
安装命令:
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill coderabbit-multi-env-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus-skills --skill coderabbit-multi-env-setup

简介

Coderabbit 多环境设置提供开发、测试和生产环境的隔离配置与安全管理能力。

  • 支持为不同环境分配独立 API 密钥并配置专属参数,防止跨环境数据泄露。
  • 适用于需要严格环境隔离的 CI/CD 流水线和多团队协作场景。
  • 使用前需准备各环境独立凭证,并确保应用具备环境识别逻辑。
  • coderabbit-multi-env-setup 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

CodeRabbit Multi-Environment Setup

Overview

Configure CodeRabbit across development, staging, and production environments with isolated API keys, environment-specific settings, and proper secret management. Each environment gets its own credentials and configuration to prevent cross-environment data leakage.

Prerequisites

  • Separate CodeRabbit API keys per environment
  • Secret management solution (environment variables, Vault, or cloud secrets)
  • CI/CD pipeline with environment-aware deployment
  • Application with environment detection logic

Environment Strategy

EnvironmentPurposeAPI Key SourceSettings
DevelopmentLocal development.env.localDebug enabled, relaxed limits
StagingPre-production testingCI/CD secretsProduction-like settings
ProductionLive trafficSecret managerOptimized, hardened

Instructions

Step 1: Configuration Structure

config/
  coderabbit/
    base.ts           # Shared defaults
    development.ts    # Dev overrides
    staging.ts        # Staging overrides
    production.ts     # Prod overrides
    index.ts          # Environment resolver

Step 2: Base Configuration

// config/coderabbit/base.ts
export const baseConfig = {
  timeout: 30000,  # 30000: 30 seconds in ms
  maxRetries: 3,
  cache: {
    enabled: true,
    ttlSeconds: 300,  # 300: timeout: 5 minutes
  },
};

Step 3: Environment-Specific Configs

// config/coderabbit/development.ts
import { baseConfig } from "./base";

export const developmentConfig = {
  ...baseConfig,
  apiKey: process.env.GITHUB_TOKEN_DEV,
  debug: true,
  cache: { enabled: false, ttlSeconds: 60 },
};

// config/coderabbit/staging.ts
import { baseConfig } from "./base";

export const stagingConfig = {
  ...baseConfig,
  apiKey: process.env.GITHUB_TOKEN_STAGING,
  debug: false,
};

// config/coderabbit/production.ts
import { baseConfig } from "./base";

export const productionConfig = {
  ...baseConfig,
  apiKey: process.env.GITHUB_TOKEN_PROD,
  debug: false,
  timeout: 60000,  # 60000: 1 minute in ms
  maxRetries: 5,
  cache: { enabled: true, ttlSeconds: 600 },  # 600: timeout: 10 minutes
};

Step 4: Environment Resolver

// config/coderabbit/index.ts
import { developmentConfig } from "./development";
import { stagingConfig } from "./staging";
import { productionConfig } from "./production";

type Environment = "development" | "staging" | "production";

const configs = {
  development: developmentConfig,
  staging: stagingConfig,
  production: productionConfig,
};

export function detectEnvironment(): Environment {
  const env = process.env.NODE_ENV || "development";
  if (env === "production") return "production";
  if (env === "staging" || process.env.VERCEL_ENV === "preview") return "staging";
  return "development";
}

export function getCodeRabbitConfig() {
  const env = detectEnvironment();
  const config = configs[env];

  if (!config.apiKey) {
    throw new Error(`GITHUB_TOKEN not set for environment: ${env}`);
  }

  return { ...config, environment: env };
}

Step 5: Secret Management

# Local development (.env.local - git-ignored)
GITHUB_TOKEN_DEV=your-dev-key

# GitHub Actions
# Settings > Environments > staging/production > Secrets
# Add GITHUB_TOKEN_STAGING and GITHUB_TOKEN_PROD

# AWS Secrets Manager
aws secretsmanager create-secret \
  --name coderabbit/production/api-key \
  --secret-string "your-prod-key"

# GCP Secret Manager
echo -n "your-prod-key" | gcloud secrets create coderabbit-api-key-prod --data-file=-
# .github/workflows/deploy.yml
jobs:
  deploy-staging:
    environment: staging
    env:
      GITHUB_TOKEN_STAGING: ${{ secrets.GITHUB_TOKEN_STAGING }}

  deploy-production:
    environment: production
    env:
      GITHUB_TOKEN_PROD: ${{ secrets.GITHUB_TOKEN_PROD }}

Error Handling

IssueCauseSolution
Wrong environmentMissing NODE_ENVSet environment variable in deployment
Secret not foundWrong secret pathVerify secret manager configuration
Cross-env data leakShared API keyUse separate keys per environment
Config validation failMissing fieldAdd startup validation with Zod schema

Examples

Quick Environment Check

const config = getCodeRabbitConfig();
console.log(`Running in ${config.environment}`);
console.log(`Cache enabled: ${config.cache.enabled}`);

Startup Validation

import { z } from "zod";

const configSchema = z.object({
  apiKey: z.string().min(1, "GITHUB_TOKEN is required"),
  environment: z.enum(["development", "staging", "production"]),
  timeout: z.number().positive(),
});

const config = configSchema.parse(getCodeRabbitConfig());

Resources

Next Steps

For deployment, see coderabbit-deploy-integration.

Output

  • Configuration files or code changes applied to the project
  • Validation report confirming correct implementation
  • Summary of changes made and their rationale

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

34.4%
按下载量换算65

Claude

27.08%
按下载量换算51

Cursor

19.05%
按下载量换算36

Gemini CLI

9.54%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

来源信息

继续浏览同类 Skills