lfx-setup
Skill10 starsChanged 2 months agoMITView on GitHub
Environment setup for any LFX repo, prerequisites, clone, install, env vars, and dev server. Adapts to repo type (Angular or Go). Use for getting started, first-time setup, broken environments, or install failures.
- Reads credentials
- Deletes or force-pushes
- Installs packages
In this repository23 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- copilot-code-reviewerSkill
- lfx-skills-code-reviewSkill
- lfx-cdp-snowflake-connectorsSkill
- lfx-data-engineerSkill
- lfx-general-code-reviewSkill
- lfx-git-setupSkill
- lfx-intercomSkill
- lfx-itx-integrationSkill
- lfx-local-reviewSkill
- lfx-megalinterSkill
- lfx-object-store-designSkill
- lfx-object-store-opsSkill
- lfx-platform-architectureSkill
- lfx-pr-catchupSkill
- lfx-pre-pr-reviewSkill
- lfx-pr-resolveSkill
- lfx-security-engineerSkill
- lfxSkill
- lfx-snowflake-accessSkill
- lfx-test-journeySkill
- lfx-v2-ticket-writerSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Key principle: Verify each step before proceeding to the next.
- Distinctive: line 22
Before diving into the technical steps, here's what you should have ready:
- Distinctive: line 29
Don't worry if you're not sure about any of these, I'll check each one as we go and help you get access if needed.
- Distinctive: line 47
Check that the following are installed and verify versions:
- Very specific: line 64
If corepack enable fails with permission errors: sudo corepack enable
- Very specific: line 65
If using Homebrew Node: Homebrew doesn't always include corepack, npm install -g corepack first
- Distinctive: line 70
If not already cloned:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Copyright The Linux Foundation and each contributor to LFX. --><!-- SPDX-License-Identifier: MIT --><!-- Tool names in this file use Claude Code vocabulary. See docs/tool-mapping.md for other platforms. -->LFX Environment Setup Guide
You are helping a contributor set up an LFX development environment from scratch. Walk through each step interactively, verifying success before moving on.
Key principle: Verify each step before proceeding to the next.
What You'll Need (before we start)
Before diving into the technical steps, here's what you should have ready:
- Access to the LFX GitHub organization, you need to be able to clone LFX repositories. If you can visit
github.com/linuxfoundationand see private repos, you're good. - Access to the team 1Password vault, some configuration values (API keys, secrets) are stored in 1Password under the "LFX One Dev Environment" vault. Ask your team lead if you don't have access.
- About 15 minutes, first-time setup takes a bit for downloads and installs. Subsequent setups are faster.
- A terminal app, Terminal.app (macOS), iTerm2, or any terminal emulator.
Don't worry if you're not sure about any of these, I'll check each one as we go and help you get access if needed. Don't assume success, check.
Repo Type Detection
if [ -f apps/lfx-one/angular.json ] || [ -f turbo.json ]; then
echo "REPO_TYPE=angular" # lfx-self-serve
elif [ -f go.mod ]; then
echo "REPO_TYPE=go" # Go microservice
fiAngular Repo Setup (lfx-self-serve)
Step 1: Prerequisites
Check that the following are installed and verify versions:
echo "=== Prerequisites Check ==="
echo -n "Node.js: " && node --version 2>/dev/null || echo "NOT INSTALLED"
echo -n "Yarn: " && yarn --version 2>/dev/null || echo "NOT INSTALLED"
echo -n "Git: " && git --version 2>/dev/null || echo "NOT INSTALLED"Required versions:
- Node.js v22+, If wrong version: recommend
nvm install 22 && nvm use 22 - Yarn v4.9.2+, If missing:
corepack enable && corepack prepare yarn@4.9.2 --activate - Git, Any recent version
Docker is NOT required for local development. All services point to the shared dev environment.
macOS-specific notes:
- If
corepack enablefails with permission errors:sudo corepack enable - If using Homebrew Node: Homebrew doesn't always include corepack,
npm install -g corepackfirst - Xcode Command Line Tools must be installed:
xcode-select --install
Step 2: Clone the Repository
If not already cloned:
git clone <repository-url>
cd lfx-self-serveStep 3: Environment Variables
- Copy the env template:
cp apps/lfx-one/.env.example apps/lfx-one/.env - Get credentials from 1Password:
- Access the LFX One Dev Environment vault
- Copy all required values into
apps/lfx-one/.env
- Validate critical env vars:
echo "=== Env Var Check ===" missing=() for key in PCC_AUTH0_CLIENT_ID PCC_AUTH0_CLIENT_SECRET PCC_AUTH0_ISSUER_BASE_URL PCC_AUTH0_AUDIENCE PCC_AUTH0_SECRET PCC_BASE_URL LFX_V2_SERVICE; do if grep -qE "^${key}=.+" apps/lfx-one/.env 2>/dev/null; then echo "✓ $key" else echo "✗ $key, MISSING" missing+=("$key") fi done if [ ${#missing[@]} -gt 0 ]; then echo -e "\nMissing vars: ${missing[*]}" echo "Get these from 1Password → LFX One Dev Environment vault" else echo -e "\nAll critical env vars are populated ✓" fi
Step 4: Install Dependencies
yarn installIf yarn install fails:
EACCESerrors → Don't usesudo. Check Node is installed via nvm, not system package- Corepack errors →
corepack enable && corepack prepare yarn@4.9.2 --activate - Network errors → Check VPN/proxy settings, try
yarn config set httpProxy ... node-gyperrors → Ensure Xcode Command Line Tools are installed:xcode-select --install
Verify install succeeded:
[ -d node_modules ] && echo "✓ node_modules exists" || echo "✗ node_modules missing"
[ -f yarn.lock ] && echo "✓ yarn.lock exists" || echo "✗ yarn.lock missing"Step 5: Start Development Server
yarn startThe app should be available at http://localhost:4200.
Step 6: Verify
# Wait a few seconds for the server to start, then check
curl -s -o /dev/null -w "%{http_code}" http://localhost:4200Expected: HTTP 200 or 302 (redirect to login).
If the server fails to start:
- Port 4200 in use →
lsof -i :4200to find the process, kill it or use a different port - Auth errors → Verify
.envvalues match 1Password - Build errors → Run
yarn buildseparately to see detailed errors - SSR errors → Check Node version is 22+
Go Microservice Setup
Step 1: Prerequisites
echo "=== Prerequisites Check ==="
echo -n "Go: " && go version 2>/dev/null || echo "NOT INSTALLED"
echo -n "Git: " && git --version 2>/dev/null || echo "NOT INSTALLED"
echo -n "Make: " && make --version 2>/dev/null | head -1 || echo "NOT INSTALLED"Required:
- Go 1.22+,
go version - Git,
git --version - Make,
make --version - Goa v3, installed via Makefile (
make apigenhandles this)
Optional for full local stack:
- Helm,
helm version - OrbStack or Docker, for running the platform locally
Step 2: Clone the Repository
git clone <repository-url>
cd lfx-v2-<service>-serviceStep 3: Environment Variables
Standard environment variables for running against the local stack:
export NATS_URL=nats://localhost:4222
export OPENSEARCH_URL=http://localhost:9200
export JWKS_URL=http://localhost:4457/.well-known/jwks
export LFX_ENVIRONMENT=lfx.
export PORT=8080For running against the shared dev environment, get values from 1Password.
Step 4: Build
go mod download
go build ./...If build fails:
- Missing dependencies →
go mod tidy && go mod download - Wrong Go version → Check
go.modfor required version - CGO errors on macOS →
export CGO_ENABLED=0if the service doesn't need CGO
Verify:
echo $? # Should be 0Step 5: Generate API Code (if applicable)
make apigenIf apigen fails:
- Goa not installed → The Makefile should auto-install it. If not:
go install goa.design/goa/v3/cmd/goa@v3.22.6 - Design errors → Check
cmd/*/design/*.gofor syntax issues
Step 6: Run
go run cmd/*-api/main.goVerify:
curl -s http://localhost:8080/livez
# Expected: 200 OKStep 7: Local Platform Stack (Optional)
To run the full platform locally with all services:
# Clone the helm repo
git clone https://github.com/linuxfoundation/lfx-v2-helm
cd lfx-v2-helm
# Pull chart dependencies
helm dependency update charts/lfx-platform
# Create local values
cp charts/lfx-platform/values.local.example.yaml charts/lfx-platform/values.local.yaml
# Edit values.local.yaml, secrets are in 1Password
# Install
helm install -n lfx lfx-platform ./charts/lfx-platform \
--values charts/lfx-platform/values.local.yamlTroubleshooting Quick Reference
| Symptom | Likely Cause | Fix |
corepack enable permission error | System Node | sudo corepack enable or use nvm |
yarn install EACCES | Root-owned files | Don't use sudo. Reinstall Node via nvm |
| Port 4200 in use | Zombie process | lsof -i :4200 then kill <PID> |
| Auth redirect loop | Wrong .env values | Re-copy from 1Password |
ERR_MODULE_NOT_FOUND | Missing deps | rm -rf node_modules && yarn install |
| NATS connection refused | Local stack not running | Start the Helm platform stack |
make apigen fails | Missing Goa | go install goa.design/goa/v3/cmd/goa@v3.22.6 |
| Go build fails after Goa changes | Stale generated code | make apigen && go build ./... |
Done
Once the app/service runs successfully:
═══════════════════════════════════════════
SETUP COMPLETE ✓
═══════════════════════════════════════════
Repo: [repo name]
Type: [Angular / Go microservice]
Running at: [URL]
═══════════════════════════════════════════Suggest next steps:
- Find the owning repo or peer repos: use
/lfx-skills:lfx - Understand platform shape: use
/lfx-skills:lfx-platform-architecture - Understand V2 service shape: use
/lfx-skills:lfx-platform-architecture - Understand Go conventions: rely on the owning repo's path-scoped
<short-repo-name>-devskill - Build or modify a feature: use the owning repo's local skills and
CLAUDE.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

