Skip to main content

shade-imports

Import Shade from layer-specific subpaths (primitives, components, patterns, page-templates, utils), never the root barrel. Trigger when editing TSX/TS in Shade-consuming apps.

소스 정보

저장소
TryGhost/Ghost
최근 소스 활동
2026년 8월 5일 14:15
감지된 SKILL.md 언어
영어
스타
55,544
포크
11,995

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
Shade imports
description
Import Shade from layer-specific subpaths (primitives, components, patterns, page-templates, utils), never the root barrel. Trigger when editing TSX/TS in Shade-consuming apps.
autoTrigger
[{"fileEdit":"apps/{shade,admin,admin-x-framework,activitypub}/**/*.{ts,tsx}"}]
# Shade imports Always import Shade from its **layer-specific subpath**. Never from the root barrel `@tryghost/shade`. ## Correct ```ts import {Stack, Inline, Box, Grid, Container, Text} from '@tryghost/shade/primitives'; import {Button, Input, Dialog} from '@tryghost/shade/components'; import {PageHeader, KpiCard, Filters} from '@tryghost/shade/patterns'; import {ListPage} from '@tryghost/shade/page-templates'; import {cn, formatNumber} from '@tryghost/shade/utils'; import {ShadeApp} from '@tryghost/shade/app'; ``` **Note:** `ListPage` is in `@tryghost/shade/page-templates`, not `/patterns`. Page templates are top-level page wrappers; patterns are the building blocks they compose. ## Incorrect ```ts // BAD — root barrel import {Button, Stack} from '@tryghost/shade'; // BAD — deep path into source import {Button} from '@tryghost/shade/src/components/ui/button'; ``` ## Inside Shade itself When editing files under `apps/shade/src/**`, use the `@/` alias for cross-file imports: ```ts import {cn} from '@/lib/utils'; import {inputSurface} from '@/components/ui/input-surface'; ``` ## Why Subpath imports make the layer (primitive/component/pattern) visible at the call site, which is the first piece of information a reader needs. The root barrel hides that and encourages cross-layer drift.
GitHub에서 보기