Brand dev skill

Fetch brand info (name, description, logos, industry) from brand.dev API and save logos locally.

by OpenClaudia·MIT license·★ 705 Stars on the repo·GitHub ↗

Use now

Files of Brand dev

OpenClaudia/main1 file shown
SKILL.md
Show the full text74 lines

Brand.dev Skill

Fetch brand data from the brand.dev API and save logos locally for serving.

Step 1: Get the Domain

Extract the target domain from the user's input. Strip protocol and trailing slashes (e.g., "https://example.com/" -> "example.com").

Step 2: Fetch Brand Info

# BRANDDEV_API_KEY must be set in your environment
curl -s "https://api.brand.dev/v1/brand/retrieve?domain=${DOMAIN}" \
  -H "Authorization: Bearer ${BRANDDEV_API_KEY}" \
  -H "Content-Type: application/json"

Extract from the response:

  • Brand name (.brand.title or .brand.name)
  • Description (.brand.description)
  • Logo URLs (from .brand.logos[]) — prefer icon/square logos for card layouts, full logos for headers
  • Industry/category if available

Step 3: Download Logos Locally

ALWAYS download logos locally for serving. Never reference external media.brand.dev URLs in production code — they can change or go down.

Where to save

The save location depends on the project. Look for existing patterns:

  • Next.js / static sites: public/logos/<context>/ (served as /logos/<context>/)
  • Other web projects: check for existing static/, assets/, images/, or public/ directories
  • If no convention exists: create a logos/ directory under the project's static asset root
Naming Convention
  • <brand-slug>.<ext> where:
    • <brand-slug> is the lowercase brand name, spaces replaced by hyphens (e.g., miss-a not miss_a)
    • <ext> matches the original file extension (png, webp, jpg, svg)
  • Optionally group by context subdirectory (e.g., partners/, customers/) if the project has multiple logo collections
Download Command
mkdir -p <logo-dir>
curl -sL "<logo-url>" -o "<logo-dir>/<brand-slug>.<ext>"
Verify Download
ls -la <logo-dir>/<brand-slug>.<ext>

Step 4: Return Results

Provide the user with:

  • Brand name
  • Description
  • Industry
  • Local logo path — the path to use in code (relative to the project's static root)
  • Original source URL (for reference only)

Important Rules

  1. Always save images locally — never use media.brand.dev URLs directly in production code.
  2. Use local paths in code — reference relative to the project's static asset serving root.
  3. Prefer square/icon logos for card layouts (they fit better in grid cards).
  4. Prefer full/horizontal logos for headers and hero sections.
  5. If the brand has no logos in the API response, note this and suggest using a fallback icon.
1---
2name: brand-dev
3description: Fetch brand info (name, description, logos, industry) from brand.dev API and save logos locally. Use when the user asks to look up a brand, fetch a logo, get brand info, or add a company with its logo.
4user_invocable: true
5---
6 
7# Brand.dev Skill
8 
9Fetch brand data from the brand.dev API and save logos locally for serving.
10 
11## Step 1: Get the Domain
12 
13Extract the target domain from the user's input. Strip protocol and trailing slashes (e.g., "https://example.com/" -> "example.com").
14 
15## Step 2: Fetch Brand Info
16 
17```bash
18# BRANDDEV_API_KEY must be set in your environment
19curl -s "https://api.brand.dev/v1/brand/retrieve?domain=${DOMAIN}" \
20 -H "Authorization: Bearer ${BRANDDEV_API_KEY}" \
21 -H "Content-Type: application/json"
22```
23 
24Extract from the response:
25- **Brand name** (`.brand.title` or `.brand.name`)
26- **Description** (`.brand.description`)
27- **Logo URLs** (from `.brand.logos[]`) — prefer icon/square logos for card layouts, full logos for headers
28- **Industry/category** if available
29 
30## Step 3: Download Logos Locally
31 
32ALWAYS download logos locally for serving. Never reference external `media.brand.dev` URLs in production code — they can change or go down.
33 
34### Where to save
35 
36The save location depends on the project. Look for existing patterns:
37- **Next.js / static sites**: `public/logos/<context>/` (served as `/logos/<context>/`)
38- **Other web projects**: check for existing `static/`, `assets/`, `images/`, or `public/` directories
39- **If no convention exists**: create a `logos/` directory under the project's static asset root
40 
41### Naming Convention
42- `<brand-slug>.<ext>` where:
43 - `<brand-slug>` is the lowercase brand name, spaces replaced by hyphens (e.g., `miss-a` not `miss_a`)
44 - `<ext>` matches the original file extension (png, webp, jpg, svg)
45- Optionally group by context subdirectory (e.g., `partners/`, `customers/`) if the project has multiple logo collections
46 
47### Download Command
48```bash
49mkdir -p <logo-dir>
50curl -sL "<logo-url>" -o "<logo-dir>/<brand-slug>.<ext>"
51```
52 
53### Verify Download
54```bash
55ls -la <logo-dir>/<brand-slug>.<ext>
56```
57 
58## Step 4: Return Results
59 
60Provide the user with:
61- Brand name
62- Description
63- Industry
64- **Local logo path** — the path to use in code (relative to the project's static root)
65- Original source URL (for reference only)
66 
67## Important Rules
68 
691. **Always save images locally** — never use `media.brand.dev` URLs directly in production code.
702. **Use local paths in code** — reference relative to the project's static asset serving root.
713. **Prefer square/icon logos** for card layouts (they fit better in grid cards).
724. **Prefer full/horizontal logos** for headers and hero sections.
735. If the brand has no logos in the API response, note this and suggest using a fallback icon.
74 

Discussion