Best for
- A branch is ready to push, open a PR, or hand back to Build Studio.
- The work touched TypeScript, UI, migrations, skills, or workflow behavior.
- Concurrent local development means a clean worktree test is not enough.
OpenDigitalProductFactory/opendigitalproductfactory/packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push/SKILL.md
Use in the DPF codebase before pushing or opening a PR when a branch needs local merged-code verification. Merges against current main in an isolated path, runs the required gates, records the result, and blocks red pushes.
Decision brief
Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/OpenDigitalProductFactory/opendigitalproductfactory --skill "packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push"Inspect the Agent Skill "dpf-local-merge-ci-before-push" from https://github.com/OpenDigitalProductFactory/opendigitalproductfactory/blob/82c0d248d6bdaf0ea83dfdbdd785c771ffa0acaa/packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push/SKILL.md at commit 82c0d248d6bdaf0ea83dfdbdd785c771ffa0acaa. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
The thread worktree is source-control isolation, not a runtime. The "isolated merge path" below is a merge workspace (clean checkout of origin/main + branch tip in a scratch directory so the merge result is reproducible) — it is NOT a second full DPF runtime stood up inside the…
A branch is ready to push, open a PR, or hand back to Build Studio.
kernel/principles/build-gate-mandatory
0. Front door: pnpm run pregate. It does this whole skill mechanically — pushes the branch, claims the local-integration-ci lease, runs the checked-in non-mutating runner (scripts/local-ci-runner.sh → the local-integration plan in a dedicated scratch worktree; DPFLOCALCICOMMAND…
pregate first waits for admission to the shared local-integration-ci lease. While it waits it prints local-CI admission queued at position N. A run that never gets admitted can still terminate with exit code 0, so the exit status alone does not distinguish "gate passed" from "ga…
Permission review
The documentation asks the agent to run terminal commands or scripts.
Run the local integration CI script or its current equivalent in an isolated merge path.The documentation asks the agent to run terminal commands or scripts.
node scripts/gate-worktree.mjs --owner-provider claude --owner-session-id "$CLAUDE_CODE_SESSION_ID"Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 13 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.
The thread worktree is source-control isolation, not a runtime. The "isolated merge path" below is a merge workspace (clean checkout of origin/main + branch tip in a scratch directory so the merge result is reproducible) — it is NOT a second full DPF runtime stood up inside the worktree.
Run this skill's gates per AGENTS.md §5 "Where each gate runs":
tsc --noEmit, targeted unit specs, lint.If a gate cannot run in the worktree because pnpm/corepack is missing, workspace links point outside the worktree, the Prisma client wasn't generated there, or Next rejects symlinked node_modules — classify as harness limitation, not gate failure (worktree-is-source-control-not-runtime). Route the gate to the shared local-CI convergence sandbox via claim_nonprod_environment_lease(environmentKey="local-integration-ci") — one shared runtime that all worktrees lease sequentially — and capture that run's evidence in the PR. Per-worktree runnable runtimes don't scale at DPF's expected 1k–10k concurrent worktrees; the sandbox is the only tenable verification substrate.
kernel/principles/build-gate-mandatorykernel/principles/all-changes-land-via-prpnpm run pregate. It does this whole skill mechanically — pushes the branch, claims the local-integration-ci lease, runs the checked-in non-mutating runner (scripts/local-ci-runner.sh → the local-integration plan in a dedicated scratch worktree; DPF_LOCAL_CI_COMMAND overrides), records the MCP evidence, releases the lease, and writes the gate record the default-on pre-push hook checks. Only fall through to the manual steps below when pregate itself cannot run.main and is not detached.origin/main.pnpm-lock.yaml — node scripts/sandbox-freshness-preflight.mjs --converge (already part of the local-integration plan). Exit 3/4 means SANDBOX DRIFT / NOT READY: the sandbox is stale, the run is NOT product evidence, and the only repair is the preflight's own single governed pnpm install --frozen-lockfile convergence — never a manual or per-worktree install.passed, failed, conflict, or blocked_sandbox_drift (stale sandbox; carries the freshness verdict and resolved next/react/react-dom versions in evidence).pregate first waits for admission to the shared local-integration-ci lease. While it waits it prints local-CI admission queued at position N. A run that never gets admitted can still terminate with exit code 0, so the exit status alone does not distinguish "gate passed" from "gate never ran".
Confirm a real pass by the artifacts, not the exit code:
gate passed..git/worktrees/<name>/dpf-local-ci-metadata.json (path is echoed as [local-integration-ci] metadata …), and in that record candidateSha is the commit you are about to push and baseSha is the origin/main it merged against. Also check evidencePlan.evidenceTier / fullSuite describe the coverage you expected.grep -v "admission queued" — if nothing but queue polling remains, nothing ran.Then push normally: with a valid record for the head SHA the pre-push hook admits the push, and DPF_SKIP_PREPUSH_GATE is not needed.
pregate in timeout. Killing it mid-queue is what produces the false green above. Run it unbounded (background it and wait for completion).DPF_SKIP_PREPUSH_GATE is for a verified-clean push the gate structurally cannot cover, and it is recorded either way.The gate records WHICH CLIENT and WHICH CLIENT THREAD ran it. It does not
default the provider — it used to default to codex, so every client of every
kind was recorded as Codex — and it does not derive the session from a pid,
which changed on every invocation and made one thread look like many
contributors.
Identity is detected from the calling client's own environment where possible. When it cannot be, pass it:
node scripts/gate-worktree.mjs --owner-provider claude --owner-session-id "$CLAUDE_CODE_SESSION_ID"
or set DPF_GATE_OWNER_PROVIDER / DPF_GATE_OWNER_SESSION_ID. An unresolvable
provider stops the run at the admission boundary, because the lease and the
evidence record share a closed vocabulary (build-studio | claude | codex | grok | antigravity | coworker) with no honest fallback. --dry-run needs no
identity and prints what it resolved, so it answers "will this be attributable,
and to whom?" before a lease is taken. An unresolvable thread does not stop
the run; it records unattributed-<pid> so the gap is visible rather than
invented.
Keep the PR body clean. The Local-CI-Evidence: / Local-CI-Override:
trailers are a fallback a normally-gated branch does not need, so do not paste
lease ids, evidence record ids, candidate/base SHAs, session ids, or worktree
paths into a PR — it is public and none of it is contract. One non-identifying
verification line is enough. The detail stays queryable on the install, keyed off
the number a human actually uses:
pnpm pr:origin 3748
That resolves the PR to every commit it contains and matches those against this install's own gate records — by SHA, not branch, because branch names are reused across threads and deleted on merge while commits are permanent. A PR this install never gated reports no origin rather than a guess, which is the correct answer for an outside contribution.
gate passed plus a metadata record whose candidateSha matches your commit.blocked_sandbox_drift and converge first.dpf project.A feature branch passes focused Vitest tests but origin/main changed Build Studio actions. This skill runs the merge gate, catches the conflict before push, records "Merged-code gate failed: conflict with origin/main", and leaves the branch local until the conflict is resolved.
Frequently asked questions
Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.
The source record exposes this install command: npx skills add https://github.com/OpenDigitalProductFactory/opendigitalproductfactory --skill "packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push". Inspect the command and pinned source before running it.
Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.
Alternatives
garrytan/gbrain
End-to-end discipline for turning any large data source (audio libraries, email takeouts, document corpora, chat exports, API dumps) into brain pages at scale. The lifecycle spine: SCHEMA → ACCESS → TRIAL → EVALUATE → IMPROVE → CODIFY → TEST → SKILLIFY → BULK → MONITOR. State is tracked in a durable JSON manifest (see MANIFEST-PATTERN.md) so any crash, session boundary, or subagent fan-out resumes from ground truth instead of memory.
alirezarezvani/claude-skills
App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store. Use when the user asks about ASO, app store rankings, app metadata, app titles and descriptions, app store listings, app visibility, or mobile app marketing on iOS or Android. Supports keyword research and scoring, competitor keyword analysis, metadata optimization, A/B test planning, launch checklist
dotnet/skills
Migrates .NET test projects from VSTest to Microsoft.Testing.Platform (MTP). Use when user asks to "migrate to MTP", "switch from VSTest", "enable Microsoft.Testing.Platform", "use MTP runner", set OutputType=Exe only for test projects in Directory.Build.props, or mentions EnableMSTestRunner, EnableNUnitRunner, or UseMicrosoftTestingPlatformRunner. USE FOR: MTP behavioral differences vs VSTest (exit code 8, zero tests discovered, --ignore-exit-code, TESTINGPLATFORM_EXITCODE_IGNORE); centralizing
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre