agentleFS
linuxfoundationlinuxfoundation/insights/.claude/skills/setup/SKILL.md

setup

Skill288 starsChanged 51 days agoMITView on GitHub

Full development environment setup from scratch — prerequisites, dependencies, .env file, optional local PostgreSQL database (for auth/collections/chat work), and dev server. Use for first-time setup, broken environments, missing env vars, or when the app won't start.

  • Reads credentials
  • Installs packages

191 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use add-voice-transcription, add-discord and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • juancruzmunozalbeloSkill

    add-voice-transcription

    Add voice message transcription to NanoClaw using OpenAI's Whisper API. Automatically transcribes WhatsApp voice notes so the agent can read and respond to them.

    Also in 5 projects that use this

  • MicrosoftSkill

    add-discord

    Add Discord bot channel integration via Chat SDK.

    Also in 11 projects that use this

  • MicrosoftSkill

    add-slack

    Add Slack channel integration via Chat SDK.

    Also in 11 projects that use this

  • juancruzmunozalbeloSkill

    add-telegram-swarm

    Add Agent Swarm (Teams) support to Telegram. Each subagent gets its own bot identity in the group. Requires Telegram channel to be set up first (use /add-telegram). Triggers on "agent swarm", "agent teams telegram", "telegram swarm", "bot pool".

    Also in 7 projects that use this

  • +8 more from microsoft

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. 0 are common, 7 are distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 170 edited versions we read keep these.

  • 7

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Check that the following are installed:

    line 19
  2. Very specific:

    If Node is missing or wrong version: install via nvm or nodejs.org.

    line 27
  3. Very specific:

    If pnpm is missing: npm install -g pnpm or corepack enable && corepack prepare pnpm@latest --activate.

    line 28
  4. Distinctive:

    If Docker is not running: start Docker Desktop before continuing.

    line 29
  5. Distinctive:

    Run from the repo root:

    line 35
  6. Very specific:

    Create frontend/.env and populate it with the values below.

    line 45
  7. Distinctive:

    Ask the user: Do you need to work on any of the following features locally?

    line 81
  8. Very specific:

    Use AskUserQuestion to confirm before proceeding.

    line 87
  9. Distinctive:

    If the answer is yes, continue with the steps below.

    line 89
  10. Very specific:

    If the insights-postgres container already exists, just start it:

    line 103
  11. Distinctive:

    Wait for Postgres to be ready:

    line 124
  12. Very specific:

    If a process is listed, do not switch ports — the Auth0 redirect URI and appUrl are hardcoded to localhost:3000 in …

    line 166
  13. Distinctive:

    If you skipped Step 4: analytics, leaderboards, reports, badges, and search work.

    line 188
  14. Very specific:

    If you ran Step 4: check the container is running: docker ps | grep insights-postgres

    line 189

“Common” is measured: kept by at least 6 in 10 of the 170 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Development Environment Setup

Walk through each step in order, verifying success before moving on.


Step 1: Prerequisites

Check that the following are installed:

node --version    # must be 20+
pnpm --version    # must be 9+
docker info       # Docker must be running

If Node is missing or wrong version: install via nvm or nodejs.org. If pnpm is missing: npm install -g pnpm or corepack enable && corepack prepare pnpm@latest --activate. If Docker is not running: start Docker Desktop before continuing.


Step 2: Install dependencies

Run from the repo root:

pnpm install --filter frontend

Step 3: Environment variables

Create frontend/.env and populate it with the values below. Ask a team member for the secret values — they are shared via the team's secrets manager.

Required secrets (get from team):

  • NUXT_PUBLIC_AUTH0_CLIENT_ID
  • NUXT_AUTH0_CLIENT_SECRET
  • NUXT_JWT_SECRET
  • NUXT_TINYBIRD_TOKEN — data won't load without this

Database — only needed if you will run Step 4 (Postgres). Use these exact values:

NUXT_INSIGHTS_DB_WRITE_HOST=localhost
NUXT_INSIGHTS_DB_READ_HOST=localhost
NUXT_INSIGHTS_DB_PORT=5450
NUXT_INSIGHTS_DB_USERNAME=postgres
NUXT_INSIGHTS_DB_PASSWORD=example
NUXT_INSIGHTS_DB_DATABASE=insights

Database, auth, and other runtime config vars must use the NUXT_ prefix so Nuxt's runtime config picks them up automatically. A few server-only vars (e.g. APP_ENV) are read directly via process.env and do not need the prefix — check frontend/setup/runtime-config.ts for the full list.

Collections feature — only needed if working on collections endpoints:

NUXT_CM_DB_ENABLED=true

This also requires crowd.dev (crowd-web) DB credentials — ask the team for them.

Tell the user to let you know when their .env is ready, then continue to Step 4.


Step 4: Start the local database (optional)

Ask the user: Do you need to work on any of the following features locally?

  • Auth / login flow
  • Collections pages (/collection/*, "add to collection" buttons)
  • Copilot / chat

Use AskUserQuestion to confirm before proceeding. If the answer is no, skip to Step 5 — the dev server runs fine without Postgres, and any route that needs the DB will return an error only when hit directly.

If the answer is yes, continue with the steps below.


4a. Check for port conflicts

lsof -i :5450 | grep LISTEN

Use port 5450 (the port used throughout this guide — the Nuxt runtime default is 5432, but we use 5450 here to avoid colliding with any local Postgres instance). If it's already occupied, pick a free port, use it in the docker run -p flag below, and update NUXT_INSIGHTS_DB_PORT in frontend/.env to match.

4b. Start Postgres

If the insights-postgres container already exists, just start it:

docker start insights-postgres

Otherwise create it:

docker run -d \
  --name insights-postgres \
  -e POSTGRES_USER=postgres \
  -e POSTGRES_PASSWORD=example \
  -e POSTGRES_DB=insights \
  -p 5450:5432 \
  postgres:15-alpine \
  postgres -c wal_level=logical

wal_level=logical is required — one migration creates a logical replication slot for Sequin and will fail without it.

Wait for Postgres to be ready:

until docker exec insights-postgres pg_isready -U postgres; do sleep 1; done

4c. Run migrations

cd database && \
  PGHOST=host.docker.internal \
  PGPORT=5450 \
  PGDATABASE=insights \
  PGUSER=postgres \
  PGPASSWORD=example \
  bash migrate.sh

Linux: host.docker.internal may not resolve. Use PGHOST=localhost with --host-network instead:

cd database && PGHOST=localhost PGPORT=5450 PGDATABASE=insights PGUSER=postgres PGPASSWORD=example bash migrate.sh --host-network

4d. Verify

docker exec insights-postgres psql -U postgres -d insights -c "\dt"

Expected: tables including chat_responses, project_costs, vulnerabilities, etc.


Step 5: Start the dev server

5a. Check for port :3000 conflicts

lsof -nP -iTCP:3000 -sTCP:LISTEN

If a process is listed, do not switch ports — the Auth0 redirect URI and appUrl are hardcoded to localhost:3000 in frontend/setup/runtime-config.ts. Switching the port will break login. Kill the existing listener instead:

lsof -ti tcp:3000 | xargs kill        # graceful (SIGTERM)
lsof -ti tcp:3000 | xargs kill -9     # force, if the above doesn't clear it

5b. Start the server

cd frontend && pnpm dev

The app will be available at http://localhost:3000.


Verification

  1. Open http://localhost:3000 — the app should load
  2. Auth0 login should work if the Auth0 env vars are set
  3. Data should appear on project pages if the Tinybird token is set
  4. If you skipped Step 4: analytics, leaderboards, reports, badges, and search work. Auth, collections, and chat will return errors — that's expected.
  5. If you ran Step 4: check the container is running: docker ps | grep insights-postgres

Troubleshooting

SymptomFix
Port 3000 already in useRun lsof -ti tcp:3000 | xargs kill — do not switch ports, Auth0 callback is hardcoded to :3000
DB errors but I skipped Step 4Expected for auth/collections/chat routes — run Step 4 if you need those features
Port 5450 already in usePick a free port (e.g. -p 5455:5432) and update NUXT_INSIGHTS_DB_PORT in .env
host.docker.internal not resolving (Linux)Use PGHOST=localhost with --host-network
Migration checksum mismatchNever edit an applied migration — create a new one with /db-migrate new <name>
Auth errors in browserCheck Auth0 env vars in frontend/.env
No data showingCheck NUXT_TINYBIRD_TOKEN is populated in frontend/.env
503 on collections endpointsAdd NUXT_CM_DB_ENABLED=true and CM DB credentials to frontend/.env
DB env vars not picked upEnsure all vars have the NUXT_ prefix — e.g. NUXT_INSIGHTS_DB_PORT, not INSIGHTS_DB_PORT
Container exists but wrong settingsdocker rm -f insights-postgres then re-run the docker run command

Teardown

docker stop insights-postgres && docker rm insights-postgres

For running docs or blog locally, use /setup-docs. For applying new migrations, use /db-migrate.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.