Token导航 LogoToken导航

Agent Skill · 研究检索

brownfield-adoption(棕地收养)

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

brownfield-adoption 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 62,244。

总安装 339周安装 14GitHub Stars 798下载 111核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/juliusbrussee/cavekit --skill brownfield-adoption

这个 Skill 是做什么的

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

brownfield-adoption 用于在现有代码基础上叠加 Cavekit 能力而不重写原有逻辑。它将现有代码视为事实来源,反向推导出适用的 kit 定义与生命周期规则。使用时适合希望逐步引入 AI 能力的成熟项目,强调尊重既有实现而非推翻重建。安装后所有变更应通过 Cavekit 流程流转,确保一致性与维护性。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/brownfield-adoption

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

brownfield-adoption 怎么安装?

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

brownfield-adoption 支持哪些 AI 工具?

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

brownfield-adoption 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

brownfield-adoption 是免费的吗?

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

brownfield-adoption 用的人多吗?

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

brownfield-adoption 安全吗?

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

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

值得选的地方

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

先想清楚的地方

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

适不适合你

更适合

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

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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调用外部服务未明确有提醒
brownfield-adoption

棕地收养 · 本页

339798需要联网未明确通过

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

SKILL.md 原文

Brownfield Adoption: Adding Cavekit to Existing Codebases

Brownfield adoption layers kits on top of existing code without rewriting it. The existing codebase becomes reference material, and kits are reverse-engineered from what the code actually does. Once kits exist, all future changes flow through the Cavekit lifecycle.

Core principle: The existing code is not the enemy -- it is the source of truth for cavekit generation. Respect what works; cavekit what matters.


1. When to Use Brownfield Adoption

Brownfield adoption is the right choice when:

  • You have a working codebase that you want to improve incrementally
  • You want to adopt Cavekit without stopping development
  • The codebase is too large or critical for a full rewrite
  • You want traceability between kits and code for future changes
  • You need to onboard AI agents to an existing project safely
  • The team wants to start with Cavekit on a subset of the codebase

Brownfield is NOT the right choice when:

  • You are migrating to a completely different framework (use a deliberate rewrite instead)
  • The existing code is so broken that kits would just document bugs
  • The codebase is being sunset or replaced

2. Brownfield vs Deliberate Rewrite

Before starting, decide which approach fits your situation:

DimensionIncremental AdoptionClean-Slate Rebuild
ObjectiveAdd cavekit coverage around working codeReplace the codebase with a new implementation
What happens to existing codeRemains in place, evolves under Cavekit governanceArchived once kits are extracted; new code replaces it
Risk profileLower -- production system stays functional throughoutHigher -- new system must achieve feature parity before cutover
Time to first valueFast -- kits appear in days, improvements followSlow -- significant upfront investment before any return
Ideal scenariosProduction systems, incremental improvement, large legacy codebasesTechnology stack changes, irrecoverable tech debt, greenfield-quality rebuilds
How kits originateDerived by analyzing existing behaviorWritten forward from product requirements
Handling broken behaviorKits capture current state; bugs are fixed through normal Cavekit cyclesKits capture intended state; fresh implementation avoids old bugs
Impact on ongoing workLow -- regular development continues alongside adoptionHigh -- team capacity is split between old and new systems

Decision flowchart

Is the existing code fundamentally sound?
  YES -> Are you changing frameworks?
           YES -> Deliberate Rewrite (extract specs, build new)
           NO  -> Brownfield Adoption (layer specs, evolve)
  NO  -> Is a rewrite feasible (time, budget, risk)?
           YES -> Deliberate Rewrite
           NO  -> Brownfield Adoption (spec the broken parts, fix incrementally)

3. The 6-Step Brownfield Process

Step 1: Set Up the Context Directory

Create the standard Cavekit context directory structure alongside your existing codebase:

mkdir -p context/{refs,kits,plans,impl,prompts}

Resulting structure:

your-project/
+-- src/                    # Existing source code (untouched)
+-- tests/                  # Existing tests (untouched)
+-- package.json            # Existing config (untouched)
+-- context/
    +-- refs/
    |   +-- architecture-overview.md   # High-level description of existing system
    +-- kits/
    |   +-- CLAUDE.md                  # "Kits define WHAT needs implementing"
    +-- plans/
    |   +-- CLAUDE.md                  # "Plans define HOW to implement something"
    +-- impl/
    |   +-- CLAUDE.md                  # "Impls record implementation progress"
    +-- prompts/
        +-- 000-generate-kits-from-code.md   # Bootstrap prompt (this step)

Create context/refs/architecture-overview.md with a high-level description of the existing system:

# Architecture Overview

## System Description
{Brief description of what the application does}

## Technology Stack
- Language: {LANGUAGE}
- Framework: {FRAMEWORK}
- Build: {BUILD_COMMAND}
- Test: {TEST_COMMAND}

## Directory Structure
{Key directories and their purposes}

## Key Domains
{List the major functional areas of the application}

## External Dependencies
{APIs, databases, services the application depends on}

## Known Issues / Tech Debt
{Major known issues that specs should account for}

Step 2: Designate the Codebase as Reference Material

The existing codebase itself becomes the reference material. Unlike greenfield projects (where refs are PRDs or language specs), brownfield refs are the living code.

In context/refs/, add a pointer:

# Reference: Existing Codebase

The existing source code at `src/` is the primary reference material for spec generation.

## How to Use This Reference
1. Explore the codebase structure to identify domains
2. Read source files to understand current behavior
3. Run existing tests to understand expected behavior
4. Check git history for context on design decisions

## What the Codebase Tells Us
- Current behavior (what the code DOES)
- Implicit requirements (what the code assumes)
- Test coverage (what is validated)
- Architecture decisions (how domains interact)

## What the Codebase Does NOT Tell Us
- Why decisions were made (check git history, docs)
- What behavior is intentional vs accidental
- What requirements are missing
- What the system SHOULD do vs what it DOES

Step 3: Create the Bootstrap Prompt (000)

The bootstrap prompt is numbered 000 because it runs first and only once. It reverse-engineers kits from the existing code.

# 000: Generate Kits from Existing Code (Brownfield Bootstrap)

## Runtime Inputs
- Framework: {FRAMEWORK}
- Build command: {BUILD_COMMAND}
- Test command: {TEST_COMMAND}
- Source directory: {SRC_DIR}

## Context
This is a brownfield adoption. The existing codebase at `{SRC_DIR}` is the reference material.
Read `context/refs/architecture-overview.md` for system context.

## Task

### Phase 1: Explore and Discover
1. Read the architecture overview
2. Explore the source directory structure
3. Identify distinct functional domains (auth, data, UI, API, etc.)
4. Read key source files in each domain
5. Run existing tests to understand expected behavior: `{TEST_COMMAND}`

### Phase 2: Generate Kits
For each identified domain:
1. Create `context/kits/cavekit-{domain}.md`
2. Each cavekit must include:
   - **Scope:** What this domain covers
   - **Requirements:** What the code currently does, expressed as requirements
   - **Acceptance Criteria:** Testable criteria derived from existing behavior
   - **Dependencies:** What other domains this depends on
   - **Out of Scope:** What this cavekit explicitly excludes
   - **Cross-References:** Links to related kits

3. Create `context/kits/cavekit-overview.md` as the index:
   - One-line summary per domain cavekit
   - Dependency graph between domains
   - Overall system architecture summary

### Phase 3: Validate
For each acceptance criterion in the generated kits:
1. Verify the existing code satisfies it
2. If a test exists that validates it, reference the test
3. If no test exists, note it as a coverage gap

## Exit Criteria
- [ ] All major domains have corresponding cavekit files
- [ ] Every requirement has testable acceptance criteria
- [ ] cavekit-overview.md indexes all kits
- [ ] Validation report shows which criteria are covered by existing tests
- [ ] Coverage gaps are documented

## Completion Signal
<all-tasks-complete>

Step 4: Run the Iteration Loop

Run the bootstrap prompt through the iteration loop:

# Run 3-5 iterations to stabilize kits
iteration-loop context/prompts/000-generate-kits-from-code.md -n 5 -t 1h

What happens during iteration:

  • Iteration 1: Agent explores codebase, generates initial kits (broad but shallow)
  • Iteration 2: Agent refines kits based on git history from iteration 1, adds detail
  • Iteration 3: Agent validates kits against code, fills coverage gaps
  • Iterations 4-5: Convergence -- minor refinements, polishing cross-references

Watch for convergence: Kits should stabilize after 3-5 iterations. If they do not, the codebase may be too large for a single prompt. Split into domain-specific bootstrap prompts.

Step 5: Validate Kits Match Behavior

After the bootstrap prompt converges, validate that the generated kits accurately describe the existing code:

5a. Run tests against kits
# Use TDD to verify kits match behavior
# For each domain cavekit, generate tests from acceptance criteria
# then verify existing code passes them
{TEST_COMMAND}
5b. Manual review checklist
## Cavekit Validation Checklist
- [ ] Each domain in the codebase has a corresponding cavekit
- [ ] Acceptance criteria match actual code behavior (not aspirational)
- [ ] Dependencies between kits match actual code dependencies
- [ ] No orphan code -- every significant module is covered by a cavekit
- [ ] No phantom requirements -- kits do not describe behavior that does not exist
- [ ] Cross-references are accurate
5c. Handle mismatches
Mismatch TypeAction
Cavekit describes behavior that does not existRemove the requirement (phantom requirement)
Code has behavior not in any cavekitAdd a requirement (coverage gap)
Cavekit and code disagree on behaviorDetermine which is correct; update the other
Code has bugs that kits documented as-isMark as known issue in cavekit; fix via normal Cavekit

Step 6: Proceed with Normal Hunt

Once kits are validated, the project is ready for full Cavekit. All future changes flow through kits first:

Future change workflow:
  1. Update cavekit with new/changed requirement
  2. Generate/update plans from kits (prompt 002)
  3. Implement from plans (prompt 003)
  4. Validate: build + test + acceptance criteria
  5. If issues found: revise kits

Create the standard pipeline prompts:

# Create greenfield-style prompts for ongoing development
# (000 was the bootstrap; 001-003 are the ongoing pipeline)
context/prompts/001-generate-kits-from-refs.md    # For new features
context/prompts/002-generate-plans-from-kits.md   # Plan generation
context/prompts/003-generate-impl-from-plans.md    # Implementation

4. Incremental Adoption Strategy

You do not have to cavekit the entire codebase at once. Start with the most active or highest-risk areas:

Priority matrix for cavekit coverage

PriorityCriteriaExample
P0: Cavekit immediatelyCode changes frequently, high risk, many bugsAuth system, payment processing
P1: Cavekit soonActive development area, moderate complexityFeature modules, API endpoints
P2: Cavekit when touchedStable code, rarely changesUtility libraries, config modules
P3: Skip until neededDead code, deprecated featuresLegacy compatibility layers

Incremental process

Week 1: Bootstrap kits for P0 domains
  -> Run 000 prompt scoped to P0 directories only
  -> Validate and refine

Week 2-3: Extend to P1 domains
  -> Add P1 directories to the bootstrap prompt
  -> Cross-reference with existing P0 kits

Week 4+: Cavekit-on-touch
  -> When any P2 file is modified, generate its cavekit first
  -> Gradually expand coverage

Scoping the bootstrap prompt

For incremental adoption, modify prompt 000 to target specific directories:

## Scope
This bootstrap targets the following domains only:
- `src/auth/` -> cavekit-auth.md
- `src/payments/` -> cavekit-payments.md

Do NOT generate kits for other directories at this time.

5. Common Challenges and Solutions

Challenge: Codebase is too large for one context window

Solution: Split the bootstrap into domain-specific prompts:

context/prompts/
+-- 000a-generate-kits-auth.md
+-- 000b-generate-kits-data.md
+-- 000c-generate-kits-ui.md

Run each independently, then create a manual cavekit-overview.md that ties them together.

Challenge: No existing tests

Solution: The bootstrap prompt generates kits from code behavior, not tests. After kits exist, use the implementation prompt to generate tests:

# After bootstrap, generate tests from kits
iteration-loop context/prompts/003-generate-impl-from-plans.md -n 5 -t 1h
# Focus on test generation, not code changes

Challenge: Code has undocumented behavior

Solution: Use git history to understand intent:

# In the bootstrap prompt, add:

## Discovery Strategy
1. Read source code for current behavior
2. Read `git log --oneline -50` for recent changes
3. Read `git log --follow {file}` for individual file history
4. Infer requirements from both code AND history

Challenge: Code has known bugs

Solution: Cavekit the intended behavior, not the buggy behavior. Mark known bugs as issues:

### R3: Search Results Pagination
**Description:** Search results are paginated with 20 items per page
**Acceptance Criteria:**
- [ ] Results are paginated
- [ ] Page size is configurable (default 20)
**Known Issues:**
- BUG: Off-by-one error on last page (see issue #142)

Challenge: Team resistance to Cavekit

Solution: Start small, show results:

  1. Pick ONE upcoming feature
  2. Write a cavekit before implementing it
  3. Show how the cavekit caught issues the team would have missed
  4. Gradually expand Cavekit coverage based on demonstrated value

6. Lightweight Cavekit for Small Projects

Even small projects benefit from minimal Cavekit. The "Cavekit floor" is:

your-small-project/
+-- src/
+-- context/
    +-- kits/
    |   +-- cavekit-task.md     # One cavekit for the current task
    +-- plans/
        +-- plan-task.md          # One plan for the current task

No prompts directory needed. Just write a focused cavekit and plan, then use the iteration loop against the plan.

Why bother for small projects?

  • The cavekit catches requirements you would have missed
  • The plan sequences work so the agent does not thrash
  • If the project grows, you already have the structure in place
  • It is much easier to scale up from lightweight Cavekit than to retrofit full Cavekit later

Lightweight Cavekit process

  1. Write context/kits/cavekit-task.md (15-30 minutes)
  2. Write context/plans/plan-task.md (10-20 minutes)
  3. Run the iteration loop against the plan
  4. If the project grows, add the full context directory structure

7. Transition Milestones

Track your brownfield adoption progress with these milestones:

## Brownfield Adoption Progress

### Milestone 1: Foundation
- [ ] Context directory created
- [ ] Architecture overview written
- [ ] Bootstrap prompt created

### Milestone 2: Initial Specs
- [ ] P0 domains have kits
- [ ] Kits validated against existing code
- [ ] Coverage gaps documented

### Milestone 3: Pipeline Active
- [ ] Standard prompts (001-003) created
- [ ] First feature developed through Cavekit pipeline
- [ ] Revision process tested

### Milestone 4: Steady State
- [ ] All active domains have kits
- [ ] All new features go through kits first
- [ ] Revision is routine
- [ ] Iteration loop runs are predictable (convergence in 3-5 iterations)

### Milestone 5: Full Cavekit
- [ ] All domains have kits
- [ ] All changes flow through the Hunt
- [ ] Convergence monitoring active
- [ ] Team comfortable with the process

Cross-References

  • Context architecture: See ck:context-architecture skill for the full context directory structure and progressive disclosure patterns.
  • Prompt pipeline: See ck:prompt-pipeline skill for designing the 001-003 prompts after bootstrap.
  • Cavekit writing: See ck:cavekit-writing skill for how to write high-quality kits with testable acceptance criteria.
  • Revision: See ck:revision skill for tracing bugs back to kits after brownfield adoption.
  • Convergence monitoring: See ck:convergence-monitoring skill for detecting when the bootstrap prompt has converged.

平台分布

Codex

37.97%
按下载量换算42

Claude

26.18%
按下载量换算29

Cursor

19.24%
按下载量换算21

Gemini CLI

8.25%
按下载量换算9

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

继续浏览同类 Skills