ConfigHub · Durable config for coding agents
Docs / plugins/confighub/skills/app-with-confighub/SKILL.md Source on GitHub →

Help with the app where the person is working

The person asks for development work. Work from their app, files and delivery path; they do not need to know ConfigHub commands or roadmap names. The plugin already keeps its local record without a hub or account. Building an ordinary app does not require setup.

For a recap or any question about why a setting has its current value (such as "Why is the cache on?"), check ConfigHub's recorded history first—use any history supplied with the question or run "$CONFIGHUB_PLUGIN_PROGRAM" mini changes --why KEY / mini changes --summary from the app folder before searching shell history or old transcripts. Match each reason to its own edit. If a change has no recorded reason, say so.

Keep the person inside their chat session: run cub env preview --status yourself instead of telling them to run CLI plumbing, and never mention run-codex, owner launcher, or internal terms like base, Space, Unit, or change order in Claude Code. Use plain words: preview (temporary test copy), staging (shared test copy), production (protected copy), and shared defaults.

An explicit request to build an app using ConfigHub, or to attach ConfigHub, is already a setup choice. Complete that requested setup; do not replace it with plain files or ask whether they want ConfigHub again. For an app that Argo CD or Flux already deploys, with CUB_MINI_STARTERS set, read reference section 0 first: one line does the setup. Otherwise read reference sections 1–3, build the app and settings, start/find the chosen hub, adopt the app, and prepare its restricted agent setup.

When the person names a host, start with the app’s own start command and the guide for that host. For Daytona, Daytona runs the app. ConfigHub keeps its settings and can bring an experiment back for review. Reuse the chosen sandbox and its access and auto-stop settings. For a new sandbox, keep it private and leave its auto-stop interval in place. Check the app’s actual response before saying it is running. For a new local attachment use "$CONFIGHUB_PLUGIN_PROGRAM" mini get and the launcher it prints. Local setup needs no hosted ConfigHub login. Respect the connection of an already attached app.

When the plugin offers to keep a preview, find the setting for the requested change before asking. Explain that the preview can be reopened in a fresh chat. Finish with this one question on its own line and wait for the reply:

May I download ConfigHub mini and attach this app so you can keep its preview?

A yes to that offer authorizes setup for this app and this preview. It does not authorize production delivery or turn on automatic attachment elsewhere. For a kept preview, from the app root run the bundled plugin program (the one in CONFIGHUB_PLUGIN_PROGRAM, or the installed plugin's bin/confighub):

"$CONFIGHUB_PLUGIN_PROGRAM" mini keep-preview --set 'KEY=VALUE' --change-desc 'why the person wants to try it'

Use the app's real setting and the requested value. Omit both flags to keep the current settings. This one command fetches mini if needed, attaches the folder, saves the change in its private preview and prepares the app session. In a workspace-restricted Codex session on macOS, this command may need access outside the app folder to create the local database and listen on a local port. If those actions require permission and the session can ask, request it on the first call to keep-preview (sandbox_permissions=require_escalated) for this command once. Keep the same ConfigHub identity, request no prefix rule, and stop if refused. Wait for the setup command to finish. In Codex, poll its command handle if it is still downloading. Codex starts the saved preview in the app's restricted profile during this call. If Claude Code gets a command ending in mini keep-preview --show, run it yourself in the next Bash call in this conversation. That call uses the folder's new permissions. Fetch the printed address, report what the page says, and leave the preview running. A yes covers this step. Leave production approvals for the owner. Follow the reported recovery instruction if setup fails.

When the person comes back asking where it is running, check the existing process. In ordinary Codex use "${CODEX_HOME:-$HOME/.codex}/confighub/bin/confighub" mini preview --status. In the app's scoped session use cub env preview --status. Fetch the returned address, requesting local network access for that address if necessary, and verify the page. If asked to start a stopped preview in a scoped session, run cub env preview.

Choose the smallest useful step

Inspect .confighub-app and existing environment and deployment setup first.

What the person needsWhat to do
Attach ConfigHub to an app that Argo CD or Flux already deploys (kubectl get applications.argoproj.io -A or kustomizations.kustomize.toolkit.fluxcd.io -A shows it), whether or not CUB_MINI_STARTERS is setUse reference section 0: run the starter's adopt yourself when a hub answers, and the person's approval moves what the controller deploys from Git to the hub's OCI release. Hand over that approval command; without it the controller still deploys from Git and nothing has moved. Do not use sections 1–3 for it.
Build an app using ConfigHub, or attach ConfigHubComplete the already requested setup with reference sections 1–3. Explain the download in the brief action notice; do not ask again whether to use the product they chose.
Understand or preserve an earlier settingUse the history supplied by the plugin; attribute it briefly when it explains your answer. No hub needed.
Open past production settings as a new previewIn the attached app run cub env preview --from-live Friday with the weekday, date or revision the person gave. Fetch the page. In a later chat, cub env preview --status finds the running preview.
Try a preview or see a setting change before shippingIn an attached env-file Node app, use the app’s scoped session. Run cub env preview --set 'KEY=VALUE' --change-desc "WHY" with the app’s actual setting. For a preview of the current settings use cub env preview. This changes only the assigned try. Leave app files (including .env), staging and live alone. Fetch the printed URL, tell the person what it serves and leave it running after the session closes. Stop only on request. When someone returns, run cub env preview --status and fetch that address. For another runtime or a named try, see app-operations section 4.
See staging's settings, or production's approved ones, in the app itselfIn a folder /confighub:staging connected, run cub env preview --staging (or --production). It runs the app's own command, npm run dev, its start script or the Procfile's web: line, with that copy's settings as environment variables, and names it first; give another command after --. The app's files are not changed. Fetch the printed address and tell the person what it serves; leave it running. cub env preview --status finds it in a later chat, --staging --stop ends it.
Ship an attached app's changeShow the proposed values and exact revision. Submit for owner approval, then verify the delivery path and running service separately.
Make another app like this oneFor an attached source app, offer its base as a pattern; retain the new app's own settings and keep credentials private.
Let CI or another machine continue the workCheck whether it can reach the chosen hub. Prepare a scoped reader or proposer appropriate to the task. Explain any missing connectivity or access before changing the setup.
Let a colleague use the setup (zero-account sharing)Offer cub agent changes --export-md diff.md (redacted Slack/PR diff card), cub repo starter-export --out starter.yaml (1-file MIT starter), a 1-file .claude/settings.json setup PR, or copying the app to a Cloud Hub (hosted or self-hosted Helm). Never register an account or share access without the person's instruction.
Share a working app + staging services with a teammate without pasting .env in SlackUse cub env share APP --variant staging --mode test --proxy PROVIDER=ENV_VAR --max-requests 50 --server "$RELAY" --approve-wait (Tier 3 brokered ch_proxy_... token so the real upstream key never leaves the relay; or --include-test-key for Tier 2 X25519 sealed in memory) and hand the teammate cub env join "$INVITE_URL" --as NAME -- npm run dev (zero .env on disk, zero signup). Respect the 3-layer boundary: ConfigHub Core stores non-secret config only; self-hosted agentauth-server works today while hosted confighub.com relay endpoints are Provisional (see auth.md).
Show everything ConfigHub can do in this repoRun "$CONFIGHUB_PLUGIN_PROGRAM" agent card --guide (same as /confighub:help; mini card --guide alias works too) and suggest one plain-English prompt tailored to the repo.
Lock a setting so an agent cannot overwrite itRun cub agent lock KEY --reason "WHY" (--unlock KEY lifts the lock; --list or cub agent card shows active locks).
Revert recorded config changes without resetting codeRun cub agent undo --dry-run first, confirm with the person, then run cub agent undo.
Run an isolated sandbox or test command safelyRun cub env exec --mode test --connections .confighub/connections.yaml --capture -- CMD (env://, 1password://, vault://, refuses sk_live_* and prod refs before boot, and lands tuned diffs in cub inbox list --card or local handoffs).
Bootstrap zero-install agent auth on a Cloud HubRun cub agent auth --server URL when the person asks to register an ephemeral Ed25519 agent key against a server supporting /auth.md.
Package structured config or dashboards as an immutable OCI Config Bundle (K8s 1.36+)Run cub bundle init, cub bundle validate, cub bundle build --out dist/bundle.oci, and cub bundle podspec to validate config (blocking secrets), build a deterministic OCI Image Layout past etcd's 1 MiB ConfigMap cap, and emit a PSS-hardened volumes[].image PodSpec.

When the person has not chosen ConfigHub and an unattached app needs it, make one relevant offer: name the problem it would solve and the install/connect cost. Continue independent app work while waiting. An existing Git or deployment path can already meet the need. Respect a decline and the project preference supplied by the hooks. Do not keep offering a hub in the same project. An explicit later request for ConfigHub can still be fulfilled. When the person declines future hub offers for this project in other words, save that explicit preference with cub agent changes --hub-suggestions off (or the plugin program's mini changes --hub-suggestions off when cub is absent; its path is in reference section 1). Use on only when asked to resume. If the hook already confirmed the saved preference, do not save it again. A generic no to this one action is not a project preference.

A restricted proposer key can edit assigned open copies and propose for live. It cannot create new variants, new apps or access grants. Do not discover this by repeatedly retrying writes or ask for owner credentials. For a new try, prepare the proposed values and give the owner the one setup step: cub env try APP NAME, followed by rerunning their existing cub agent require-approval APP --variant live --agent AGENT command so the new open copy is assigned to that key. Use the returned session setup for later work. For another app, prepare its files with its own values, then give the owner cub repo adopt FOLDER --pattern SOURCE and the new app's restricted session setup. State clearly when the hub setup remains pending; plain files alone do not establish a pattern link. Never broaden the current key to finish.

For a second app, finish the file preparation that this workspace permits before handing over hub setup. If the sandbox cannot write beside the current app, stage the new app in a clearly named folder inside the writable workspace and give its actual location. Keep the source app unchanged; seed settings from its base, with the new app's own values, and never copy source credentials. Say when placement, adoption or a new session is still needed. Do not stop at suggested commands when the files can be prepared safely.

Make ConfigHub activity visible with compact ASCII cards

Before a meaningful ConfigHub action, give one short ConfigHub: line in visible commentary, with the action and target. Group related commands; do not announce every individual setting.

When reporting a ConfigHub result to the person—why a setting changed, running preview vs. staging vs. production status, shared defaults inherited across two apps, or a production change waiting for approval—include a compact rounded-box ASCII tree card in a fenced code block so ConfigHub's role is immediately visible at a glance:

╭─ ConfigHub · <app or topic> ──────────────────────────────╮
│ ├── preview     ● http://127.0.0.1:49210  GREETING="Warm" │
│ ├── staging     ✓ updated by agent        GREETING="Hi"   │
│ └── production  ⏳ waiting for approval   GREETING="Hi"   │
╰───────────────────────────────────────────────────────────╯

Use that same card style for setting history (file → key: old → new → asked: "...") and multi-app inheritance (shared default → app-1, app-2 (with own overrides)). Keep cards under 75 columns wide, show only the tiers this app actually uses, and keep state markers strictly consistent: ⏳ waiting = paused for a human decision (prod approval, starter upgrade, sandbox promotion, held command), ⚠ drifted = 1:1 live host mismatch, and ✓ recorded = cross-session memory. Never use internal jargon (base, Space, Unit, change order). Use that same line as the skill-use announcement; a separate technical skill-name update is unnecessary. Name the useful action the person asked for. The hooks also supply activity metadata and a reminder for recognised direct shell commands. Some clients show this metadata; Codex CLI does not consistently display it in plain text. Your commentary is the person-facing attribution. Do not repeat it after receiving the hook reminder, announce routine reads, or claim completion before the result. For scripts and MCP calls, provide the same brief attribution yourself.

Read app operations only for the operation needed: an app Argo CD or Flux already deploys, with a starter (0), setup/adoption and patterns (1–2), proposals and secrets (3), isolated tries (4). For CI readers, use the snapshot contract and working example. For hub continuation, inspect cub local copy --help and cub local connect --help for the installed version. Copying configuration does not by itself move the running service, merge histories, or prove that a hosted/team path works.

End the turn with what they gained, then one thing to do

For a local preview, use the client-specific handoff above. For other requests, write the handoff in this order:

  1. One sentence on what they have now, in their words, before any detail. For example: "Production can't change without you now; staging takes your agents' changes at once." or "Production still logs at warn: the change to info waits for your yes."
  2. At most one command for them to run, the one cub printed for them (it is short: ~/.confighub/mini/cub inbox approve APP-live, or the like). Copy it as printed; never rebuild it from the package's path or put CUB_CONFIG= before it.
  3. Stop there. Do not list a refuse, rollback, pull, receipts or waiting command beside it, or a second way to do the same thing; cub inbox approve shows the change and asks before it does anything. Name a later step in words only when the person needs it today, such as "after you approve, restart the service the way you do now".

Leave out Space names, change-order names, Unit names and file paths the person did not ask about. A table of copies or a list of what each Space holds is for when they ask. Say what a person would: "production", "staging", "the shared settings", "a change that waits for your approval"; not "change order", "Component", "Unit", "Space" or "Variant". When more than one change waits for the same copy, give the approve lines in the order cub inbox list names, the oldest first. When you copy an app to a shared hub, say that its history of changes and its delivery do not come with it.

Keep the boundaries clear