Agent skill

Local Environment

by polarsource in polarsource/polar

Local development environment management for Polar using Docker

MITAuto-check: notesData & Analytics

Install Local Environment

skills CLI
$ npx skills add polarsource/polar --skill local-environment -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install polarsource/polar local-environment --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/polarsource/polar.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/local-environment .claude/skills/local-environment && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-environment
GitHub stars
10k
Token cost
~1.4k tokens
SKILL.md length
631 words
Files
10
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Local development environment management for Polar using Docker

  • Works in 3 steps: POLAR_DOCKER_INSTANCE pinned in… → The cross-worktree registry… → Otherwise the lowest free number, then…
  • Tasks that involve DataFrames
  • SKILL.md covers The two-part model, Instance auto-detection, When to use and Quick reference, plus 3 more sections
  • Calls docker

What it does

Local Environment is an agent skill from polarsource/polar. Local development environment management for Polar using Docker

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files (for example `AGENTS.md`, `rules/manage-instances.md` and `rules/payment-testing.md`).

It sits in Data & Analytics, covering DataFrames and Containers. It works with Docker. The repository describes itself as: Polar — A billing platform for the intelligence era. The licence is MIT.

When your agent uses it

  • Tasks that involve DataFrames
  • Tasks that involve Containers

Example prompts

  • “/local-environment”

Requirements

  • Docker

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. POLAR_DOCKER_INSTANCE pinned in dev/docker/.env.docker (dev docker set-instance N)
  2. The cross-worktree registry (~/.config/polar/docker-instances.json)
  3. Otherwise the lowest free number, then registered

What it can do on your machine

Read from SKILL.md and the folder at commit e4fc909. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • docker

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use docker, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local Environment loads about 1.4k tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 631 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~20
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteMentions a .env fileSKILL.md:38
    R_DOCKER_INSTANCE` pinned in `dev/docker/.env.docker` (`dev docker set-instance N`)

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from polarsource/polar at commit e4fc909, republished under its MIT licence (© polarsource). 631 words, ~1,352 tokens.

Download SKILL.mdSave it as .claude/skills/local-environment/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
local-environment
description
Local development environment management for Polar using Docker
license
MIT
metadata.author
polar
metadata.version
1.1.0

Local Environment Skill

Helps manage the Polar local development environment through the dev docker CLI. Use it to start, stop, debug, or reason about the local stack.

The two-part model

dev docker deliberately splits the stack so many worktrees can share one set of heavy infra:

  • Shared infra — one copy per machine, Docker project polar-shared: postgres, redis, minio, tinybird, and optional prometheus/grafana. Postgres and redis publish no host ports; MinIO exposes 9000/9001 for browser uploads. Use dev docker exec <service> ... for services without host ports.
  • Per-instance app stack — one per worktree, project polar-app-<N>: api, worker, web. Only api and web publish host ports, offset per instance so worktrees don't collide.

Knowing this prevents the most common confusion: there is no localhost:5432 for the database (it lives in the shared stack and is reached through dev docker exec db ...). MinIO does expose ports 9000/9001 for browser uploads and console access.

Instance auto-detection

dev docker auto-detects the instance for the current worktree, so -i is rarely needed. Priority:

  1. POLAR_DOCKER_INSTANCE pinned in dev/docker/.env.docker (dev docker set-instance N)
  2. The cross-worktree registry (~/.config/polar/docker-instances.json)
  3. Otherwise the lowest free number, then registered

Run dev docker ports to see the resolved instance and its URLs (add --json for tooling). To wire this worktree into Claude Code's preview, run dev docker launch-json, which writes a per-instance .claude/launch.json with the correct ports (it's gitignored, so regenerate after set-instance).

When to use

  • Start / stop / restart the local environment
  • View logs or debug a service that won't come up
  • Run several isolated worktree instances in parallel
  • Understand the service architecture or find a service's real port
  • Diagnose container or first-boot errors

Quick reference

TaskCommand
Start full stack (background)dev docker up -d
Start and block until healthydev docker up -d --wait
Start in foreground (stream logs)dev docker up --no-detach
Rebuild with fresh base imagesdev docker up -b --pull -d
Show this instance's ports/URLsdev docker ports (--json for tooling)
Write Claude Code preview configdev docker launch-json
Stop app stackdev docker down
Stop app and shared infradev docker down --all
Follow logsdev docker logs -f [service]
Print logs and exitdev docker logs --no-follow [service]
Statusdev docker ps
Restart a servicedev docker restart <service>
Shell into a servicedev docker shell <service>
One-off command in a servicedev docker exec <service> <cmd>
Reset this instancedev docker cleanup -f
Wipe ALL shared datadev docker cleanup --all -f
List every instancedev docker list
With monitoringdev docker up --monitoring -d
Show full SKILL.md (210 more words)Show less

Services

ServiceProjectHost port (instance 0 / N)Notes
apipolar-app-<N>8000 / 8100+NFastAPI; /healthz healthcheck
webpolar-app-<N>3000 / 3100+NNext.js; healthchecked
workerpolar-app-<N>noneBackground jobs
dbpolar-sharednone (exec)PostgreSQL; DB polar_dev_<N>
redispolar-sharednone (exec)Redis DB index = N
miniopolar-shared9000, 9001S3; buckets polar-s3-<N>; console at 9001
tinybirdpolar-sharednone (exec)Analytics
prometheus / grafanapolar-sharednone (exec)--monitoring only

Discover the exact host ports for the current worktree with dev docker ports.

Instance port mapping

Only api and web get host ports: Port = Base + Instance (Base 8100 for api, 3100 for web) for instances 1–99. Instance 0 uses the legacy 8000 / 3000.

InstanceAPIWeb
080003000
181013101
281023102
581053105

Everything else is per-instance but not on a host port: database polar_dev_<N>, redis DB index <N>, buckets polar-s3-<N> / polar-s3-public-<N>. Reach them via dev docker exec <service> or docker exec polar-shared-<service>-1.

Rules index

RuleCategoryDescription
service-architectureReferenceService details, ports, healthchecks
start-environmentOperationsStarting the stack (flags, --wait, --pull)
stop-environmentOperationsStopping and cleanup (app vs shared)
manage-instancesOperationsParallel worktree instances
view-logsDebuggingViewing service logs
shell-and-workflowsOperationsShell access and common dev workflows
troubleshootingDebuggingCommon errors and fixes
payment-testingOperationsLogin codes, Stripe webhooks, backoffice

© polarsource, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files in .agents/skills/local-environment of polarsource/polar.

  • SKILL.md
  • AGENTS.md
  • rules/manage-instances.md
  • rules/payment-testing.md
  • rules/service-architecture.md
  • rules/shell-and-workflows.md
  • rules/start-environment.md
  • rules/stop-environment.md
  • rules/troubleshooting.md
  • rules/view-logs.md

Open the folder on GitHubat commit e4fc909

Compare with similar skills

Local Environment next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local Environment compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local Environment this skillpolarsource/polar10k—~1.4kAutomated safety check: NotesMIT
Polar Local Environmentfcakyon/claude-codex-settings1.2k—~1.4kAutomated safety check: NotesMIT
Tao Analyze Gaps Visual ChangenetNVIDIA/skills3.5k—~4.3kAutomated safety check: NotesApache-2.0
Deploying Go SDK Bundlesastronomer/agents451—~1.8kAutomated safety check: NotesApache-2.0
Scraper Builderjwynia/agent-skills166—~4kAutomated safety check: PassMIT
Time Series Analytics Useropen-edge-platform/edge-ai-libraries169—~3.1kAutomated safety check: PassApache-2.0

Similar skills

  • Polar Local Environment

    fcakyon/claude-codex-settings

    This skill should be used when setting up or managing Polar local development environment with Docker.

    1.2k GitHub stars~1.4k tokensUpdated yesterday
    Data & AnalyticsAuto-check: notes
  • Official

    Performs gap analysis on NVIDIA TAO VCN Classify (Visual Component Net) experiments by invoking the pinned TAO data-services container directly via docker run … gapanalysis vcnaoi … — picks the…

    3.5k GitHub stars~4.3k tokensUpdated yesterday
    DevOps & CloudAuto-check: notes
  • Deploying Go SDK Bundles

    astronomer/agents

    Builds, packs, and deploys compiled Airflow Go SDK bundles so the ExecutableCoordinator can run them.

    451 GitHub stars~1.8k tokensUpdated yesterday
    Data & AnalyticsAuto-check: notes
  • Scraper Builder

    jwynia/agent-skills

    Guide AI agents to generate complete PageObject pattern web scraper projects using Playwright and TypeScript with Docker deployment.

    166 GitHub stars~4k tokensUpdated 7 mo ago
    Data & AnalyticsAuto-check passed
  • Time Series Analytics User

    open-edge-platform/edge-ai-libraries

    Build a new time-series analytics use case on top of the deployed Time Series Analytics microservice — bring it up with Docker Compose (from a repo clone, or by fetching the compose files from…

    169 GitHub stars~3.1k tokensUpdated yesterday
    Data & AnalyticsAuto-check passed
  • Version Bumper

    godatadriven/whirl

    Bump the Airflow or Python version across all project files.

    205 GitHub stars~1.2k tokensUpdated 7 days ago
    Data & AnalyticsAuto-check passed

More from polarsource/polar

All 18 skills in this repo
  • Polar Python SDK

    polarsource/polar

    Integrate Polar billing in server-side Python applications using the versioned Polar and PolarAsync clients.

    10k GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Polar Typescript SDK

    polarsource/polar

    Integrate Polar billing in server-side TypeScript applications using the versioned createPolar and createPolarCore clients.

    10k GitHub stars~2k tokensUpdated yesterday
    Auto-check passed
  • Adr Check

    polarsource/polar

    Check a code change against the repo's Accepted Architecture Decision Records (ADRs) in handbook/engineering/decisions/ and report violations with citations.

    10k GitHub stars~771 tokensUpdated yesterday
    Auto-check passed
  • API Surface Review

    polarsource/polar

    Review changes to Polar's API contract — Pydantic schemas, FastAPI endpoints, OpenAPI output and the generated SDKs.

    10k GitHub stars~1.3k tokensUpdated yesterday
    Auto-check passed
  • Billing Review

    polarsource/polar

    Review a diff that touches Polar's billing domain — subscriptions, cycles and crons, orders, billing entries, meters and usage, discounts, checkout, payments and dunning, refunds, disputes, payouts…

    10k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Interview Task

    polarsource/polar

    Prepare an interview task for a candidate, as part of our hiring process.

    10k GitHub stars~933 tokensUpdated yesterday
    Auto-check passed

Works with

Questions about Local Environment

What does Local Environment do?

Local development environment management for Polar using Docker. Local Environment is an agent skill from polarsource/polar.

When should I use Local Environment?

Local Environment fits situations like: tasks that involve DataFrames; tasks that involve Containers.

How do I install Local Environment in Claude Code?

Run `npx skills add polarsource/polar --skill local-environment -a claude-code`. Or copy the skill folder (.agents/skills/local-environment in polarsource/polar) into .claude/skills/local-environment in your project. Claude Code loads it when a task matches its description.

How do I install Local Environment in Codex?

Run `npx skills add polarsource/polar --skill local-environment -a codex`. Or copy the skill folder (.agents/skills/local-environment in polarsource/polar) into .agents/skills/local-environment in your project. Codex loads it when a task matches its description.

Can I use Local Environment in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add polarsource/polar --skill local-environment -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-environment, .gemini/skills/local-environment, .github/skills/local-environment and .opencode/skills/local-environment in your project.

What does Local Environment need to run?

Going by SKILL.md and its folder, Local Environment needs the command-line tools its instructions call (docker). Our summary lists: Docker.

Does Local Environment access the network?

SKILL.md contains no URLs. Its commands use docker, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Local Environment safe to install?

Our automated static check of SKILL.md found notes only (mentions a .env file), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Local Environment use?

Local Environment is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local Environment use?

About 1.4k tokens (SKILL.md is roughly 5.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Local Environment?

Skills that share tags, products or a category with Local Environment: Polar Local Environment (fcakyon/claude-codex-settings, 1.2k stars), Tao Analyze Gaps Visual Changenet (NVIDIA/skills, 3.5k stars), Deploying Go SDK Bundles (astronomer/agents, 451 stars) and Scraper Builder (jwynia/agent-skills, 166 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local Environment?

polarsource (a GitHub organization) maintains it in polarsource/polar, which has 10,340 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on October 7, 2026.

Source: polarsource/polar on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.