Token导航 LogoToken导航

Agent Skill · 研究检索

config-management(配置管理)

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

config-management 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证为 MIT,暂无第三方扫描结果,按安装量在研究检索类的 73,675 个 Skill 里排第 72,323。

总安装 188周安装 8GitHub Stars 公开资料未说明下载 66核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

AgentSkills.tonpx skills
npx skills add mthines/gw-tools --skill "config-management"

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

配置管理工具集提供跨环境配置同步与版本管理能力。适用于多实例部署或团队协作时的统一参数维护需求。支持差异对比、批量更新与审计日志记录功能。config-management 属于研究检索类 Skill,可作为该场景下的辅助能力补充。需通过 npx 从 mthines/gw-tools 仓库安装并指定子路径。

操作前应确认目标系统支持 skills 架构及所需依赖已就绪。

来源仓库内路径:skills/config-management

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add mthines/gw-tools --skill "config-management";命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

config-management 怎么安装?

在终端执行 npx skills add mthines/gw-tools --skill "config-management"。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

config-management 支持哪些 AI 工具?

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

config-management 需要什么权限?

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

config-management 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

config-management 用的人多吗?

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

config-management 安全吗?

没有查到第三方扫描结果,安全性无法从公开资料判断,安装前请自行审查源码、依赖和命令行为。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 没有第三方扫描结果,安全性只能靠自己读源码判断。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 要求有安全扫描结论才肯安装的团队。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

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

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
config-management

配置管理 · 本页

188—接触敏感数据MIT未收录

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

SKILL.md 原文

name
@gw-config-management
description
Configure and optimize gw-tools for different project types and team needs. Use this skill when setting up gw for new projects, configuring auto-copy files, troubleshooting configuration issues, or customizing gw for Next.js, Node.js APIs, monorepos, or React SPAs. Triggers on tasks involving .gw/config.json, auto-copy patterns, environment files, or gw init commands.
license
MIT
metadata
author
mthines
version
1.0.0

Configuration Management - Comprehensive Guide

This guide teaches you how to configure gw for optimal workflows across different project types.

Table of Contents

  1. Understanding gw Configuration
  2. Configuration Options Reference
  3. Initial Setup: Secrets in the Default Branch
  4. Auto-Copy Strategies
  5. Project-Type Configuration Patterns
  6. Team Configuration Management
  7. Advanced Configuration Techniques
  8. Troubleshooting Configuration

1. Understanding gw Configuration

Config File Location

gw stores configuration at .gw/config.json in your repository:

/projects/myapp.git/
├── main/                  # Main worktree
│   ├── src/
│   ├── .gw/
│   │   └── config.json   # ← Configuration file
│   └── package.json
├── feature-a/             # Other worktrees
└── feature-b/

Auto-Detection vs Manual Configuration

Auto-detection (recommended for most cases):

$ cd /projects/myapp/main
$ gw init

Repository root detected: /projects/myapp.git
Default branch detected: main
Configuration created at .gw/config.json

gw automatically detects:

  • Repository root (parent directory containing worktrees)
  • Default branch (main, master, or current branch)

Manual configuration (when auto-detection fails):

$ gw init --root /projects/myapp.git \
          --default-branch main \
          --auto-copy-files .env,.env.local,secrets/

Interactive configuration (for guided setup):

$ gw init --interactive

Interactive Configuration

Press Enter to accept defaults. Leave blank to skip optional settings.

Default source worktree name [main]: main
Do you want to auto-copy files when creating worktrees? (y/n) [n]: y
  Enter comma-separated file/directory paths (e.g., .env,secrets/)
  Files to auto-copy: .env,.env.local,secrets/
Do you want to add post-add hooks? (y/n) [n]: y
  Enter commands to run after creating worktrees
  Variables: {worktree}, {worktreePath}, {gitRoot}, {branch}
  Post-add hook 1 (leave blank to finish): pnpm install
  Post-add hook 2 (leave blank to finish):
Days before worktrees are considered stale [7]: 14
Enable automatic cleanup of stale worktrees? (y/n) [n]: n

✓ Configuration created successfully

Interactive mode is useful when:

  • Setting up gw for the first time
  • You're unsure about configuration options
  • You want to explore all available settings
  • Onboarding new team members who need guidance

Configuration Scope

Configuration is per-repository, not global:

  • Each repository has its own .gw/config.json
  • Different repos can have different configurations
  • Configuration is shared across all worktrees in that repo

Config Precedence and Defaults

If no configuration exists:

  1. gw searches for .gw/config.json walking up from current directory
  2. If not found, attempts auto-detection on first gw add command
  3. Uses fallback defaults:

- root: Auto-detected from git worktree list - defaultBranch: "main" - autoCopyFiles: [] (nothing copied automatically)


2. Configuration Options Reference

Complete Configuration Structure

{
  "root": "/absolute/path/to/repo.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env",
    ".env.local",
    "secrets/",
    "config/local.json"
  ],
  "cleanThreshold": 7
}

root: Repository Root Path

Purpose: Absolute path to the parent directory containing all worktrees.

Example:

{
  "root": "/Users/you/projects/myapp.git"
}

How it's used:

  • Resolving worktree names to absolute paths
  • Finding source files for auto-copy
  • Determining worktree relationships

When to set manually:

  • Auto-detection fails (unusual directory structure)
  • Repository has non-standard naming
  • Using symlinks or network drives

defaultBranch: Default Source Worktree

Purpose: Which worktree to copy files from by default.

Example:

{
  "defaultBranch": "develop"
}

Common values:

  • "main" - Most projects
  • "master" - Older projects
  • "develop" - Gitflow workflow
  • "staging" - Copy from staging environment

How it's used:

  • gw add feature-x copies from defaultBranch worktree
  • gw sync target file.txt syncs from defaultBranch unless --from specified
  • gw sync target (without files) syncs autoCopyFiles from defaultBranch
  • Auto-clean never removes this worktree - it's protected as the source for file syncing

Important: Ensure your secrets and environment files exist in the defaultBranch worktree before using gw add or gw sync. This worktree is the source from which files are copied.

autoCopyFiles: File Patterns to Auto-Copy

Purpose: Files/directories automatically copied when creating worktrees.

Example:

{
  "autoCopyFiles": [
    ".env",
    ".env.local",
    "secrets/api-keys.json",
    "config/",
    "ssl/"
  ]
}

Pattern types:

  1. Exact files: ".env" - Single file
  2. Directories: "secrets/" - Entire directory (recursive)
  3. Nested paths: "config/local.json" - Specific nested file

How it's used:

  • gw add feature-x automatically copies these files when creating worktrees
  • gw sync feature-x (without file arguments) syncs these files to existing worktrees

Important notes:

  • Paths are relative to repository root
  • Directories should end with /
  • Files are copied, not symlinked
  • Non-existent files are skipped with warning

cleanThreshold: Worktree Cleanup Age

Purpose: Number of days before worktrees are considered stale for gw clean.

Example:

{
  "cleanThreshold": 7
}

Common values:

  • 7 - Default (one week)
  • 14 - Two weeks (more lenient)
  • 3 - Three days (aggressive cleanup)
  • 30 - One month (very lenient)

How it's used:

  • gw clean removes worktrees older than this threshold
  • Only removes worktrees with no uncommitted changes and no unpushed commits (unless --force)
  • gw clean --dry-run previews which worktrees would be removed

Setting the threshold:

# Set during initialization
gw init --clean-threshold 14

# Or manually edit .gw/config.json

Important notes:

  • Age is calculated from the worktree's .git file modification time
  • Bare/main repository worktrees are never removed
  • Use --force flag to bypass safety checks (not recommended)

3. Initial Setup: Secrets in the Default Branch

Before using gw add with auto-copy, your secrets and environment files must exist in your defaultBranch worktree. This worktree is the source from which files are copied.

First-Time Setup Flow

# 1. Set up your bare repository structure
git clone --bare https://github.com/user/repo.git repo.git
cd repo.git

# 2. Create the main worktree (your defaultBranch)
git worktree add main main

# 3. Set up secrets in the main worktree FIRST
cd main
cp .env.example .env           # Create your environment file
# Edit .env with your actual secrets, API keys, etc.
mkdir -p secrets/
# Add any other secret files your project needs

# 4. Initialize gw with auto-copy configuration
gw init --auto-copy-files .env,secrets/

# 5. Now create feature worktrees - files are copied automatically
cd ..
gw add feat-new-feature
# .env and secrets/ are automatically copied from main

Why This Order Matters

  1. Source must exist first - gw add copies from defaultBranch, so files must be there
  2. Auto-clean protection - The defaultBranch worktree is never auto-cleaned, ensuring your source files are always available
  3. Sync depends on source - gw sync also uses defaultBranch as the source

Keeping Secrets Updated

When you update secrets in your defaultBranch worktree:

# Sync all autoCopyFiles to an existing worktree
gw sync feat-existing-branch

# Or sync specific files
gw sync feat-existing-branch .env

4. Auto-Copy Strategies

Files That Should Be Copied

Environment variables:

".env",
".env.local",
".env.development"

Secrets and credentials:

"secrets/",
"keys/",
"ssl/certificates/"

Local configuration:

"config/local.json",
".vscode/settings.json",
"components/ui/.vercel/"

Cache directories (sometimes):

".next/cache/",
"public/uploads/"

Files That Should NOT Be Copied

Dependencies:

❌ node_modules/
❌ vendor/
❌ .pnpm-store/

Build artifacts:

❌ dist/
❌ build/
❌ .next/ (except cache)
❌ out/

Version control:

❌ .git (handled automatically)
❌ .gitignore (in source control)

IDE settings (usually):

❌ .idea/
❌ .vscode/ (unless team-shared)

Directory vs File Copying

Directory (recursive):

{
  "autoCopyFiles": ["secrets/"]
}

Copies:

secrets/
├── api-key.json      ← Copied
├── database.env      ← Copied
└── ssl/
    └── cert.pem      ← Copied (recursive)

Specific file:

{
  "autoCopyFiles": ["secrets/api-key.json"]
}

Copies only:

secrets/
└── api-key.json      ← Only this file

Glob Patterns (Not Currently Supported)

Currently, gw doesn't support glob patterns like:

  • "*.env" - All .env files
  • "config/**/*.json" - All JSON in config

Workaround: List files explicitly or copy parent directory.


5. Project-Type Configuration Patterns

Next.js Projects

Typical structure:

myapp/
├── .env
├── .env.local
├── .next/
├── public/
│   └── uploads/
├── components/
│   └── ui/
│       └── .vercel/
└── pages/

Recommended configuration:

{
  "root": "/projects/myapp.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env",
    ".env.local",
    ".env.development",
    ".vercel/",
    "public/uploads/",
    "components/ui/.vercel/"
  ]
}

Why these files:

  • .env* - Environment variables for different modes
  • .vercel/ - Vercel deployment configuration
  • public/uploads/ - User-uploaded assets
  • components/ui/.vercel/ - Component-specific Vercel settings

See also: Next.js Setup Example

Node.js APIs

Typical structure:

api/
├── .env
├── src/
├── ssl/
│   ├── private.key
│   └── certificate.crt
└── config/
    └── local.json

Recommended configuration:

{
  "root": "/projects/api.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env",
    "ssl/",
    "keys/",
    "secrets/",
    "config/local.json"
  ]
}

Why these files:

  • .env - Database URLs, API keys, service credentials
  • ssl/ - SSL certificates for HTTPS
  • keys/ - JWT keys, encryption keys
  • secrets/ - Service account credentials
  • config/local.json - Local-only configuration overrides

React SPAs

Typical structure:

webapp/
├── .env
├── .env.local
├── public/
│   └── config.json
└── src/

Recommended configuration:

{
  "root": "/projects/webapp.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env",
    ".env.local",
    "public/config.json"
  ]
}

Why these files:

  • .env - Build-time environment variables
  • .env.local - Local API endpoints, feature flags
  • public/config.json - Runtime configuration

Monorepos (pnpm/Yarn/npm workspaces)

Typical structure:

monorepo/
├── .env                      # Root environment
├── packages/
│   ├── api/
│   │   └── .env             # Package-specific
│   ├── web/
│   │   └── .env
│   └── shared/
└── pnpm-workspace.yaml

Recommended configuration:

{
  "root": "/projects/monorepo.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env",
    "packages/api/.env",
    "packages/web/.env",
    "packages/shared/config.local.json",
    ".vercel/"
  ]
}

Why these files:

  • Root .env - Shared environment variables
  • Package-specific .env - Service-specific configuration
  • Shared config files - Cross-package configuration

See also: Monorepo Setup Example

Full-Stack Apps (Frontend + Backend)

Typical structure:

fullstack/
├── .env.backend
├── .env.frontend
├── backend/
│   ├── ssl/
│   └── secrets/
└── frontend/
    └── .vercel/

Recommended configuration:

{
  "root": "/projects/fullstack.git",
  "defaultBranch": "main",
  "autoCopyFiles": [
    ".env.backend",
    ".env.frontend",
    "backend/ssl/",
    "backend/secrets/",
    "frontend/.vercel/"
  ]
}

6. Team Configuration Management

Committing Configuration to Version Control

Recommended approach:

# Add .gw/config.json to git
git add .gw/config.json
git commit -m "chore: add gw configuration for team"
git push

Benefits:

  • Team members get configuration automatically
  • Consistent workflow across team
  • Version-controlled changes to auto-copy patterns
  • Easy onboarding for new developers

What to include:

  • root - Can be a template, team members adjust locally
  • defaultBranch - Should match team's workflow
  • autoCopyFiles - Should include all shared secrets/configs

Team-Wide vs Personal File Patterns

Team-wide (commit to repo):

{
  "autoCopyFiles": [
    ".env.template",
    "ssl/development-cert.pem",
    "config/shared.json"
  ]
}

Personal (each developer customizes):

# Copy team config
cp .gw/config.json .gw/config.local.json

# Add personal files
vim .gw/config.local.json
# Add: "path/to/my-secrets.env"

# .gw/config.local.json is in .gitignore

Documenting Auto-Copy Patterns

In README.md:

## Development Setup

### 1. Install gw

npm install -g @gw-tools/gw-tool

### 2. Configuration

The repository includes gw configuration (`.gw/config.json`) that automatically copies:

- `.env` - Environment variables (copy from `.env.example`)
- `ssl/` - Development SSL certificates
- `secrets/` - Service credentials (get from team lead)

### 3. Create Feature Worktree

gw add feature-name -b feature-name main

Files will be automatically copied from the main worktree.

Generating Documentation from Config

Use gw show-init to automatically generate a setup command from your current configuration:

# Generate the init command from current config
gw show-init
# Output: gw init --auto-copy-files .env,secrets/ --post-add 'pnpm install'

# Add to documentation automatically
echo "## Setup\n\n\`\`\`bash\n$(gw show-init)\n\`\`\`" >> README.md

# Copy to clipboard for sharing (macOS)
gw show-init | pbcopy

# Copy to clipboard for sharing (Linux)
gw show-init | xclip -selection clipboard

Benefits:

  • Always accurate - generated from actual config
  • Easy to share with team members
  • Simple to document in README files
  • Shows exact command to replicate your setup

Example documentation update:

## Quick Setup

To configure gw for this project, run:

\`\`\`bash
gw init --auto-copy-files .env,secrets/ --post-add 'pnpm install' --clean-threshold 14
\`\`\`

This will:
- Auto-copy `.env` and `secrets/` directory when creating worktrees
- Run `pnpm install` after each worktree creation
- Clean up worktrees older than 14 days

Onboarding New Developers

Onboarding checklist:

  1. Clone repository
  2. Install gw: npm install -g @gw-tools/gw-tool
  3. Set up secrets (one-time):
   cp .env.example .env
   # Get secrets from team lead or secret manager
  1. Create first worktree:
   gw add feature-onboarding -b feature-onboarding main
   # Automatically copies configured files

7. Advanced Configuration Techniques

Multiple Source Worktrees

Scenario: Different features copy from different sources.

# Feature branches copy from develop
gw add feature-x -b feature-x

# Hotfixes copy from main
gw add hotfix-y --from main -b hotfix-y

Configuration supports one default:

{
  "defaultBranch": "develop"
}

Override at runtime:

gw sync --from staging target-worktree .env

Environment-Specific Configurations

Scenario: Different environments need different files.

Approach: Use custom config files.

# Development
cp .gw/config.development.json .gw/config.json

# Production
cp .gw/config.production.json .gw/config.json

Integration with Secret Management Tools

1Password:

# After creating worktree, inject secrets
gw add feature-x
op inject -i feature-x/.env.template -o feature-x/.env

AWS Secrets Manager:

gw add feature-x
aws secretsmanager get-secret-value --secret-id myapp/dev \
  --query SecretString --output text > feature-x/.env

HashiCorp Vault:

gw add feature-x
vault kv get -field=.env secret/myapp > feature-x/.env

8. Troubleshooting Configuration

Config Not Being Detected

Problem:

$ gw add feature-x
Error: Could not find .gw/config.json

Solution:

# Initialize configuration
gw init

# Or specify root manually
gw init --root $(gw root)

Files Not Being Auto-Copied

Problem:

$ gw add feature-x
✓ Worktree created
# But .env is missing!

Diagnostics:

# Check configuration
cat .gw/config.json

# Check if file exists in source
ls ../main/.env

Solutions:

Solution A: Add to auto-copy:

gw init --auto-copy-files .env,.env.local

Solution B: Manual sync:

# Sync all autoCopyFiles from config
gw sync feature-x

# Or sync specific files
gw sync feature-x .env

Wrong Files Being Copied

Problem: Copying too many or wrong files.

Solution: Review and update autoCopyFiles:

# Edit configuration
vim .gw/config.json

# Remove unwanted patterns
# Add specific files instead of directories

Path Resolution Issues

Problem:

$ gw add feature-x
Error: Source file not found: secrets/api-key.json

Solution:

Ensure paths are relative to repository root:

{
  "autoCopyFiles": [
    "secrets/api-key.json"  // ✓ Relative to root
  ]
}

Not:

{
  "autoCopyFiles": [
    "/Users/you/projects/myapp/secrets/api-key.json"  // ✗ Absolute path
  ]
}

Summary

You now understand:

  • ✅ How gw configuration works (.gw/config.json)
  • ✅ All configuration options (root, defaultBranch, autoCopyFiles)
  • ✅ What files to auto-copy for different project types
  • ✅ Team configuration management and onboarding
  • ✅ Advanced techniques for complex workflows
  • ✅ Troubleshooting common configuration issues

Next Steps

  1. Configure gw for your project using a template
  2. Read project-specific examples (Next.js, Monorepo)
  3. Explore advanced parallel development

*Part of the gw-tools skills collection*

平台分布

cline

31.7%
按下载量换算21

OpenCode

24.68%
按下载量换算16

github-copilot

16.04%
按下载量换算11

Claude Code

12.84%
按下载量换算8

Antigravity

7.31%
按下载量换算5

Gemini CLI

3.74%
按下载量换算2

安全审计

暂无安全审计结果可展示。

权限和风险

接触敏感数据

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

安装前确认

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

继续浏览同类 Skills