Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计通过

apollo-multi-env-setup阿波罗多环境设置

Agent Skill

apollo-multi-env-setup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

659

周安装

28

GitHub Stars

2,135

下载量

231
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

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

简介

apollo-multi-env-setup 实现开发、 staging 和生产环境的隔离配置,支持独立 API 密钥与 Kubernetes 原生密钥管理。

  • 适用于多环境部署场景,提供环境特定速率限制、功能开关和安全凭证管理,保障生产稳定性。
  • 通过 TypeScript 配置模板定义环境结构,结合 secret 管理工具实现自动化部署流程。
  • 使用前需为各环境准备独立 API 密钥或沙箱令牌,注意是否会触发密钥写入或跨环境数据访问。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

Apollo Multi-Environment Setup

Overview

Configure Apollo.io for development, staging, and production with isolated API keys, environment-specific rate limits, feature gating, and Kubernetes-native secret management. Apollo provides sandbox tokens for testing that return dummy data without consuming credits.

Prerequisites

  • Separate Apollo API keys per environment (or sandbox tokens for dev)
  • Node.js 18+

Instructions

Step 1: Environment Configuration Schema

// src/config/apollo-config.ts
import { z } from 'zod';

const EnvironmentSchema = z.enum(['development', 'staging', 'production']);

const ApolloEnvConfig = z.object({
  environment: EnvironmentSchema,
  apiKey: z.string().min(10),
  baseUrl: z.string().url().default('https://api.apollo.io/api/v1'),
  isSandbox: z.boolean().default(false),
  rateLimit: z.object({
    maxPerMinute: z.number().min(1),
    concurrency: z.number().min(1).max(20),
  }),
  features: z.object({
    enrichment: z.boolean(),
    sequences: z.boolean(),
    deals: z.boolean(),
    bulkEnrichment: z.boolean(),
  }),
  credits: z.object({
    dailyBudget: z.number(),
    alertThreshold: z.number(),  // percentage
  }),
  logging: z.object({
    level: z.enum(['debug', 'info', 'warn', 'error']),
    redactPII: z.boolean(),
  }),
});

type ApolloEnvConfig = z.infer<typeof ApolloEnvConfig>;

Step 2: Per-Environment Configs

const configs: Record<string, ApolloEnvConfig> = {
  development: {
    environment: 'development',
    apiKey: process.env.APOLLO_SANDBOX_KEY ?? process.env.APOLLO_API_KEY_DEV!,
    baseUrl: 'https://api.apollo.io/api/v1',
    isSandbox: true,
    rateLimit: { maxPerMinute: 20, concurrency: 2 },
    features: { enrichment: true, sequences: false, deals: false, bulkEnrichment: false },
    credits: { dailyBudget: 10, alertThreshold: 80 },
    logging: { level: 'debug', redactPII: false },
  },
  staging: {
    environment: 'staging',
    apiKey: process.env.APOLLO_API_KEY_STAGING!,
    baseUrl: 'https://api.apollo.io/api/v1',
    isSandbox: false,
    rateLimit: { maxPerMinute: 50, concurrency: 5 },
    features: { enrichment: true, sequences: true, deals: true, bulkEnrichment: true },
    credits: { dailyBudget: 50, alertThreshold: 70 },
    logging: { level: 'info', redactPII: true },
  },
  production: {
    environment: 'production',
    apiKey: process.env.APOLLO_API_KEY_PROD!,
    baseUrl: 'https://api.apollo.io/api/v1',
    isSandbox: false,
    rateLimit: { maxPerMinute: 100, concurrency: 10 },
    features: { enrichment: true, sequences: true, deals: true, bulkEnrichment: true },
    credits: { dailyBudget: 500, alertThreshold: 90 },
    logging: { level: 'warn', redactPII: true },
  },
};

Step 3: Environment-Aware Client Factory

// src/config/client-factory.ts
import axios, { AxiosInstance } from 'axios';

export function createEnvClient(config: ApolloEnvConfig): AxiosInstance {
  const validated = ApolloEnvConfig.parse(config);

  const client = axios.create({
    baseURL: validated.baseUrl,
    headers: { 'Content-Type': 'application/json', 'x-api-key': validated.apiKey },
    timeout: validated.environment === 'development' ? 30_000 : 15_000,
  });

  // Feature gate: block disabled endpoints
  client.interceptors.request.use((req) => {
    if (req.url?.includes('/people/match') && !validated.features.enrichment)
      throw new Error(`Enrichment disabled in ${validated.environment}`);
    if (req.url?.includes('/emailer_campaigns') && !validated.features.sequences)
      throw new Error(`Sequences disabled in ${validated.environment}`);
    if (req.url?.includes('/opportunities') && !validated.features.deals)
      throw new Error(`Deals disabled in ${validated.environment}`);
    if (req.url?.includes('/people/bulk_match') && !validated.features.bulkEnrichment)
      throw new Error(`Bulk enrichment disabled in ${validated.environment}`);
    return req;
  });

  // Debug logging in dev
  if (validated.logging.level === 'debug') {
    client.interceptors.request.use((req) => {
      console.log(`[${validated.environment}] ${req.method?.toUpperCase()} ${req.url}`);
      return req;
    });
  }

  return client;
}

export function getClient(): AxiosInstance {
  const env = process.env.NODE_ENV ?? 'development';
  return createEnvClient(configs[env] ?? configs.development);
}

Step 4: Kubernetes Secrets

# k8s/dev/apollo-secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: apollo-credentials
  namespace: sales-dev
type: Opaque
stringData:
  APOLLO_SANDBOX_KEY: "sandbox-token-here"
  APOLLO_API_KEY_DEV: "dev-key-here"
---
# k8s/prod/apollo-secret.yaml
apiVersion: v1
kind: Secret
metadata:
  name: apollo-credentials
  namespace: sales-prod
type: Opaque
stringData:
  APOLLO_API_KEY_PROD: "master-key-here"

Step 5: Environment Verification Script

// src/scripts/verify-envs.ts
async function verifyAllEnvironments() {
  for (const [env, config] of Object.entries(configs)) {
    try {
      const client = createEnvClient(config);
      const { data } = await client.get('/auth/health');
      const isMaster = await testMasterAccess(client);
      console.log(`${env}: ${data.is_logged_in ? 'OK' : 'FAIL'} (${isMaster ? 'master' : 'standard'} key, sandbox: ${config.isSandbox})`);
    } catch (err: any) {
      console.error(`${env}: FAIL — ${err.message}`);
    }
  }
}

async function testMasterAccess(client: AxiosInstance): Promise<boolean> {
  try { await client.post('/contacts/search', { per_page: 1 }); return true; }
  catch { return false; }
}

Output

  • Zod-validated environment config schema with feature flags and credit budgets
  • Three environment configs (dev with sandbox, staging, production)
  • Client factory with feature gating and debug logging
  • Kubernetes secrets per namespace
  • Environment verification script testing all configs

Error Handling

IssueResolution
Feature disabledClient throws descriptive error identifying which env blocked it
Wrong environmentCheck NODE_ENV, client falls back to development
Missing API keyZod throws with clear validation error
Sandbox returning dummy dataExpected in development — use staging for real data testing

Resources

Next Steps

Proceed to apollo-observability for monitoring setup.

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

weavefox

58.42%
按下载量换算135

Antigravity

29.72%
按下载量换算69

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

敏感数据

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills