constraint-scaffold
This skill should be used when generating the Layer 1 dependency-cruiser import-boundary gate (client modules importing server secrets) into a Next.js product…
от jikig-ai★ 21 звезда на GitHub
Установить constraint-scaffold в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Grok Build (plugins/soleur/lib/harness.ts invokeSkill()): Read this SKILL.md in this process and run it to completion. A one-segment soleur:<name> in this document names a SKILL — on Grok Build, Read plugins/soleur/skills/<name>/SKILL.md in this process; it is not a nested tool_use. A multi-segment id such as soleur:<domain>:<name> names an AGENT: spawn it, never Read it, and on Grok Build spawn_subagent takes the id with its colons replaced by hyphens (agentIdToGrokSubagentType). Claude Code: Skill tool for a skill (soleur:<name>), Task tool with subagent_type for an agent. Forbidden is executing a subset, not the Read.
constraint-scaffold
Generates one deterministic, no-LLM Layer-1 structural gate into a Next.js product
codebase: a dependency-cruiser import-boundary
gate that fails closed when a "use client" module takes a value (non-type-only) import on
the server-only tree (server/**) — i.e. a server secret leaking into the browser bundle. The gate
runs in CI and rejects the violation before the LLM-judged review layer (soleur:review). See
ADR-071 (mechanism = Option D) and knowledge-base/project/plans/archive/20261013-032858-2026-06-30-feat-constraint-scaffold-l1-gate-generator-plan.md.
This gate covers this one boundary only, CI-only, Next.js-only. It catches BOTH direct
client→server-secret value imports AND transitive ones (a "use client" module reaching a
server secret through a chain of value imports, e.g. a non-client lib/ helper) — the transitive
reachable rule was added in the 2026-07-01 #5777 amendment (ADR-071 §Amendment). Naming /
contract / pre-commit / multi-stack coverage remain deferred (ADR-071 Consequences).
Agent-owns-gates recovery model (load-bearing)
The gate is fail-closed, and the target user is a non-technical founder who can never hand-edit
a .cjs config, a baseline, or a workflow. So the agent — never the founder — owns gate
maintenance and recovery:
- The agent authors and maintains the gate. The founder never touches
.dependency-cruiser.cjs,.dependency-cruiser-known-violations.json, the shared runner, or the workflow. - When the agent's own change trips the gate:
- real leak → the agent fixes the offending import;
- legitimate new cross-boundary import → the agent runs
constraint-scaffold.sh --refresh-baseline(clean-tree +origin/mainmerge-base capture, so a same-PR violation is never grandfathered); the baseline diff is PR-reviewable.
- In-code escape hatch (agent-owned, used sparingly): dependency-cruiser's native
// dependency-cruiser-disable-next-linecomment on the importing line. - Founder hotfix with no agent in the loop (the brand-survival deadlock). A GitHub-web hotfix
or a machine without the repo tooling can trip the gate with no agent present. Recovery is
automatic and zero-touch: the two-stage auto-recovery dispatcher (
fix-constraints-stage-a→fix-constraints-stage-b, ADR-074) fires on the PR, fixes the offending import, and opens a draft follow-up PR the founder can merge — no comment, no command, no agent-in-the-loop required. (A real leak the agent cannot fix is surfaced for a maintainer; auto-recovery is fix-only and never grows the suppression baseline.) The gate stays informational / non-blocking — it is NOT promoted to a required check (promotion is now blocked only on #5778; the #5791 dispatcher half is satisfied by ADR-074), so it cannot deadlock a founder hotfix. No override label, no.cjsedit, no second human required. - The founder is never required to read or unblock the gate.
Usage
Generate the gate into apps/web-platform (default mode — detect Next.js, require app/,
components/ and server/ to exist under the target, emit config + shared runner + CI workflow,
capture the initial baseline, prove the gate bites (see Bite-proof below), then write the
boundary README and the agent-instructions pointer last). Non-destructive: refuses to overwrite an
existing .cjs, runner, or workflow (there is no --force); only two artifacts are ever re-written:
the baseline JSON via --refresh-baseline, and the Stage A auto-recovery workflow via
--refresh-stage-a (below); the README block and the pointer line are
append-once (marker-keyed, never rewritten):
bash "${CLAUDE_PLUGIN_ROOT}/skills/constraint-scaffold/scripts/constraint-scaffold.sh"
Refresh the baseline after a legitimate new cross-boundary import (agent-only; clean tree required;
captures against the origin/main merge-base). Refresh mode runs the bite-proof too — it catches
config/runner drift a baseline entry can never grandfather (a rule soft
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/boundary-readme.template
- references/constraint-gates-workflow.template
- references/depcruise-config.template
- references/fix-constraints-stage-a.emitted.sha256
- references/fix-constraints-stage-a.template
- references/fix-constraints-stage-b.template
- references/shared-runner.template
- scripts/constraint-scaffold.sh
FAQ
Что делает скилл constraint-scaffold?
This skill should be used when generating the Layer 1 dependency-cruiser import-boundary gate (client modules importing server secrets) into a Next.js product codebase's CI.
Как установить скилл constraint-scaffold?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл constraint-scaffold запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…