brewcode:setup
Checks prerequisites and analyzes project structure to generate adapted templates in .claude/tasks/templates/.
What this skill does
<instructions>
## Phase 0: Prerequisites Check
**Agent:** developer | **Action:** Verify and install required tools
> **Context:** This phase auto-checks prerequisites. If all required components are present, it skips to Phase 1 silently.
### Step 1: State Check
**EXECUTE** using Bash tool:
```bash
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 the state output table. Check required components: **brew**, **timeout**, **jq**.
- **If ALL required show ✅** → Skip to Phase 1 (log: "All prerequisites present, skipping installation.")
- **If ANY required show ❌ missing** → Continue to Step 3
### Step 2.5: Load Deferred Tool Schemas
Call **ToolSearch** with `query: "select:AskUserQuestion"` to load its schema.
This is required for Claude Code v2.1.107+ where AskUserQuestion is deferred.
If ToolSearch fails or returns no result, continue — AskUserQuestion may already be loaded.
### Step 3: Install Required Components
**EXECUTE** using Bash tool:
```bash
bash "${CLAUDE_SKILL_DIR}/scripts/install.sh" check-timeout && echo "✅ timeout-check" || echo "❌ timeout-check FAILED"
```
**If TIMEOUT_EXISTS=false** → **ASK** (AskUserQuestion):
- Question: "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
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):
- Question: "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
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).
### Scan Commands
**EXECUTE** using Bash tool — gather project info:
```bash
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
```markdown
# 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
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 — sync templates from plugin (always overwrites if changed):
```bash
bash "scripts/setup.sh" sync && echo "✅ sync" || echo "❌ sync FAILED"
```
> **STOP if ❌** — verify plugin templates exist.
> **Note:** Templates synced from plugin. Rules created once (never overwritten). Review skill adapted by AI.
### Template Modifications
| Section | Adaptation |
|---------|-----------|
| Agents | Add project-specific agents from `.claude/agents/` |
| Reference Examples | Fill with project's reference files (controllers, services, tests) |
| Phase V agents | Customize reviewer focus for detected testing/code patterns |
| Final Review | Add project agents (db_expert, etc.) if relevant tech detected |
### Required Sections
> Preserve universal structure. Key sections to adapt:
```markdown
## 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
### Create Review Skill Directory and Copy Template
Before running the script, export project analysis results as environment variables:
```bash
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 — create directory and copy review skill template:
```bash
bash "scripts/setup.sh" review && echo "✅ review" || echo "❌ review FAILED"
```
> **STOP if ❌** — verify review template exists in plugin.
### Adapt Review Skill
Replace placeholders based on Phase 2 analysis:
| Placeholder | Source | Example |
|-------------|--------|---------|
| `{PROJECT_AGENTS_TABLE}` | `.claude/agents/` scan | `\| db_expert \| PostgreSQL \| DB layer \|` |
| `{TECH_SPECIFIC_CHECKS}` | Detected tech stack | See Tech-Specific Checks below |
| `{PROJECT_RULES}` | CLAUDE.md patterns | AssertJ rules, Lombok, logging |
| `{MAIN_AGENT}` | Project agent or `reviewer` | `reviewer` |
| `{TEST_AGENT}` | Project agent or `tester` | `tester` |
| `{DB_AGENT}` | Project agent or `sql_expert` | `db_expert` |
| `{CUSTOM_GROUPS}` | Additional review groups | Security, API validation |
| `{CODEBASE_BLOCKS}` | Detected source patterns | `src/main/**`, `src/test/**` |
### Tech-Specific Checks Templates
**Java/Spring:**
```markdown
| Category | Checks |
|----------|--------|
| DI | Constructor injection, no field injection, @RequiredArgsConstructor |
| Transactions | @Transactional scope, rollback rules, isolation levels |
| Null-safety | Optional usage, @NonNull/@Nullable, null checks |
| N+1 | Eager vs lazy loading, batch fetching, entity graphs |
| Security | @PreAuthorize, input validation, SQL injection |
| Lombok | @Value, @Builder, @Slf4j usage |
```
**Node.js/TypeScript:**
```markdown
| Category | Checks |
|----------|--------|
| Async | Promise handling, unhandled rejections, async/await |
| Types | Strict null checks, type guards, generics |
| Validation | Input sanitization, schema validation (Zod/Joi) |
| Security | XSS prevention, CSRF tokens, helmet.js |
| Imports | ESM vs CJS, barrel exports, circular deps |
```
**Python:**
```markdown
| Category | Checks |
|----------|--------|
| Type hints | Function signatures, return types, generics |
| Exceptions | Specific exception types, context managers |
| Async | asyncio patterns, event loop handling |
| Security | SQL parameterization, input validation |
| Style | PEP8, docstrings, comprehensRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.