Nano banana korean rendering

비라틴 문자(한글, 일본어, 중국어 등)를 AI 이미지에 정확히 렌더링하는 스킬. Canvas 프리렌더링과 Gemini를 활용하여 텍스트 깨짐 없이 이미지를 생성합니다.

MIT-0 · Free to use, modify, and redistribute. No attribution required.
1 · 1.5k · 1 current installs · 1 all-time installs
MIT-0
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
!
Purpose & Capability
The skill's code (render.mjs, setup.mjs) and SKILL.md align with the stated purpose of Canvas pre-rendering + Gemini analysis/generation. However, the registry metadata lists no required environment variables or primary credential while SKILL.md and setup.mjs clearly require GEMINI_API_KEY for full functionality — this mismatch is an incoherence in the declared capabilities/requirements.
Instruction Scope
The SKILL.md instructions are focused on detecting scripts, analyzing text with Gemini, rendering PNGs with Canvas, and sending them to Gemini for final generation. The instructions explicitly call out when network access and the GEMINI_API_KEY are used. They do not instruct reading unrelated system files or exfiltrating arbitrary data, but do send user prompts and rendered images to an external service (Gemini).
Install Mechanism
There is no platform install spec, but setup.mjs runs `npm install` (execSync) in the skill directory and downloads font files from GitHub raw URLs. The download hosts are GitHub (well-known). Installing npm deps and writing font files into the skill's fonts directory is expected for this functionality, but running install scripts and child_process is a higher-risk operation and should be executed in a controlled environment.
!
Credentials
The registry declares no required env vars, yet SKILL.md marks GEMINI_API_KEY as required and setup.mjs checks for it; the skill will use that key to call Gemini (analysis and image generation). Requesting a single service API key for the service it integrates with is proportionate, but the omission from declared metadata is an inconsistency that reduces transparency and should be corrected before installation.
Persistence & Privilege
The skill does not request always:true and does not modify other skills. Its setup writes node_modules and a fonts directory under its own folder. It declares trigger keywords that allow the agent to auto-activate when prompts contain non-Latin text — autonomous invocation is the platform default, so this is expected but worth noting because it causes the skill to run when such prompts are seen.
What to consider before installing
What to consider before installing: - Credential mismatch: The registry metadata does not list any required env vars, but SKILL.md and setup.mjs require GEMINI_API_KEY. Confirm this omission with the publisher and only provide a key you trust and can rotate. Prefer a scoped/tokenized key with minimal privileges. - Network & data flow: The skill will send prompts and pre-rendered PNGs to Google Gemini (via @google/generative-ai). Do not use it with sensitive or private text/images unless you accept that data will be transmitted to that external service. - Installation side effects: setup.mjs runs npm install (execSync) and downloads font files from GitHub raw URLs, writing node_modules and fonts into the skill's directory. Run setup in an isolated/sandbox environment or inspect the exact npm install output before trusting it. - Code review: Although the visible code appears to implement the stated pipeline, review render.mjs fully (the provided content was truncated) to ensure there are no unexpected network endpoints, telemetry, or file accesses beyond fonts/node_modules and Gemini SDK calls. - Safety steps: run the setup and skill in a sandbox/container, verify the fonts come from trusted sources, set GEMINI_API_KEY in a secure manner (not embedded in files), and monitor outgoing network connections during initial use. If you require help with specific checks (full code audit, network monitoring steps, or how to run in a sandbox), I can guide you through them.

Like a lobster shell, security has layers — review code before you run it.

Current versionv1.0.3
Download zip
latestvk97bf4ajzvh3g36ne5f6rzdfp580qvpn

License

MIT-0
Free to use, modify, and redistribute. No attribution required.

SKILL.md

다국어 텍스트 프리렌더링 스킬

AI 이미지 모델은 한글·한자·일본어 등 비라틴 문자를 직접 그리면 글자가 깨지거나 오타가 생깁니다. 이 스킬은 웹앱과 완전히 동일한 파이프라인을 제공합니다:

  1. detect — 프롬프트에 비라틴 문자가 있는지 감지
  2. analyze — Gemini LLM으로 프롬프트에서 텍스트와 스타일 추출
  3. render — Canvas로 정확한 폰트를 사용해 텍스트를 PNG 프리렌더링
  4. generate — 프리렌더링 PNG를 Gemini 이미지 생성에 인풋으로 넣어 최종 이미지 생성

최초 설정 (한 번만)

cd {baseDir} && node setup.mjs
  • canvas + @google/generative-ai npm 패키지 설치
  • Noto Sans 폰트 파일을 {baseDir}/fonts/에 준비

환경 변수

변수필수설명
GEMINI_API_KEY⭐ 필수Gemini Flash(분석) + Gemini Image(생성) 모두에 사용
GEMINI_IMAGE_MODEL선택이미지 생성 모델 (기본: gemini-3-pro-image-preview)

사용 흐름 (Step-by-Step)

한 번에 실행: pipeline

전체 파이프라인을 한 명령어로 실행합니다:

node {baseDir}/render.mjs pipeline "욎홎 뙤앾뼡이라는 지역 축제 포스터 만들어줘" \
  --output /tmp/final-image.png --no-base64

결과:

{
  "detect": { "needsRendering": true, "primaryScript": "hangul", ... },
  "analyze": { "texts": [...], "style": {...}, "reasoning": "..." },
  "render": { "success": true, "outputPath": "/tmp/text-render-xxx.png", ... },
  "generate": { "success": true, "outputPath": "/tmp/final-image.png", ... }
}

단계별 실행

Step 1: 비라틴 문자 감지 (detect)

node {baseDir}/render.mjs detect "사용자 프롬프트 전체"
  • needsRendering: false → 프리렌더링 없이 일반 이미지 생성 진행
  • needsRendering: true → Step 2로 진행

Step 2: Gemini LLM 프롬프트 분석 (analyze)

node {baseDir}/render.mjs analyze "욎홎 뙤앾뼡이라는 지역 축제 포스터 만들어줘"

Gemini Flash가 프롬프트를 분석하여:

  • 이미지에 들어갈 텍스트 추출 (따옴표, 레이블, 맥락 기반)
  • 디자인 맥락에 맞는 스타일 결정 (폰트, 크기, 색상)
  • 각 텍스트의 역할(headline/subheadline/body/caption) 지정
  • 각 텍스트의 스크립트·언어 자동 감지

GEMINI_API_KEY가 없으면 규칙 기반 fallback이 동작합니다.

Step 3: Canvas 프리렌더링 (render)

analyze 결과를 그대로 render에 전달합니다:

node {baseDir}/render.mjs render \
  --json '{"texts":[...],"style":{...}}' \
  --output /tmp/rendered-text.png

또는 JSON 파일로:

node {baseDir}/render.mjs render --input /tmp/analysis.json --output /tmp/rendered-text.png

Step 4: Gemini 이미지 생성 (generate)

프리렌더링된 텍스트 PNG를 Gemini에 인풋 이미지로 넣어서 최종 이미지를 생성합니다.

node {baseDir}/render.mjs generate \
  --prompt "욎홎 뙤앾뼡이라는 지역 축제 포스터 만들어줘" \
  --rendered /tmp/rendered-text.png \
  --analysis '{"texts":[...],"style":{...}}' \
  --output /tmp/final-image.png \
  --no-base64

이 명령어는 내부적으로:

  1. 프리렌더링 PNG를 첫 번째 참조 이미지로 Gemini에 전달
  2. buildTextRenderFinalPrompt로 프롬프트를 구성 (텍스트 목록 + 스타일 + "텍스트를 다시 그리지 말고 그대로 사용하라" 지침)
  3. Gemini가 텍스트를 자연스럽게 통합한 최종 이미지를 생성

추가 참조 이미지가 있으면 --ref로 전달:

node {baseDir}/render.mjs generate \
  --prompt "포스터 만들어줘" \
  --rendered /tmp/rendered-text.png \
  --ref /tmp/user-reference.jpg \
  --output /tmp/final-image.png

지원 폰트

언어sans-serifserifdisplayhandwriting
한국어Noto Sans KRNoto Serif KRBlack Han SansNanum Pen Script
일본어Noto Sans JPNoto Serif JPNoto Sans JPNoto Sans JP
중국어Noto Sans SCNoto Serif SCNoto Sans SCNoto Sans SC
태국어Noto Sans Thai
영어InterGeorgiaImpactComic Sans MS

텍스트 역할별 크기

role용도크기 비율
headline메인 제목1.0x
subheadline부제목0.7x
body본문0.5x
caption캡션/설명0.4x

폰트 크기 매핑

fontSize픽셀
small24px
medium36px
large48px
xlarge72px

트리거 키워드

이 스킬은 사용자 프롬프트에 다음 키워드가 포함되어 있을 때 자동 활성화됩니다:

텍스트, 글자, 문구, 로고, 워터마크, 브랜드, 글씨, 제목, 헤드라인, text, logo, title, headline, 또는 프롬프트에 한글/한자/일본어/태국어/아랍어 등 비라틴 문자가 포함된 경우.

규칙 (Do)

  • 비라틴 문자가 감지되면 반드시 전체 파이프라인 (detect→analyze→render→generate)을 실행한다
  • analyze로 LLM이 텍스트와 스타일을 추출하도록 한다
  • render로 Canvas 프리렌더링 PNG를 생성한다
  • generate로 프리렌더링 PNG를 Gemini에 인풋으로 넣어 최종 이미지를 생성한다

금지사항 (Don't)

  • AI 모델에게 비라틴 문자를 직접 그리라고 요청하지 않는다
  • 프리렌더링 없이 한글/한자/일본어 텍스트를 이미지 프롬프트에 포함하지 않는다
  • render 단계를 건너뛰고 바로 generate하지 않는다
  • analyze 결과에서 텍스트를 임의로 수정하지 않는다

Files

4 total
Select a file
Select a file to preview.

Comments

Loading comments…