mcpField
Q
qr-code-generation

qr-code-generation

github.com/eachlabs设计与 UI44274 次安装今天更新
代码仓库

关于 qr-code-generation

qr-code-generation 是使用 each::sense 制作艺术化二维码的技能,面向营销和设计用途。它支持品牌配色、Logo 留白、背景融合和渐变效果,并强调保持二维码可扫描。

主要功能

  1. 01艺术化二维码样式
  2. 02Logo 集成与中心留白
  3. 03品牌颜色与渐变效果
  4. 04主题设计及背景融合
  5. 05通过会话迭代并保持风格

适用场景

  1. 01为餐厅菜单制作品牌二维码
  2. 02为名片设计紧凑二维码
  3. 03为社交媒体链接生成主题二维码
  4. 04为多个网址生成风格统一的二维码

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill qr-code-generation

安装后在 Claude Code 中输入/qr-code-generation确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

QR 码生成

使用 each::sense 生成具有艺术感、品牌特色且视觉效果出众的 QR 码。这项技能可将功能性与优美设计相结合,非常适合营销材料、名片、菜单等场景。

功能

  • 风格化 QR 码:将标准 QR 码转变为艺术设计
  • 集成 Logo:在 QR 码中央嵌入公司 Logo
  • 品牌配色:创建与品牌形象相符的 QR 码
  • 艺术主题:自然、几何、抽象及自定义主题
  • 背景融合:将 QR 码与背景图片融合
  • 渐变效果:使用多彩渐变填充,打造醒目设计
  • 行业专用:餐厅菜单、名片、社交媒体主页

快速开始

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a stylized QR code for https://mywebsite.com with a modern tech aesthetic"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'

QR 码设计注意事项

元素最佳实践对可扫描性的影响
纠错能力艺术化 QR 码建议设为高(30%)为设计提供更大自由度
Logo 尺寸最多占 QR 码区域的 30%Logo 越大,可靠性越低
色彩对比度深色模块搭配浅色背景扫描的必要条件
静区保留白色边框确保可靠扫描的必要条件
模块样式圆角、圆点或自定义形状样式统一时影响极小

使用场景示例

1. 基础风格化 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a stylized QR code for https://example.com. Use a modern, clean design with rounded corners on the modules. Keep it scannable with good contrast. Blue and white color scheme."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
2. 中央带 Logo 的 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a QR code for https://mycompany.com with space in the center for a company logo. The QR should have a professional corporate look with dark blue modules. Make sure the center area is clean and square-shaped for logo placement."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/company-logo.png"]
  }'
3. 艺术化 QR 码(自然主题)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate an artistic QR code for https://naturereserve.org with a nature theme. Incorporate organic shapes - the modules should look like leaves or natural elements. Use earthy green and brown tones. The overall design should feel like it belongs in nature while remaining fully scannable."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
4. 品牌 QR 码(公司配色)
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a branded QR code for https://techstartup.io using brand colors: primary #FF6B35 (orange) and secondary #1A1A2E (dark navy). The design should feel innovative and tech-forward. Use geometric patterns around the QR code. Maintain high scannability."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
5. 带背景图片的 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a QR code for https://beachresort.com that integrates with a tropical beach background. The QR modules should be semi-transparent or styled to blend naturally with the beach scene. Use sandy and ocean blue tones. The code must remain scannable despite the artistic integration."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
6. 极简 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a minimalist QR code for https://minimal.design. Ultra-clean aesthetic with thin, precise modules. Pure black on white. No decorative elements - just elegant simplicity. The design should feel premium and high-end through restraint."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
7. 多彩渐变 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a vibrant gradient QR code for https://creativestudio.art. Apply a smooth gradient across the modules from pink (#FF6B9D) to purple (#C44569) to blue (#3D5A80). The gradient should flow diagonally. Make it eye-catching and artistic while remaining scannable."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
8. 餐厅菜单 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a QR code for a restaurant digital menu at https://restaurant.com/menu. Design should have an elegant dining theme - incorporate subtle fork and knife motifs or food-related design elements around the QR. Use warm, appetizing colors like burgundy and gold. Perfect for table tents."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
9. 名片 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a professional QR code for a digital business card vCard at https://vcard.example.com/johndoe. The design should be compact and suitable for printing on a business card. Use a sophisticated charcoal gray color with subtle metallic accents. Include a small professional icon element."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'
10. 社交媒体主页 QR 码
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a fun, social-media-ready QR code linking to https://linktr.ee/influencer. Design should feel young, trendy, and Instagram-worthy. Use a playful color palette with neon accents. Add decorative elements like stars or sparkles around the QR. Perfect for sharing on social platforms."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max"
  }'

最佳实践

设计指南
  • 对比度是关键:确保模块与背景之间有足够强的对比度
  • 测试可扫描性:务必确认生成的 QR 码可以正常扫描
  • 纠错级别:级别越高,设计自由度越大
  • 静区:保留 QR 码周围的空白区域
  • 模块清晰度:即使采用艺术化样式,也要确保模块清晰可辨
配色指南
  • 深色搭配浅色:传统对比效果最佳
  • 避免红色和绿色:可能给色盲用户造成识别困难
  • 统一样式:在所有模块上统一应用效果
  • 背景对比度:确保与放置表面有足够的对比度
尺寸建议
使用场景最小尺寸建议尺寸
名片2cm x 2cm2.5cm x 2.5cm
桌牌3cm x 3cm4cm x 4cm
海报5cm x 5cm8cm x 8cm
广告牌15cm x 15cm20cm x 20cm

模式选择

生成前请询问用户:

“您想要快速且低成本,还是高质量?”

模式适用场景速度质量
max最终版 QR 码、印刷材料、品牌素材较慢最高
eco快速预览、概念测试、多种变体较快良好

多轮创意迭代

使用 session_id 迭代 QR 码设计:

# Initial QR code design
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a stylized QR code for https://mybrand.com with a modern tech aesthetic"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "qr-design-project"
  }'

# Refine the design
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Make the corners more rounded and add a subtle glow effect around the QR code"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "qr-design-project"
  }'

# Request color variation
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a version with gold and black colors for our premium product line"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "qr-design-project"
  }'

为多个 URL 批量生成

为多个目标地址生成风格统一的 QR 码:

# Main website QR
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a branded QR code for https://company.com with blue gradient styling"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "session_id": "company-qr-set"
  }'

# Product page QR
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a matching QR code for https://company.com/products in the same style"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "session_id": "company-qr-set"
  }'

# Contact page QR
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a matching QR code for https://company.com/contact in the same style"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "eco",
    "session_id": "company-qr-set"
  }'

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足前往 eachlabs.ai 充值
内容政策违规URL 中包含违禁内容使用合规的 URL
超时生成任务过于复杂将客户端超时设置为至少 10 分钟
QR 码无法扫描设计过于艺术化、对比度过低要求提高对比度并简化设计

QR 码提示词建议

创建 QR 码时,请在提示词中包含以下详细信息:

  1. 目标 URL:QR 码应链接到的确切 URL
  2. 风格主题:现代、简约、艺术化、品牌风格等
  3. 颜色:具体的十六进制颜色代码或颜色描述
  4. 使用场景:名片、海报、菜单、社交媒体
  5. Logo 要求:是否需要预留 Logo 空间
  6. 特殊效果:渐变、阴影、发光、图案
提示词结构示例
"Create a [style] QR code for [URL].
Use [colors] with [design elements].
Intended use: [placement/medium].
[Additional requirements like logo space, specific themes, etc.]
Ensure it remains scannable."

相关技能

  • each-sense - 核心 API 文档
  • product-photo-generation - 电商产品图片
  • meta-ad-creative-generation - Meta 广告创意

评论

支持 Markdown