{"slug":"commit-13","title":"commit","summary":"Create a git commit for this repo ONLY after the full quality gate passes — format, lint, typecheck, tests, and build for everything the change touches (plus container integration tests when DB/queue code changed and Docker is up), and docs updated to match. Use whenever the user","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-11-16T17:51:07.464383Z","repo":{"url":"https://github.com/skein-js/skein-js","stars":23,"forks":4,"license":"Apache-2.0","updatedAt":"2026-11-16T16:02:52Z"},"bodyHtml":"<hr>\n<h2>name: commit\ndescription: Create a git commit for this repo ONLY after the full quality gate passes — format, lint, typecheck, tests, and build for everything the change touches (plus container integration tests when DB/queue code changed and Docker is up), and docs updated to match. Use whenever the user asks to commit, or before pushing/opening a PR. Enforces AGENTS.md golden rule 4 (\"green before commit — never commit red\").</h2>\n<h1>/commit — gated commit</h1>\n<p>Never commit red. Run the gate below, fix anything that fails, re-run until green, <strong>then</strong> commit.\nThis is the enforcement of <a href=\"../../../AGENTS.md\">AGENTS.md</a> golden rule 4 and mirrors CI\n(<code>.github/workflows</code>), so a passing <code>/commit</code> should mean a passing CI.</p>\n<p>A pre-commit hook (<a href=\"../../../.githooks/pre-commit\"><code>.githooks/pre-commit</code></a>, wired by <code>pnpm install</code>)\nalready runs the <em>affected</em> subset (format + lint + typecheck + test) on every <code>git commit</code> as a\nmechanical backstop. This skill runs the fuller <strong>superset</strong> — all projects, plus build and the\nDocker-backed integration tests — and handles the docs check and commit message. Run it for anything\nnon-trivial rather than leaning on the hook alone; never <code>--no-verify</code> past a real failure.</p>\n<h2>1. Establish scope</h2>\n<ul>\n<li><code>git status --porcelain</code> and <code>git diff HEAD</code> — see everything changed (staged + unstaged).</li>\n<li>If nothing is changed, stop and say so.</li>\n<li>Note which packages/areas changed (drives the docs + integration-test decisions below).</li>\n</ul>\n<h2>2. Docs must match the change</h2>\n<p>If the change alters <strong>behavior, architecture, the CLI surface, <code>langgraph.json</code> handling, storage,\nor the public API of any package</strong>, the docs must already reflect it. Check the relevant ones:</p>\n<ul>\n<li><code>docs/*</code> (e.g. <code>langgraph-cli-compat.md</code>, <code>storage.md</code>, <code>runs-and-redis.md</code>, <code>agent-protocol.md</code>),</li>\n<li>the changed package's <code>README.md</code>, and the root <code>README.md</code>,</li>\n<li><code>AGENTS.md</code> / the package map if you added or reshaped a package.</li>\n</ul>\n<p>If a doc is stale, update it as part of this commit. If you're unsure whether a doc needs updating,\nask the user rather than committing a docs gap. Pure internal refactors with no observable change\nneed no doc update — say so explicitly.</p>\n<h2>3. Run the gate (fix + re-run until all green)</h2>\n<p>Mirror CI exactly (<a href=\"../../../.github/workflows/ci.yml\"><code>.github/workflows/ci.yml</code></a>) so a passing\n<code>/commit</code> means a passing CI. Drive everything through Nx (never bare <code>eslint</code>/<code>vitest</code>), from the\nrepo root:</p>\n<pre><code>pnpm format              # auto-fix formatting first (nx format:write)…\npnpm format:check        # …then verify clean\nCI=true pnpm exec nx run-many -t lint typecheck test build --exclude='examples/*' --output-style=stream\n</code></pre>\n<p>Set <strong><code>CI=true</code></strong> — without it, Vitest starts in watch mode locally (non-CI TTY heuristics) and the\n<code>test</code> targets hang forever instead of running once and exiting. <code>CI=true</code> forces run-once, matching\nCI. If you background the gate, poll its log for <code>NX   Successfully ran</code> / <code>Failed tasks:</code>.</p>\n<p>CI runs <code>run-many</code> over every project, so use <code>run-many</code> here too (not <code>affected</code>) — it's the\nauthoritative gate. <strong>Exclude <code>examples/*</code> locally</strong>: examples depend on live services / local <code>.env</code>\nfiles (e.g. <code>examples/chat-app/.env</code> sets <code>GOOGLE_API_KEY</code>, so its live-Gemini test <em>runs</em> locally and\nfails on the network, whereas CI has no <code>.env</code> and skips it). CI is the backstop for examples — it runs\nthem in a clean env where the key-gated tests self-skip. If your change touches an example, run that\nexample's target directly too (<code>nx test example-&lt;name&gt;</code>, <code>nx build example-&lt;name&gt;</code>). For a quick\ninner-loop pre-check you may first run <code>pnpm affected</code>, but the <code>run-many</code> above is what must pass.</p>\n<p>SQLite real-file, reopen, and subprocess-crash cases belong to the ordinary <code>storage-sqlite</code> and\n<code>local</code> test targets, included in the gate above; Docker is not required for those cases. Changes to\nnative packaging also need the relevant packed-consumer/desktop Nx targets and platform CI proof.</p>\n<p><strong>Container integration tests</strong> (CI's second job — Testcontainers spinning up Postgres/Redis). If\nDocker is running, run them; they are required when the change touches <code>packages/storage-postgres</code>,\n<code>packages/redis</code>, <code>packages/runtime</code>, or any <code>*.integration.test.ts</code>:</p>\n<pre><code>docker info &gt;/dev/null 2&gt;&amp;1 &amp;&amp; CI=true pnpm exec nx run-many -t test-integration --output-style=stream\n</code></pre>\n<p>If Docker is <strong>not</strong> available, do not silently skip: tell the user integration tests were not run\nand let them decide whether to proceed.</p>\n<p>Do not continue to step 4 until every command above exits 0. If something fails, fix it (or, if the\nfailure is genuinely pre-existing and out of scope, surface it to the user) and re-run the whole gate.</p>\n<h2>4. Commit</h2>\n<ul>\n<li>Stage the intended files (<code>git add …</code> the files this change owns — don't sweep in unrelated edits).</li>\n<li>Write a <a href=\"https://www.conventionalcommits.org\">Conventional Commit</a>: <code>type(scope): summary</code>, e.g.\n<code>feat(cli): import langgraph dev state</code>, <code>fix(storage-postgres): skip orphan runs on restore</code>.\nKeep the subject imperative and ≤72 chars; add a body when the \"why\" isn't obvious from the diff.</li>\n<li>Commit <strong>directly on the current branch</strong> (this repo commits on <code>main</code> by default; only branch\nfirst if the user asked for a PR/branch).</li>\n<li>Do <strong>not</strong> push or open a PR unless the user asked.</li>\n</ul>\n<h2>5. Report</h2>\n<p>State the commit hash + subject, and exactly which gate commands ran (and whether integration tests\nran or were skipped for lack of Docker). If you updated docs, say which.</p>\n","files":[{"path":"SKILL.md","sizeBytes":5510,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"notes-only","suspicious":0,"notes":6,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-11-16T17:52:28.458724Z","sha256":"2B25A854838CB42A19B94EB3D3D8B0F5CDED133615021E02EEE5D55F1899FD44","sizeBytes":2782},"review":null,"source":{"repositoryUrl":"https://github.com/skein-js/skein-js","path":".agents/skills/commit","license":"Apache-2.0","commit":"c5c0080cef7dfeb2c3b8a5d58301b20dbfae8f7e","subtreeSha":"C7FC5790477B9FAAAE479DC530005CD05950402E385120D95705E1F35C37C607","lastSyncedAt":"2026-11-16T17:51:06.549244Z"},"reviewedAt":"2026-11-16T17:56:14.852284Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/skein-js/skein-js/tree/main/.agents/skills/commit"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install skein-js-skein-js@llmmart"},{"target":"git","command":"git clone https://github.com/skein-js/skein-js.git"}]}