Source profileQuality 94/100Review permissions

OpenDigitalProductFactory/opendigitalproductfactory/packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push/SKILL.md

dpf-local-merge-ci-before-push

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.

Source repository stars
13
Declared platforms
0
Static risk flags
1
Last source update
2026-08-25
Source checked
2026-08-25

Decision brief

What it does: where it fits

Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.

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.

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/OpenDigitalProductFactory/opendigitalproductfactory --skill "packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push"
Safe inspection promptEditorial

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

What the source asks the agent to do

  1. 01

    Worktree vs. runtime — where "local" actually means

    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…

    Canonical local install (root clone, port 3000, shared dev DB, already-running portal/MCP stack) — runtime-bound gates: portal build, UX, MCP-touching tests, migration smoke.Thread worktree directly — cheap source-local checks: tsc --noEmit, targeted unit specs, lint.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…
  2. 02

    When to use

    A branch is ready to push, open a PR, or hand back to Build Studio.

    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.
  3. 03

    Enforces

    kernel/principles/build-gate-mandatory

    kernel/principles/build-gate-mandatorykernel/principles/all-changes-land-via-pr- kernel/principles/build-gate-mandatory - kernel/principles/all-changes-land-via-pr
  4. 04

    Steps

    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…

    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…Confirm the branch is not main and is not detached.Fetch current origin/main.
  5. 05

    Reading a pregate result — a queued run can exit 0

    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…

    The run ends with the literal line gate passed.It wrote .git/worktrees//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 aga…Sanity-check the log actually contains gate work. grep -v "admission queued" — if nothing but queue polling remains, nothing ran.

Permission review

Static risk signals and limitations

Runs scripts

medium · line 33

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.

Runs scripts

medium · line 67

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

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score94/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars13SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
OpenDigitalProductFactory/opendigitalproductfactory
Skill path
packages/dpf-skill-pack/skills/dpf-local-merge-ci-before-push/SKILL.md
Commit
82c0d248d6bdaf0ea83dfdbdd785c771ffa0acaa
License
Apache-2.0
Collected
2026-08-25
Default branch
main
View the original SKILL.md

DPF Local Merge CI Before Push

Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.

Worktree vs. runtime — where "local" actually means

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":

  • Canonical local install (root clone, port 3000, shared dev DB, already-running portal/MCP stack) — runtime-bound gates: portal build, UX, MCP-touching tests, migration smoke.
  • Thread worktree directly — cheap source-local checks: 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_modulesclassify 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.

When to use

  • 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.

Enforces

  • kernel/principles/build-gate-mandatory
  • kernel/principles/all-changes-land-via-pr

Steps

  1. 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; 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.
  2. Confirm the branch is not main and is not detached.
  3. Fetch current origin/main.
  4. Run the local integration CI script or its current equivalent in an isolated merge path.
  5. Step-zero freshness gate (BI-ECDF9520): after the merge and before any test/build, the sandbox must prove its installed dependency graph matches the merged pnpm-lock.yamlnode 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.
  6. Run the affected unit tests, typecheck, build, UX, and migration gates required by the changed files.
  7. Record the local integration result through MCP — passed, failed, conflict, or blocked_sandbox_drift (stale sandbox; carries the freshness verdict and resolved next/react/react-dom versions in evidence).
  8. Push only when the merged-code gate is green. If it is red, report the failure and next fix; if it is blocked on sandbox drift, converge and re-run — do not report a product failure.

Reading a pregate result — a queued run can exit 0

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:

  1. The run ends with the literal line gate passed.
  2. It wrote .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.
  3. Sanity-check the log actually contains gate work. 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.

  • Never wrap pregate in timeout. Killing it mid-queue is what produces the false green above. Run it unbounded (background it and wait for completion).
  • Queue contention is not a reason to override the gate. Waiting is correct; DPF_SKIP_PREPUSH_GATE is for a verified-clean push the gate structurally cannot cover, and it is recorded either way.
  • Cancelling a pregate can leave a stale queued lease pinned to the old SHA — release it before re-running, or the next run queues behind your own abandoned entry.

Who the gate records, and keeping it out of the PR

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.

Guardrails

  • Do not treat "passed in my worktree" as merge readiness.
  • Do not treat a pregate exit code as the verdict. The verdict is gate passed plus a metadata record whose candidateSha matches your commit.
  • A stale sandbox is not a product failure. Never record a red build as product evidence while the freshness preflight is red or unrun — classify it blocked_sandbox_drift and converge first.
  • Never start a second dependency install while one is running, and never "fix" a stale sandbox by installing dependencies inside a topic worktree.
  • Do not run destructive Compose cleanup against the root dpf project.
  • Do not push or open a PR while the local integration gate is red unless the operator explicitly reclassifies the branch as a blocked handoff.
  • A gate that did not run is an unrun gate, not a red gate; re-run it against the canonical install and record the result there.
  • Do not invest the current thread in making the worktree a full DPF runtime to satisfy this gate. Runtime-bound verification routes through the shared local-CI convergence sandbox via lease — per-worktree runtimes are deliberately rejected at scale.

Worked example

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

What to verify before installation and use

What does the dpf-local-merge-ci-before-push source document cover?

Run a local merged-code gate before pushing work that Build Studio or reviewers might treat as ready.

How do I install dpf-local-merge-ci-before-push?

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.

Which permission-related actions were detected?

Static rules flagged exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 10029,034

garrytan/gbrain

bulk-ingestion

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.

Computed 10024,921

alirezarezvani/claude-skills

app-store-optimization

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

Computed 1005,241

dotnet/skills

migrate-vstest-to-mtp

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

Computed 100147

oaustegard/claude-skills

featuring

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