Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
kochetkov-ma avatar

Brewcode:Setup

  • 17 installs
  • 29 repo stars
  • Updated August 2, 2026
  • kochetkov-ma/claude-brewcode

Initialize Brewcode project configuration and environment setup for bounded task execution

About

Brewcode skill for initializing project environments and Brewcode configuration. Solo developers use this at the start of new projects or when configuring Brewcode's lifecycle hooks and delegation settings.

  • Environment setup
  • Configuration
  • Initialization

Brewcode:Setup by the numbers

  • 17 all-time installs (skills.sh)
  • Ranked #2,076 of 3,282 Productivity & Planning skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/kochetkov-ma/claude-brewcode --skill brewcodesetup

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs17
repo stars29
Last updatedAugust 2, 2026
Repositorykochetkov-ma/claude-brewcode

What it does

Initialize Brewcode project configuration and environment setup for bounded task execution

Who is it for?

Developers setting up Brewcode projects

When should I use this skill?

Initializing Brewcode for new projects

Files

SKILL.mdMarkdownGitHub ↗

<instructions>

Phase 0: Prerequisites Check

Agent: developer | Action: Verify and install required tools

Auto-checks prerequisites. If all required components are present, skips to Phase 1 silently.

Step 1: State Check

EXECUTE using Bash tool:

bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" state && echo "✅ state" || echo "❌ state FAILED"
STOP if ❌ — verify install.sh exists in scripts/.

Step 2: Evaluate Results

Parse state output table. Required components: brew, timeout, jq.

  • All required show ✅ -> Skip to Phase 1 (log: "All prerequisites present, skipping installation.")
  • Any required show ❌ -> Continue to Step 3

Step 2.5: Load Deferred Tool Schemas

Call ToolSearch with query: "select:AskUserQuestion" to load its schema. Required for Claude Code v2.1.107+ where AskUserQuestion is deferred. If ToolSearch fails, continue -- AskUserQuestion may already be loaded.

Step 3: Install Required Components

EXECUTE using Bash tool:

bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" check-timeout && echo "✅ timeout-check" || echo "❌ timeout-check FAILED"

If TIMEOUT_EXISTS=false -> ASK (AskUserQuestion): "The timeout command is missing. Create symlink to gtimeout? This is REQUIRED for brewcode." Options: "Yes, create" | "Cancel setup"

If cancel -> STOP: "Setup cancelled. timeout command is required for brewcode."

EXECUTE using Bash tool:

bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" required && echo "✅ required" || echo "❌ required FAILED"
STOP if ❌ — required components must be installed before continuing.

If timeout still missing -> EXECUTE: bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" timeout

Step 4: Semantic Search (Optional)

If grepai not installed -> ASK (AskUserQuestion): "Install semantic search (grepai)? Enables AI-powered code search (~1.5GB)." Options: "Yes, install grepai" | "Skip"

If Yes -> EXECUTE: bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" grepai

Step 5: Summary

EXECUTE using Bash tool:

bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" summary && echo "✅ summary" || echo "❌ summary FAILED"

---

Phase 1: Project Structure Analysis

Agent: Explore | Action: Scan project and gather intelligence

Context: BC_PLUGIN_ROOT is available in your context (injected by pre-task.mjs hook).

EXECUTE using Bash tool:

bash "scripts/setup.sh" scan && echo "✅ scan" || echo "❌ scan FAILED"
STOP if ❌ — check script exists and plugin is installed.

---

Phase 2: Intelligence Analysis

Agent: Plan | Action: Consolidate findings and create adaptation strategy

Create Adaptation Plan:

# Adaptation Plan

## Tech Stack
- Language: [Java/Node.js/Python/Go/Rust]
- Framework: [Spring Boot/Express/Django/etc]
- Build: [Maven/Gradle/npm/pip/cargo]

## Testing
- Framework: [JUnit 5/pytest/Jest/Go testing]
- Assertion: [AssertJ/Hamcrest/Chai/assert]
- Mocking: [Mockito/unittest.mock/Sinon]
- Data: [DBRider/Testcontainers/fixtures]

## Database
- Type: [PostgreSQL/MySQL/MongoDB/Redis/ClickHouse]
- Access: [JOOQ/JPA/Hibernate/Sequelize/SQLAlchemy]

## Project Agents
- agent-name: purpose (model)

## Key Patterns (from CLAUDE.md)
- Pattern 1
- Pattern 2
- Pattern 3

## Template Adaptations
- Update AGENTS section with project agents
- Add tech-specific constraints
- Customize verification checklists
- Add database-specific final review agent

---

Phase 3: Template Generation

Agent: developer | Action: Generate adapted template at .claude/tasks/templates/PLAN.md.template

Create Structure

EXECUTE using Bash tool:

bash "scripts/setup.sh" structure && echo "✅ structure" || echo "❌ structure FAILED"
STOP if ❌ — verify .claude/tasks directory is writable.

Copy/Update Templates

EXECUTE using Bash tool:

bash "scripts/setup.sh" sync && echo "✅ sync" || echo "❌ sync FAILED"
STOP if ❌ — verify plugin templates exist.
Templates synced from plugin. Rules created once (never overwritten). Review skill adapted by AI.

Template Modifications

SectionAdaptation
AgentsAdd project-specific agents from .claude/agents/
Reference ExamplesFill with project's reference files (controllers, services, tests)
Phase V agentsCustomize reviewer focus for detected testing/code patterns
Final ReviewAdd project agents (db_expert, etc.) if relevant tech detected

Required Sections

Preserve universal structure. Key sections to adapt:
## Agents — Add project agents above Core Agents
## Reference Examples — R1..RN with project's canonical files
## Phases — Each phase has: Agent, Status, Context (C#), Refs (R#)
## Phase NV: Verification — 2+ agents, one checks patterns compliance
## Final Review — 3+ agents parallel
## Context Index — C1..CN task-specific files

---

Phase 3.5: Copy and Adapt Review Skill

Agent: developer | Action: Copy review skill template and adapt for project

Export project analysis results as environment variables before running the script:

export DETECTED_TECH="<detected technology stack from analysis>"
export AGENT_COUNT="<number of agents discovered>"
export GROUP_COUNT="<number of review groups>"
export MAIN_AGENT="<primary review agent name>"
export TEST_AGENT="<test review agent name>"
export DB_AGENT="<database review agent name>"

EXECUTE using Bash tool:

bash "scripts/setup.sh" review && echo "✅ review" || echo "❌ review FAILED"
STOP if ❌ — verify review template exists in plugin.

Adapt Review Skill

If you adapt the review skill description, keep it <= 120 chars (optimal ~100), single line, what + 3-5 distinct triggers. Some registries truncate long descriptions.
PlaceholderSourceExample
{PROJECT_AGENTS_TABLE}.claude/agents/ scan`\
{TECH_SPECIFIC_CHECKS}Detected tech stackSee Tech-Specific Checks below
{PROJECT_RULES}CLAUDE.md patternsAssertJ rules, Lombok, logging
{MAIN_AGENT}Project agent or reviewerreviewer
{TEST_AGENT}Project agent or testertester
{DB_AGENT}Project agent or sql_expertdb_expert
{CUSTOM_GROUPS}Additional review groupsSecurity, API validation
{CODEBASE_BLOCKS}Detected source patternssrc/main/**, src/test/**

Tech-Specific Checks Templates

Java/Spring:

CategoryChecks
DIConstructor injection, no field injection, @RequiredArgsConstructor
Transactions@Transactional scope, rollback rules, isolation levels
Null-safetyOptional usage, @NonNull/@Nullable, null checks
N+1Eager vs lazy loading, batch fetching, entity graphs
Security@PreAuthorize, input validation, SQL injection
Lombok@Value, @Builder, @Slf4j usage

Node.js/TypeScript:

CategoryChecks
AsyncPromise handling, unhandled rejections, async/await
TypesStrict null checks, type guards, generics
ValidationInput sanitization, schema validation (Zod/Joi)
SecurityXSS prevention, CSRF tokens, helmet.js
ImportsESM vs CJS, barrel exports, circular deps

Python:

CategoryChecks
Type hintsFunction signatures, return types, generics
ExceptionsSpecific exception types, context managers
Asyncasyncio patterns, event loop handling
SecuritySQL parameterization, input validation
StylePEP8, docstrings, comprehensions

Go:

CategoryChecks
Error handlingError wrapping, sentinel errors, error types
ConcurrencyGoroutine leaks, channel patterns, sync primitives
MemorySlice capacity, pointer semantics, defer usage
SecuritySQL injection, input validation
InterfacesSmall interfaces, composition

Validation

EXECUTE using Bash tool:

test -f .claude/skills/brewcode-review/SKILL.md && echo "✅ Review skill created" || echo "❌ Review skill MISSING"
grep -q "Tech-Specific\|tech-specific\|Category.*Checks" .claude/skills/brewcode-review/SKILL.md && echo "✅ Tech checks" || echo "❌ Tech checks MISSING"
STOP if any ❌ — review skill must be created before continuing.

---

Phase 3.6: Copy Configuration

Agent: developer | Action: Copy configuration template for runtime settings

EXECUTE using Bash tool:

bash "scripts/setup.sh" config && echo "✅ config" || echo "❌ config FAILED"
STOP if ❌ — verify .claude/tasks/cfg directory exists.
SettingDefaultDescription
knowledge.maxEntries100Max KNOWLEDGE.jsonl entries after compaction
knowledge.maxTokens500Max tokens in ## K block injected to agents
knowledge.priorities["❌","✅","ℹ️"]Priority order for knowledge entries
stop.maxAttempts20Stop attempts before escape mechanism triggers
agents.system[...]System agents (don't receive ## K injection)
Hooks-only architecture: No external runtime. All context management via Claude Code hooks.

---

Phase 4: Validation

Agent: developer | Action: Verify template structure

EXECUTE using Bash tool:

bash "scripts/setup.sh" validate && echo "✅ validate" || echo "❌ validate FAILED"
STOP if any ❌ — go back to "Copy Templates" step and fix.
CheckStatus
PLAN template.claude/tasks/templates/PLAN.md.template
SPEC template.claude/tasks/templates/SPEC.md.template
KNOWLEDGE template.claude/tasks/templates/KNOWLEDGE.jsonl.template
Config file.claude/tasks/cfg/brewcode.config.json
Project agents[N] from .claude/agents/
Reference Examples[N] canonical files populated
Tech-specific adaptationsTesting framework, DB patterns
Review skill.claude/skills/brewcode-review/SKILL.md

---

Phase 5: Update Global CLAUDE.md Agents

Agent: developer | Action: Update agents section in global CLAUDE.md

Step 1: Collect Agents

EXECUTE using Bash tool:

bash "scripts/setup.sh" agents > /tmp/agents-section.md && cat /tmp/agents-section.md
Output = ready-to-insert content. Script collects system + global + plugin agents.
Internal agents (bc-coordinator, bc-grepai-configurator, bc-knowledge-manager) are automatically excluded.

Step 2: Analyze Existing CLAUDE.md

Read ~/.claude/CLAUDE.md. Find ALL agent-related sections: ## Agents, ## Agent Selection, ### Core Agents, ### Global Utility Agents, any tables with Agent | Model | Purpose columns, any lists of agent names. Identify start/end line boundaries.

Step 3: Ask User

Preflight: Call ToolSearch with query: "select:AskUserQuestion" before proceeding.

ASK using AskUserQuestion: "Found agent sections in ~/.claude/CLAUDE.md. Replace with optimized LLM-friendly format?" Options: "Yes -- replace all agent sections" | "No -- keep current format"

Step 4: If YES -- Replace

Use content from /tmp/agents-section.md. Do not add agents manually -- the script already filters internal agents.

Using Edit tool: 1. Read /tmp/agents-section.md to get exact replacement content 2. Find ## Agents — DELEGATE! section in ~/.claude/CLAUDE.md 3. Replace with content from /tmp/agents-section.md 4. Preserve ### Global Skills subsection if it exists (append after agents table) 5. Preserve all non-agent content

LLM determines section boundaries, not grep. Content comes from script output.

</instructions>

---

Output Format

# Template Adaptation Complete

## Detection

| Field | Value |
|-------|-------|
| Arguments | `{received args or empty}` |
| Mode | `full` |

## Tech Stack

| Category | Value |
|----------|-------|
| Language | [detected] |
| Framework | [detected] |
| Testing | [framework] |
| Database | [type/access] |
| Project Agents | [N]: `agent1`, `agent2` |

## Adaptations

| Section | Changes |
|---------|---------|
| Agents | +[N] project agents |
| Reference Examples | [N] canonical files |
| Phase V | Reviewers for [tech] patterns |
| Final Review | +[db_expert/project agents] |
| Review Skill | Tech-specific checks, project rules |

## Templates

**Plan template:** `.claude/tasks/templates/PLAN.md.template`
**Review skill:** `.claude/skills/brewcode-review/SKILL.md`

## Usage

/brewcode:spec "Implement feature X"
/brewcode:review "Check null safety"

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.