rare-style-explorer
Generate and refine AIGC image prompts by combining rare, prompt-ready visual sub-style tags from a bundled 620-entry style library. Use when the user wants style exploration, image prompt variants, rare visual styles, non-generic aesthetics, style mixing, prompt matrices, or subject-to-style ideation for image generation.
1How It Works & Mechanism
Capabilities are powered by a structured library of 620 styles plus a deterministic, reproducible weighted random combinator; SKILL.md solely governs invocation conventions and output discipline.
The bundled library lives at `references/style_library.json`. Load it only when the user asks for specific style lookup, filtering, auditing, or manual curation. For normal prompt generation, run `scripts/explore_styles.py`.
The library consists of 'keyword-first' structured entries: each entry includes Chinese and English names, category, visual DNA, combination role, pitfall risks, and mitigation tips, ready to be directly assembled into prompts.
"中文风格名": "液态铬金属",
The combination grammar relies on fixed slots: Subject + one strong primary style + zero or one surface/light layer + zero or one format/space layer + anti-drift negative constraints.
Use one strong base style. Add zero or one surface/light style. Add zero or one format/space style. Add zero or one defect layer only when a more analog or media-specific finish is useful.
The script applies templates based on modes rather than generating freely: each of the six modes has its own sentence skeleton.
"minimal": "{subject},{base},{support},主体轮廓清晰,视觉识别度强,高细节,{negative}",
Generic word suppression + specificity weighting: entries identified with an excessively high ratio of generic words in their tokens have their weights reduced to 0.25.
if len(terms) <= 1 or specificity < 0.35:
In-batch deduplication relies on token overlap: entries sharing ≥2 content words and accounting for ≥50% overlap with already selected entries are judged as overly similar.
def too_similar(style, seen_term_sets):
Style families (--style-family) narrow the primary style pool down to specific directions via a 'category → family' mapping.
"film": {"电影、电视与影像类型"},
Output discipline is documented in SKILL.md: prompts default to Chinese, with English tokens serving solely as metadata; anti-drift negative constraints are mandatory.
Final prompt variants should be written in Chinese by default. English prompt tokens remain in the style metadata for lookup and manual conversion, but the user-facing prompt text should use Chinese style names, Chinese visual DNA, and Chinese anti-drift constraints.
2Core Capabilities
3External Dependencies
| Kind | Dependency / Endpoint |
|---|---|
| cli | python3(3.x,脚本仅用 argparse/json/random/re 标准库) |
4Recommended Governance & Evidence
- scripts/: Executes local script or command: python3 scripts/explore_styles.py (bundled script, standard library only; read-only access to bundled style_library.json and prints output)
5Second-Pass Verification
- [ok] 620 条宣称是否属实 — json.load 后 len(styles)==620;按类别计数合计 620;description/SKILL.md/README 三处口径一致。
- [ok] 每个 CLI 选项是否真有实现 — argparse 中逐一存在:mode(choices=sorted(TEMPLATES))、count、seed、style-id、format、freshness、style-family、avoid-generic(BooleanOptionalAction, default=True);SKILL.md 参数表与实现一致。
- [ok] 外部资源条目反查 — 唯一依赖是 python3;脚本 import 仅 argparse/json/random/re/pathlib,无第三方包、无 requirements.txt、无网络调用。
- [ok] 安全结论反例搜索 — 该目录下 explore_styles.py / SKILL.md / README.md / agents/openai.yaml 逐 token 扫描无 os.environ、无 subprocess、无 open(...,'w');JSON 为纯数据,无可执行片段。
- [ok] SREF 边界声明是否属实 — 实读 JSON 条目的字段集不含 SREF code;SKILL.md 明示『this skill does not store SREF codes and should not output --sref parameters』,与数据一致。
- [ok] 去重/加权逻辑是否真的生效(是否有死代码) — pick_unique() 被 make_variant() 调用(base/support/fashion/space 四处),weighted_pick() 被 pick_unique 调用;style_weight 的 freshness/avoid_generic 分支均有调用方传参,非死代码。
- [ok] 文档与实现的细节出入 — 一处轻微差异:SKILL.md『Combination Rules』给出「一个主风格 + 最多一个表面/光 + 最多一个格式/空间」的散文规则,而脚本 support_for_mode() 在非 material-series 模式下会把多层合并进一次 pick_unique,并在 45% 概率追加 defect 层——即脚本给的辅助层可能多于散文描述,属实现更宽松而非缺失。
6Verdict & Scenarios
37bc8ca8da3ceec7…