Use this skill when designing, reviewing, or generating CSS spacing rules. Apply it whenever the user asks whether spacing should use gap, margin, or structural empty space, wants to avoid margin-based layout spacing, or needs rules for container-owned spacing in grid or flex layouts.
Ships in kf-global. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
この skill は、間隔の責務を子要素ではなくコンテナ側へ戻し、規則的な間隔は gap、構造的な空白は空のグリッドセル、margin は例外に限定するためのものです。
grid-template の書き方や空セルの表記ルールは ../kf-g-css-flex-grid/SKILL.md を優先し、この skill では間隔責務の分離に絞って扱います。
gap と margin のどちらを使うか決めるときmargin で積んでよいか見直すときgap、空セル、margin のどれで表現するか決めるときmargin-block-start や margin-inline-start が混ざっていないか確認するときgapgap を使う。grid と flex の子要素間隔を、兄弟要素同士の margin で表現しない。display: grid と gap を優先する。margin-block-start や margin-inline-start に持たせない。.stack {
display: grid;
gap: 0.75rem;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
gap ではなく grid-template 上の空セルで表現する。.hero {
display: grid;
grid-template:
"... title" auto
"media body " auto
/ 4rem 1fr;
}
margin は補足的に扱うmargin は内部レイアウトの主手段にしない。margin を使ってよいのは、コンテナ外との関係を作る場面か、既存構造を変えられず gap を持つコンテナを用意できない例外に限る。margin で管理しない。margin でごまかさない。margin を使うなら責務を限定するmargin を残す場合は、なぜ gap や空セルではなく margin なのかを説明できる状態にする。margin で作ったズレを空セルへ戻す/* before */
.hero-title {
margin-inline-start: 4rem;
}
/* after */
.hero {
display: grid;
grid-template:
"... title" auto
"media body " auto
/ 4rem 1fr;
}
margin で作っていないか。margin や padding でごまかしていないか。gap と child margin を混在させて、二重の間隔になっていないか。margin を残す理由が、外部関係か構造制約として説明できるか。gap、空セル、margin のどれで扱うべきかを明示する。gap に戻すべきかを短く説明する。margin ではなく空セルで表すべきかを説明する。margin を許容する場合は、例外であることと、その理由を明示する。gap で表現できているか。margin を内部レイアウトの主手段にしていないか。margin を残す場合、その理由が外部関係か構造制約として説明できるか。What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
/kf-global:kf-g-css-spacing-gap-margin-rulesfrom kf-global
npx claudepluginhub melumuccu/ai --plugin kf-global35 skills in this plugin
/kf-g-agent-git-managed-workflowUse this skill when changing any git-managed files in a repository. Always apply it before creating issues, dedicated worktrees, commits, or pull requests for such changes; covers issue-first planning, worktree path and branch naming, atomic commits, push, PR creation, presenting the PR URL to the user, and stopping on hook failures without --no-verify.
/kf-g-agent-planning-design-as-finalUse this skill whenever creating or revising planning documents, design docs, issue/PR planning HTML, or any equivalent design text. Rewrite the published text as one complete final design, as if it had been planned that way from the start, for a reader with no prior conversation./kf-g-agent-research-report-only-unless-approvedUse this skill whenever the user asks to research, compare, review, evaluate, explain, recommend, or select something and the request does not clearly ask for file edits. In these cases, report findings only and do not modify documents, source code, dependencies, generated files, or git state until the user explicitly approves applying changes./kf-g-agent-review-adversarial-after-primary-responseUse this skill after finishing design or implementation and after giving the user the primary response. Always apply it then to run adversarial evaluation, and implementation verification or two-stage review as specified, so findings can be used for self-improvement./kf-g-agent-review-adversarial-evaluationUse this skill when the user asks for advice, review, critique, evaluation, feedback, or a second opinion on a design, plan, proposal, document, approach, or similar artifact. Do not use after finishing design or implementation and after the primary user response (use kf-g-agent-review-adversarial-after-primary-response), for post-implementation two-stage programming reviews (use kf-g-agent-review-post-implementation-two-stage), or as the edit-approval gate (use kf-g-agent-research-report-only-unless-approved)./kf-g-agent-review-post-implementation-two-stageUse this skill for programming design and implementation reviews after completion and after giving the user the primary response, including code, configuration, tests, and CI/CD changes. Start with a diff-first review, then resume the same reviewer for plan alignment; route documentation-only, business-planning, general-research, and nontechnical work through the appropriate single-stage review process.