fashion-design-ref 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/package.json +18 -0
- package/postinstall.js +34 -0
- package/skill/SKILL.md +55 -0
- package/skill/references/api.md +80 -0
- package/skill/scripts/search.py +84 -0
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# fashion-design-ref
|
|
2
|
+
|
|
3
|
+
A Claude Code skill that gives you instant access to 17,000+ Vogue Runway garments (2020–2024) for fashion design references — plus auto-generated image prompts for AI image generation.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g fashion-design-ref
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The skill is automatically placed in `~/.claudecode/skills/fashion-design-ref/` after install.
|
|
12
|
+
|
|
13
|
+
## Usage in Claude Code
|
|
14
|
+
|
|
15
|
+
Just describe what you need in natural language — Chinese or English:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
帮我找31岁大学女老师、品质高的衬衫设计参考
|
|
19
|
+
Find oversized deconstructed jacket references, avant-garde aesthetic
|
|
20
|
+
20岁女生甜美风连衣裙,春夏
|
|
21
|
+
Show me quiet luxury coat references from top brands
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Claude Code will:
|
|
25
|
+
1. Search the database for real historical garments matching your description
|
|
26
|
+
2. Return reference garments with brand, year, design elements, and editorial descriptions
|
|
27
|
+
3. Generate a ready-to-use image prompt for nano banana or any AI image generator
|
|
28
|
+
|
|
29
|
+
## What's in the database
|
|
30
|
+
|
|
31
|
+
- **17,193 garments** from Vogue Runway 2020–2024
|
|
32
|
+
- **100 brands**: Chanel, Dior, Prada, Gucci, The Row, Rick Owens, Maison Margiela, and more
|
|
33
|
+
- **9 style categories**: french-luxury, italian-luxury, conceptual, quiet-luxury, contemporary, romantic, streetwear, heritage-tailoring, british-american
|
|
34
|
+
- **13 design dimensions**: silhouette, construction, neckline, material, pattern, color palette, occasion, cultural reference...
|
|
35
|
+
|
|
36
|
+
## API
|
|
37
|
+
|
|
38
|
+
The skill connects to a hosted API at `http://ec2-18-144-67-51.us-west-1.compute.amazonaws.com:8001`.
|
|
39
|
+
|
|
40
|
+
You can also call it directly:
|
|
41
|
+
```bash
|
|
42
|
+
python3 ~/.claudecode/skills/fashion-design-ref/scripts/search.py "your query" --limit 5
|
|
43
|
+
```
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fashion-design-ref",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Fashion design reference skill for Claude Code — search 17,000+ Vogue Runway garments and generate image prompts",
|
|
5
|
+
"keywords": ["claude", "claudecode", "skill", "fashion", "design", "reference", "vogue", "runway"],
|
|
6
|
+
"homepage": "https://github.com/ChongC1990/fashion-design-db",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"postinstall": "node postinstall.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"postinstall.js",
|
|
13
|
+
"skill/"
|
|
14
|
+
],
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=16"
|
|
17
|
+
}
|
|
18
|
+
}
|
package/postinstall.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* postinstall.js — copy skill files to ~/.claudecode/skills/fashion-design-ref/
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
const fs = require("fs");
|
|
7
|
+
const path = require("path");
|
|
8
|
+
const os = require("os");
|
|
9
|
+
|
|
10
|
+
const SKILL_NAME = "fashion-design-ref";
|
|
11
|
+
const SRC = path.join(__dirname, "skill");
|
|
12
|
+
const DEST = path.join(os.homedir(), ".claudecode", "skills", SKILL_NAME);
|
|
13
|
+
|
|
14
|
+
function copyDir(src, dest) {
|
|
15
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
16
|
+
for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
|
|
17
|
+
const srcPath = path.join(src, entry.name);
|
|
18
|
+
const destPath = path.join(dest, entry.name);
|
|
19
|
+
if (entry.isDirectory()) {
|
|
20
|
+
copyDir(srcPath, destPath);
|
|
21
|
+
} else {
|
|
22
|
+
fs.copyFileSync(srcPath, destPath);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
copyDir(SRC, DEST);
|
|
29
|
+
console.log(`✅ Fashion Design Reference skill installed to ${DEST}`);
|
|
30
|
+
console.log(` Usage in Claude Code: "帮我找女装衬衫设计参考" or "fashion reference for oversized jacket"`);
|
|
31
|
+
} catch (err) {
|
|
32
|
+
console.error(`❌ Failed to install skill: ${err.message}`);
|
|
33
|
+
process.exit(1);
|
|
34
|
+
}
|
package/skill/SKILL.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: fashion-design-ref
|
|
3
|
+
description: Fashion design reference search powered by a curated database of 17,000+ Vogue Runway garments (2020-2024). Given a natural language description of a design need, searches for real historical reference garments and returns structured design elements plus a ready-to-use image generation prompt for nano banana. Use when a user asks for: fashion design references, clothing inspiration, garment design ideas, style references for a specific person/occasion/aesthetic, or wants to generate fashion images. Triggers on keywords like "design reference", "fashion reference", "衬衫设计", "服装灵感", "生成衣服", "设计参考", "风格参考".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Fashion Design Reference
|
|
7
|
+
|
|
8
|
+
Search 17,000+ Vogue Runway garments for design references and generate image prompts.
|
|
9
|
+
|
|
10
|
+
## API
|
|
11
|
+
|
|
12
|
+
Base URL: `http://ec2-18-144-67-51.us-west-1.compute.amazonaws.com:8001`
|
|
13
|
+
|
|
14
|
+
### Search
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
POST /v1/fashion/search
|
|
18
|
+
{"query": "<natural language>", "limit": 5}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Response fields:
|
|
22
|
+
- `results[]` — real garment records from DB (id, brand, name, year, category, description, elements)
|
|
23
|
+
- `image_prompt` — ready-to-use nano banana prompt (flat lay, no people, front+back+detail)
|
|
24
|
+
- `design_insight` — Gemini synthesis of what the references suggest
|
|
25
|
+
- `interpretation` — how the query was understood
|
|
26
|
+
|
|
27
|
+
Supports Chinese and English queries. Auto-detects gender, category (coat/shirt/dress/skirt/trousers/knitwear), occasion.
|
|
28
|
+
|
|
29
|
+
### Other endpoints
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
GET /v1/fashion/garments/{id} # single garment detail
|
|
33
|
+
GET /v1/fashion/similar/{id}?limit=5 # similar garments by tag overlap
|
|
34
|
+
POST /v1/fashion/elements # element co-occurrence suggestions
|
|
35
|
+
{"elements": ["tailored", "oversized"], "category": "jacket"}
|
|
36
|
+
GET /v1/fashion/health # health check
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
|
|
41
|
+
1. Call `POST /v1/fashion/search` with the user's query — use `scripts/search.py`
|
|
42
|
+
2. Present the reference garments with brand/year/description
|
|
43
|
+
3. Show the `image_prompt` to the user — they can pass it directly to nano banana
|
|
44
|
+
4. Optionally call nano banana to generate the image inline
|
|
45
|
+
|
|
46
|
+
See `references/api.md` for full field schemas and element vocabulary.
|
|
47
|
+
|
|
48
|
+
## Running the search script
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
python3 scripts/search.py "31岁大学女老师,衬衫,短款,品质高" --limit 5
|
|
52
|
+
python3 scripts/search.py "oversized deconstructed jacket, avant-garde" --limit 8
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Output: JSON with results + image_prompt printed to stdout.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Fashion Design Reference API
|
|
2
|
+
|
|
3
|
+
Base URL: `http://ec2-18-144-67-51.us-west-1.compute.amazonaws.com:8001`
|
|
4
|
+
|
|
5
|
+
## POST /v1/fashion/search
|
|
6
|
+
|
|
7
|
+
**Request:**
|
|
8
|
+
```json
|
|
9
|
+
{
|
|
10
|
+
"query": "string (Chinese or English)",
|
|
11
|
+
"limit": 5,
|
|
12
|
+
"filters": {
|
|
13
|
+
"category": "coat|jacket|shirt|dress|skirt|trousers|knitwear|outerwear",
|
|
14
|
+
"gender": "women|men|unisex",
|
|
15
|
+
"year_from": 2018,
|
|
16
|
+
"year_to": 2024
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
**Response:**
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"interpretation": "How the query was understood",
|
|
25
|
+
"search_strategy": "Which tags were matched",
|
|
26
|
+
"results": [
|
|
27
|
+
{
|
|
28
|
+
"id": 3569,
|
|
29
|
+
"name": "Military-Inspired Utility Shirt",
|
|
30
|
+
"brand": "Prada",
|
|
31
|
+
"designer": null,
|
|
32
|
+
"year": 2024,
|
|
33
|
+
"season": "FW",
|
|
34
|
+
"collection_name": null,
|
|
35
|
+
"category": "shirt",
|
|
36
|
+
"description": "Miuccia Prada and Raf Simons...",
|
|
37
|
+
"elements": {
|
|
38
|
+
"silhouette": ["relaxed", "oversized"],
|
|
39
|
+
"construction": ["tailored"],
|
|
40
|
+
"neckline": ["notched-lapel"],
|
|
41
|
+
"color_palette": ["neutral", "earth-tone"],
|
|
42
|
+
"occasion": ["workwear", "casual"]
|
|
43
|
+
},
|
|
44
|
+
"relevance_note": "Matched via design element tags"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"design_insight": "Synthesis of what references suggest",
|
|
48
|
+
"image_prompt": "Ready-to-use nano banana prompt...",
|
|
49
|
+
"alternative_directions": ["Direction 1", "Direction 2"]
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Design Element Vocabulary
|
|
54
|
+
|
|
55
|
+
| Dimension | Values |
|
|
56
|
+
|-----------|--------|
|
|
57
|
+
| silhouette | oversized, boxy, fitted, relaxed, column, wide-leg, flared, tapered, cocoon, A-line, balloon, asymmetric, draped |
|
|
58
|
+
| construction | tailored, deconstructed, draped, raw-edge, basted, quilted, smocked, pleated, gathered, bonded, laser-cut |
|
|
59
|
+
| neckline | crew, V-neck, notched-lapel, shawl-lapel, mandarin, cowl, off-shoulder, square, deep-plunge, turtleneck, asymmetric, no-collar |
|
|
60
|
+
| sleeve | set-in, raglan, dropped, bishop, puff, sleeveless, dolman, kimono, three-quarter, long |
|
|
61
|
+
| closure | buttons, zipper, hook-and-eye, wrap, no-closure, lace-up, press-stud, drawstring |
|
|
62
|
+
| hem | straight, asymmetric, high-low, curved, raw, stepped, tiered, handkerchief |
|
|
63
|
+
| material_weight | lightweight, medium, heavy, structured, fluid |
|
|
64
|
+
| material_texture | smooth, textured, sheer, quilted, knit, matte, glossy, napped, open-weave |
|
|
65
|
+
| pattern | solid, stripe, plaid, floral, abstract, geometric, animal-print, herringbone, houndstooth, tweed, jacquard, check |
|
|
66
|
+
| color_palette | monochrome, neutral, earth-tone, contrast, tonal, multicolor, neon, pastel, dark |
|
|
67
|
+
| detailing | exposed-seam, patch-pocket, pleats, pintuck, embroidery, applique, fringe, hardware, cutout, vent, ruching, welt-pocket, peplum, topstitching |
|
|
68
|
+
| occasion | streetwear, formal, casual, workwear, eveningwear, avant-garde, resort, couture, sportswear |
|
|
69
|
+
| cultural_reference | military, workwear, tailoring, japanese, streetwear, punk, folk, futurism, romanticism, sportswear, couture, minimalism |
|
|
70
|
+
|
|
71
|
+
## Categories
|
|
72
|
+
|
|
73
|
+
`jacket` `coat` `shirt` `dress` `skirt` `trousers` `knitwear` `outerwear` `footwear` `accessory`
|
|
74
|
+
|
|
75
|
+
## Database Coverage
|
|
76
|
+
|
|
77
|
+
- **17,193 garments** from Vogue Runway 2020–2024
|
|
78
|
+
- **100 brands** across 9 style categories
|
|
79
|
+
- **Top brands by volume**: Louis Vuitton (429), Fendi (426), Saint Laurent (417), Gucci (400), Valentino (381), Prada (377), Givenchy (377)
|
|
80
|
+
- **Style categories**: french-luxury, italian-luxury, british-american, conceptual, quiet-luxury, contemporary, streetwear, romantic, heritage-tailoring
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Fashion Design Reference Search
|
|
4
|
+
Usage: python3 search.py "<query>" [--limit N] [--base-url URL]
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import sys
|
|
8
|
+
import json
|
|
9
|
+
import argparse
|
|
10
|
+
import urllib.request
|
|
11
|
+
import urllib.error
|
|
12
|
+
|
|
13
|
+
DEFAULT_BASE_URL = "http://ec2-18-144-67-51.us-west-1.compute.amazonaws.com:8001"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def search(query: str, limit: int = 5, base_url: str = DEFAULT_BASE_URL) -> dict:
|
|
17
|
+
payload = json.dumps({"query": query, "limit": limit}).encode()
|
|
18
|
+
req = urllib.request.Request(
|
|
19
|
+
f"{base_url}/v1/fashion/search",
|
|
20
|
+
data=payload,
|
|
21
|
+
headers={"Content-Type": "application/json"},
|
|
22
|
+
method="POST",
|
|
23
|
+
)
|
|
24
|
+
try:
|
|
25
|
+
with urllib.request.urlopen(req, timeout=90) as r:
|
|
26
|
+
return json.load(r)
|
|
27
|
+
except urllib.error.HTTPError as e:
|
|
28
|
+
return {"error": f"HTTP {e.code}: {e.read().decode()[:200]}"}
|
|
29
|
+
except Exception as e:
|
|
30
|
+
return {"error": str(e)}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def pretty_print(result: dict):
|
|
34
|
+
if "error" in result:
|
|
35
|
+
print(f"Error: {result['error']}", file=sys.stderr)
|
|
36
|
+
return
|
|
37
|
+
|
|
38
|
+
print(f"\n📖 Interpretation: {result.get('interpretation', '')}")
|
|
39
|
+
print(f"🔍 Strategy: {result.get('search_strategy', '')}\n")
|
|
40
|
+
|
|
41
|
+
results = result.get("results", [])
|
|
42
|
+
print(f"Found {len(results)} reference garments:\n")
|
|
43
|
+
for i, g in enumerate(results, 1):
|
|
44
|
+
print(f"[{i}] {g.get('brand', '?')} — {g.get('name', '?')}")
|
|
45
|
+
print(f" {g.get('year', '?')} {g.get('season', '')} | {g.get('category', '?')}")
|
|
46
|
+
print(f" {g.get('description', '')[:150]}...")
|
|
47
|
+
elems = g.get("elements", {})
|
|
48
|
+
if elems:
|
|
49
|
+
key_dims = ["silhouette", "construction", "material_texture", "color_palette", "occasion"]
|
|
50
|
+
tags = []
|
|
51
|
+
for dim in key_dims:
|
|
52
|
+
vals = elems.get(dim, [])
|
|
53
|
+
if vals:
|
|
54
|
+
tags.append(f"{dim}: {', '.join(vals)}")
|
|
55
|
+
if tags:
|
|
56
|
+
print(f" Tags: {' | '.join(tags)}")
|
|
57
|
+
print()
|
|
58
|
+
|
|
59
|
+
if result.get("design_insight"):
|
|
60
|
+
print(f"💡 Design Insight:\n{result['design_insight']}\n")
|
|
61
|
+
|
|
62
|
+
if result.get("image_prompt"):
|
|
63
|
+
print(f"🎨 Image Prompt (nano banana ready):\n{result['image_prompt']}\n")
|
|
64
|
+
|
|
65
|
+
if result.get("alternative_directions"):
|
|
66
|
+
print("↗ Alternative Directions:")
|
|
67
|
+
for d in result["alternative_directions"]:
|
|
68
|
+
print(f" - {d}")
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
if __name__ == "__main__":
|
|
72
|
+
parser = argparse.ArgumentParser(description="Fashion design reference search")
|
|
73
|
+
parser.add_argument("query", help="Natural language design query (Chinese or English)")
|
|
74
|
+
parser.add_argument("--limit", type=int, default=5, help="Number of results (default: 5)")
|
|
75
|
+
parser.add_argument("--base-url", default=DEFAULT_BASE_URL, help="API base URL")
|
|
76
|
+
parser.add_argument("--json", action="store_true", help="Output raw JSON")
|
|
77
|
+
args = parser.parse_args()
|
|
78
|
+
|
|
79
|
+
result = search(args.query, args.limit, args.base_url)
|
|
80
|
+
|
|
81
|
+
if args.json:
|
|
82
|
+
print(json.dumps(result, ensure_ascii=False, indent=2))
|
|
83
|
+
else:
|
|
84
|
+
pretty_print(result)
|