local-bc
Manage a local Business Central instance for development and testing. Detects host vs container environment automatically. Uses bc-linux run-tests.sh for test execution.
What this skill does
# /local-bc — Local Business Central
A local BC instance for compiling, publishing, and running tests.
## Environment Detection
Check `$BC_SERVER` to determine how to reach BC:
| Environment | `$BC_SERVER` | BC address |
|-------------|-------------|------------|
| Host (direct) | unset | `localhost` |
| Sandboxed container | set (e.g. `172.17.0.1`) | `$BC_SERVER` |
**Inside a container:** You cannot start or stop BC — there is no Docker CLI or socket.
The user must start the BC stack on the host before you can use it. If BC is not
reachable, tell the user:
> BC is not running. Please start it on the host:
> ```
> cd ~/Documents/Repos/community/bc-linux && docker compose up -d --wait
> ```
## Check if BC is Running
```bash
BC_HOST="${BC_SERVER:-localhost}"
curl -sf -u BCRUNNER:Admin123! "http://${BC_HOST}:7049/BC/dev/metadata" > /dev/null 2>&1 \
&& echo "BC is running" || echo "BC is NOT running"
```
## BC Endpoints
| Service | URL | Auth |
|---------|-----|------|
| Dev (publish/symbols) | `http://${BC_HOST}:7049/BC/dev` | `BCRUNNER:Admin123!` |
| OData | `http://${BC_HOST}:7048/BC/ODataV4` | `BCRUNNER:Admin123!` |
| API | `http://${BC_HOST}:7052/BC/api` | `BCRUNNER:Admin123!` |
| Web Client / WebSocket | `http://${BC_HOST}:7085` | `BCRUNNER:Admin123!` |
## Publish
```bash
bc-publish # Uses .bcconfig.json or $BC_SERVER automatically
```
Or with curl:
```bash
BC_HOST="${BC_SERVER:-localhost}"
curl -u BCRUNNER:Admin123! -X POST \
-F "file=@path/to/app.app;type=application/octet-stream" \
"http://${BC_HOST}:7049/BC/dev/apps?SchemaUpdateMode=forcesync"
```
Publish dependencies first, then the main app, then the test app.
## Run Tests
Tests use the `run-tests.sh` script from the bc-linux repo, mounted at `/opt/bc-linux`.
```bash
BC_HOST="${BC_SERVER:-localhost}"
/opt/bc-linux/scripts/run-tests.sh \
--base-url "http://${BC_HOST}:7048/BC" \
--dev-url "http://${BC_HOST}:7049/BC/dev" \
--app path/to/test-app.app
```
**Options:**
- `--app <path>` — Test .app file (auto-published + codeunit IDs auto-discovered)
- `--codeunit-range <range>` — Codeunit ID range (e.g. `70000` or `70000..70001`)
- `--base-url <url>` — BC OData base (default: `http://localhost:7048/BC`)
- `--dev-url <url>` — BC Dev endpoint (default: `http://localhost:7049/BC/dev`)
- `--auth <user:pass>` — Credentials (default: `BCRUNNER:Admin123!`)
- `--timeout <minutes>` — Overall timeout (default: 30)
**What the script does:**
1. Publishes the TestRunnerExtension if needed
2. Publishes your test app (if `--app` given)
3. Discovers test codeunit IDs from the .app's SymbolReference.json
4. Sets up the test suite via OData API
5. Executes tests via WebSocket (TestPage session)
6. Reports results with exit code 0=pass, 1=failures
**If `/opt/bc-linux` is not mounted**, tell the user to add this volume to their
docker run command:
```
-v "$HOME/Documents/Repos/community/bc-linux:/opt/bc-linux:ro"
```
## Download Symbols
```bash
BC_HOST="${BC_SERVER:-localhost}"
mkdir -p .alpackages
for app in "System" "System Application" "Base Application" "Application"; do
curl -sf -u BCRUNNER:Admin123! \
"http://${BC_HOST}:7049/BC/dev/packages?publisher=Microsoft&appName=$(echo $app | sed 's/ /%20/g')&appVersion=0.0.0.0" \
-o ".alpackages/${app}.app" && echo "Downloaded ${app}" || echo "Failed: ${app}"
done
```
## .bcconfig.json
Both `bc-publish` and `bc-test` auto-detect `$BC_SERVER` when no `.bcconfig.json`
exists. If a `.bcconfig.json` is present, its `server` field takes precedence.
```json
{
"server": "http://localhost",
"port": 7048,
"instance": "BC",
"authentication": "UserPassword",
"username": "admin",
"password": "Admin123!"
}
```
**Inside a container**, either omit `.bcconfig.json` (tools use `$BC_SERVER`
automatically) or set `"server"` to `"http://<BC_SERVER value>"`.
## Full Build-Test Cycle
1. Check if BC is running (curl dev endpoint), ask user to start if not
2. Download symbols to `.alpackages/`
3. Compile (`al-compile`)
4. Publish main app, then test app (`bc-publish` or curl)
5. Run tests (`/opt/bc-linux/scripts/run-tests.sh --app <test.app> --base-url ...`)
## Starting BC on the Host
The user runs this (you cannot run it from inside a container):
```bash
cd ~/Documents/Repos/community/bc-linux && docker compose up -d --wait
```
First boot takes 5-10 minutes (artifact download + DB restore). Subsequent starts ~20 seconds.
To set a specific version:
```bash
BC_VERSION=27.5 BC_COUNTRY=w1 docker compose up -d --wait
```
To stop:
```bash
docker compose down # Keep data
docker compose down -v # Full reset
```
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.