Communitygithub.com

brainzcode/premium-landing

제공된 참조(스크린샷, PDF 페이지, 목업, 실제 URL)의 디자인을 눈대중 대신 수치로 측정하여 정확하게 재구성합니다. 디자인을 '정확히', '1:1로', '실수 없이' 복제하라는 요청을 받았을 때, 또는 빌드가 참조에서 벗어났을 때 사용합니다.

premium-landing란 무엇인가요?

이 스킬은 디자인을 '눈으로 대충' 맞추는 대신 '수치로 측정'하여 정확히 재현하는 방법을 제공합니다. 눈은 '뭔가 어긋나 있다'는 것은 잘 감지하지만 '얼마나 어긋났는지'는 정확히 알지 못하기 때문에, 측정 기반 접근법이 필수적입니다. 주요 기능으로는 패딩이 포함된 스크린샷에서 실제 콘텐츠 영역 추출(letterbox, device-frame 제거), 요소 위치를 백분율로 계산, object-fit 기반 이미지 프레이밍 해결, 수치 기반 검증을 통한 환상(거짓 특징) 배제, 데스크탑과 모바일 뷰포트 모두 지원, 그리고 측정값이 물리적으로 불가능할 때(예: object-position이 0-1 범위를 벗어날 때) 정직하게 '매칭 불가'를 알리는 기능을 포함합니다. 최종적으로 동일한 측정 스크립트로 렌더링 결과를 다시 측정하여 숫자로 비교하는 폐쇄 루프를 강조합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/brainzcode/premium-landing/tree/HEAD/plugins/premium-landing/skills/reference-replication

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

참조 복제 (Reference replication)

눈은 '뭔가 이상하다'는 것은 잘 알아채지만 '얼마나 이상한지'는 부정확합니다. 작업 지시가 *"정확히 복제하라, 실수 없이"*라면, 측정하세요. 값을 미세 조정하느라 매시간 허비하는 것은 측정 스크립트 하나로 끝날 일이었습니다.

스크린샷의 경계를 절대 신뢰하지 마세요

스크린샷은 레터박스, 기기 프레임, 또는 둥근 브라우저 창과 함께 제공됩니다. 파일의 전체 크기를 기준으로 측정하면 모든 백분율이 약간씩 틀어지며, 그 오차는 모든 것이 거의 맞아 보이기 때문에 눈에 띄지 않습니다.

먼저 실제 콘텐츠 영역을 찾으세요:

from PIL import Image
import numpy as np
a = np.array(Image.open(src).convert('RGB')).astype(int).sum(axis=2)/3
rows = np.nonzero(a[:, 5] > 200)[0]                    # 페이지 배경색인 열
cols = np.nonzero(a[rows.min()+40, :] > 200)[0]
X0, X1, Y0, Y1 = cols.min(), cols.max(), rows.min(), rows.max()

이후의 모든 측정값은 파일 전체가 아닌 이 박스의 백분율로 표현하세요.

위치를 추정하지 말고 추출하세요

def bbox(x0, x1, y0, y1, lo, hi):
    reg = a[y0:y1, x0:x1]
    ys, xs = np.nonzero((reg >= lo) & (reg <= hi))
    return x0+xs.min(), x0+xs.max(), y0+ys.min(), y0+ys.max()

각 요소를 윈도우로 잡고 명도 대역으로 임계값을 설정하세요 — 밝은 배경 위의 어두운 UI, 또는 그 반대. 두 가지 주의사항이 있습니다:

  • 측정 결과가 정확히 윈도우 경계에 걸리는 경우, 이는 실제 측정값이 아니라 잘린 측정입니다. 윈도우를 넓히고 다시 측정하세요.
  • 어두운 텍스트와 어두운 사진 모두 '어두움' 임계값을 통과합니다. 요소만 포함하는 윈도우를 선택하세요.

이를 콘텐츠 박스의 백분율로 변환하고 그 값으로 빌드하세요. 이제 "헤드라인이 너무 크다"는 "참조에서 헤드라인이 패널 너비의 22.4%인데 내 것은 32%이다"가 됩니다.

주장을 구현하기 전에 검증하세요

커밋하기 전에 특징을 두 번 확인하세요. 한 빌드에서 썸네일에서 두 개의 수직 실선이 '보여서' 구현했지만, 참조에는 없었습니다 — 그것은 피사체의 실루엣 가장자리였습니다. 한 번 확인으로 막을 수 있었습니다:

band = a[60:330, :].mean(axis=0)          # 다른 UI가 없는 행
dips = [i for i in range(200, W-200) if band[i] < 228 - 0.8]

평평한 배경, 딥(dip) 없음, 선 없음. 1px 선은 고립된 단일 열 딥으로 나타나고, 사진 가장자리는 점진적인 램프로 나타납니다. 수치로는 구별하기 쉽지만 눈으로는 혼동하기 쉽습니다.

이미지 프레이밍을 해결하세요, 조정하지 말고

사진이 어떻게 잘렸는지 재현하려면 유도해내세요. 피사체의 너비를 사진 너비의 분수로 측정하고, 패널 너비의 분수로도 측정하세요:

renderScale = subjectWidth_inPanel / subjectWidth_inPhoto   # 예: 1.231

object-fit: cover가 높이를 기준으로 스케일링되면, scaledW = panelW × renderScale이므로 panelAspect = 1 / (renderScale / photoAspect)입니다. 이는 디자이너가 사용한 패널 비율을 제공합니다. 그런 다음 피사체의 중심에서 object-position을 해결하세요 — 공식은 ../landing-page/references/traps.md에 있습니다.

측정하지 않은 독립적인 양(예: 피사체의 정수리 높이)으로 sanity-check를 수행하세요. 예측이 1~2픽셀 이내로 들어오면 모델이 옳은 것입니다.

참조를 일치시킬 수 없는 경우를 인식하세요

때로는 수학적으로 불가능합니다. 필요한 object-position이 0-1 범위를 벗어나면, 피사체를 그 위치에 배치할 수 있는 값이 없습니다 — 패널 비율이나 이미지가 변경되어야 합니다.

그리고 제공된 에셋이 원본이 아닌 재생성본인 경우, 비율이 다릅니다. 이를 감지하세요: 소스에서 측정값을 예측하고 비교하세요. 네 개의 샘플에서 픽셀 단위로 일치하면 동일한 이미지입니다. 불균일한 불일치(한 지점에서만 203px인데 282px이 예측됨)는 다른 피사체를 의미합니다.

솔직하게 말하고, 무엇이 일치하는지 — 레이아웃 메트릭, 프레이밍, 배치 — 명시하고 나머지는 추적을 중단하세요. 계속해서 '수정'하려고 하면 더 나쁜 결과를 내고 사용자의 시간을 낭비합니다.

항상 두 뷰포트 모두

참조는 데스크탑 스크린샷과 모바일 스크린샷입니다. 데스크탑만 빌드하고 모바일을 추론하는 것은 어려운 부분을 뒤집는 것입니다 — 모바일에서 수정 작업이 집중됩니다. 하나만 제공된 경우, 시작하기 전에 다른 하나를 요청하세요.

작업 루프

  1. 콘텐츠 박스를 추출하고; 모든 요소를 백분율 테이블로 측정합니다.
  2. 그 숫자에 맞게 토큰과 레이아웃을 빌드합니다.
  3. 참조의 종횡비로 렌더링하고, 참조를 너비에 맞게 스케일링한 후 밝은 구분선과 함께 세로로 쌓습니다 (stacked). 나란히 보는 것보다 세로로 쌓는 것이 좋습니다 — 눈이 한 수직 가장자리를 추적합니다.
  4. 동일한 스크립트로 렌더링을 다시 측정합니다. 인상이 아닌 테이블을 비교하세요.
  5. 섹션별로 반복합니다. 눈에 띄게 잘못된 섹션은 넘어가지 마세요.

체크리스트

  • 콘텐츠 박스 추출됨; 백분율은 파일이 아닌 이 박스를 기준으로 함
  • 검색 윈도우 경계에 걸리는 측정값 없음
  • 모든 '특징'이 구현 전에 수치로 확인됨
  • 이미지 프레이밍이 조정되지 않고 해결됨
  • 데스크탑 및 모바일 참조 확보
  • 동일한 스크립트로 렌더링을 다시 측정하여 숫자로 비교

Individual skills in this repo

This repo contains 7 individual skills — each has its own dedicated page.

brainzcode/premium-landing

Add a studio or agency build credit to a website footer — "Site by <Studio>" linking to the studio's site. Use when finishing or shipping a site, adding a footer, or when asked for an agency credit, build credit, designed-by line, or attribution. Covers wording, placement opposite the client's copyright, markup for each stack, styling from the host site's tokens, and the sitewide-footer-link SEO footprint when the same credit runs across many client sites.

brainzcode/premium-landing

Build a complete premium landing page, either replicated from a reference screenshot/URL or designed from a written brief, in HTML, React, Next.js or Astro. Use when asked to build, design, replicate or clone a landing page, marketing page, or one-page site; when handed a design screenshot or Figma/Pinterest reference to turn into code; or when a landing page needs a full premium pass. Covers design tokens, section patterns, the layout traps that silently break grids and marquees, and screenshot-based responsive verification from 320px to 1920px.

brainzcode/premium-landing

Add Lenis smooth scrolling to a site correctly — setup, anchor offsets for sticky headers, scroll locking for modals and menus, reduced-motion handling. Use when asked for smooth scroll, Lenis, momentum/eased scrolling, or when smooth scroll broke a sticky header, a modal lock, or anchor links. Includes the sticky-position trap that only appears at non-zero scroll.

brainzcode/premium-landing

Build true Apple-style liquid glass in the browser — real refraction via SVG displacement maps, chromatic dispersion, specular edges. Use when asked for liquid glass, glassmorphism, frosted/glass cards, glass navbars, or when a blur-based "glass" effect looks flat. Includes the performance trap that makes backdrop-filter stutter on scroll and the contrast trap that makes text unreadable on glass.

brainzcode/premium-landing

Build a premium mobile nav — a hamburger button that morphs into a close X, a full-screen overlay panel with staggered link reveal, scroll lock, focus trap, and reduced-motion handling. Use when asked for a mobile menu, hamburger/burger button, nav drawer, off-canvas menu, or when a menu loses scroll position, still scrolls behind on iOS, leaks Tab focus to the page underneath, or the close button stops responding. Includes the z-index trap that swallows the close button and the iOS rubber-band trap.

brainzcode/premium-landing

Ship link previews and favicons that actually work - Open Graph and Twitter card tags, a correctly framed 1200x630 share image, and a full favicon set (SVG, ICO, apple-touch, maskable manifest icons). Use when asked for social sharing, OG image, open graph, twitter card, link preview, share image, favicon, app icon, apple touch icon, or web manifest. Also use when a shared link previews blank, shows the wrong image, or a favicon will not appear. Includes the absolute-URL trap that silently blanks every preview and the font trap that breaks SVG favicons on other machines.

brainzcode/premium-landing

Source free, licence-clear photography for a site from Unsplash — searching by mood rather than noun, sizing and cropping for the slot, honouring the API's hotlink and download-tracking requirements, and writing real alt text. Use when a page needs a hero image, section photography, avatars or card art and none was supplied; when placeholder greys need replacing with real imagery; or when asked to find, pick or swap photos for a design.

관련 스킬