SuperAPI AI Directory

setting-detector

General & other

View repository

Updated 10-15 23:42

About this skill

Story Setting Auto-Detector

Core Features

Automatically Activate the Knowledge Base System - This is the core competitive advantage of Novel Writer Skills.

When you mention specific keywords, I will automatically:

  1. Detect the story's genre, era, and theme
  2. Load the corresponding writing knowledge base
  3. Apply professional knowledge throughout the entire creative process

No manual invocation needed - Fully automated, running in the background.


How It Works

Keyword Mapping Table

I monitor the following keywords and automatically activate the corresponding knowledge base:

Genre Knowledge Bases (Genres)

Romance(romance):

触发词:言情、爱情、恋爱、浪漫、感情线、关系弧、CP、甜文、虐文、
       HE、BE、双洁、破镜重圆、先婚后爱、契约关系

激活:templates/knowledge-base/genres/romance.md

Mystery/Detective(mystery):

触发词:悬疑、推理、侦探、破案、谜团、线索、真相、凶手、犯罪、
       密室、诡计、不在场证明、推理小说

激活:templates/knowledge-base/genres/mystery.md

Historical Fiction(historical):

触发词:历史、古代、朝代、考据、时代背景、历史小说、古言、
       穿越、重生古代、架空历史、宫斗、宅斗

激活:templates/knowledge-base/genres/historical.md

Revenge Satisfaction Fiction(revenge):

触发词:复仇、报仇、打脸、爽文、逆袭、反击、重生复仇、
       穿越复仇、系统、金手指、女主爽文、男主爽文

激活:templates/knowledge-base/genres/revenge.md

Martial Arts Fiction(wuxia):

触发词:武侠、江湖、武功、侠客、门派、武学、剑客、
       轻功、内功、武林、江湖恩仇、侠义

激活:templates/knowledge-base/genres/wuxia.md

Reference Libraries (References)

1920s China(china-1920s):

触发词:1920、民国、军阀、北洋、穿越民国、二十年代、
       民国时期、军阀混战

激活:templates/knowledge-base/references/china-1920s/

Automatic Activation Process

Example 1: Single Genre Detection

用户:"我要写一部言情小说"
              ↓
[检测到关键词:"言情"]
              ↓
✓ 自动加载:romance.md
              ↓
AI回复:"太好了!让我帮你创作言情小说。
根据言情类型惯例,我们需要明确几个核心元素...
(自动应用romance.md中的知识)"

Example 2: Multi-Genre Combination Detection

用户:"我要写一部1920年代的言情复仇小说"
              ↓
[检测到关键词:"1920"、"言情"、"复仇"]
              ↓
✓ 自动加载:romance.md
✓ 自动加载:revenge.md
✓ 自动加载:references/china-1920s/
              ↓
📚 已激活知识库:
- genres/romance.md(言情小说惯例)
- genres/revenge.md(复仇爽文技巧)
- references/china-1920s/(1920年代背景)
              ↓
AI回复:"很好的组合!这是浪漫悬疑+复仇+民国背景。
根据这三个类型的融合,建议...
(同时应用三个知识库的内容)"

Example 3: Continuous Application During the Creative Process

/constitution 阶段:
→ 已激活:romance.md
→ 提醒:言情小说需要HEA/HFN结局承诺

/specify 阶段:
→ 已激活:romance.md + revenge.md
→ 建议:定义关系弧线+复仇目标

/plan 阶段:
→ 已激活:所有知识库
→ 应用:情感节奏点+打脸节奏+1920年代细节

/write 阶段:
→ 已激活:所有知识库
→ 实时:对话技巧+场景描写+时代氛围

/analyze 阶段:
→ 已激活:所有知识库
→ 检查:言情惯例+复仇合理性+历史准确性

Token Efficiency Optimization

Why Is This System Efficient?

Traditional Approach (superpowers-skills mode):

50个独立Skills × 每个40行SKILL.md = 2000 tokens
每次对话都加载所有Skills

Our Approach (Layered Knowledge Base + Detector):

1个detector Skill(本文件):~100 tokens
按需加载知识库:
- romance.md:~520 tokens
- revenge.md:~480 tokens
- china-1920s/:~650 tokens

总计:100 + 520 + 480 + 650 = ~1750 tokens
(仅加载相关知识库)

Save 75% vs loading 50 irrelevant Skills


Manual Control

View the currently activated knowledge base

Ask at any time:

"当前激活了哪些知识库?"

I will reply:

📚 当前激活的知识库:
✓ genres/romance.md - 言情小说创作惯例
✓ genres/revenge.md - 复仇爽文打脸技巧
✓ references/china-1920s/ - 1920年代中国参考资料

Token消耗:约1650 tokens

Manually Activate a Knowledge Base

If automatic detection fails, you can specify explicitly:

"请加载 romance 和 mystery 知识库"
"这个故事需要 1920s 中国参考资料"
"激活武侠知识库"

Deactivate a Knowledge Base

If a knowledge base is no longer needed:

"停用 revenge 知识库,这个故事不涉及复仇"

Integration with Commands

/constitution - Genre-Specific Principles

Based on the activated knowledge base, provide genre-specific creative principles:

【自动插入到constitution中】

## 类型特定原则(由setting-detector自动添加)

### 言情小说核心原则
1. 关系弧线是主情节
2. HEA/HFN结局是必须的
3. 化学反应真实可信

### 复仇爽文核心原则
1. 仇恨必须深刻具体
2. 打脸节奏渐进式
3. 道德平衡:罪有应得

/specify - Genre-Specific Specifications

Provide the corresponding specification template elements:

【自动提示】

💡 根据已激活的知识库,建议在规格中定义:

【来自romance.md】
- 关系弧线设定
- 情感节奏点规划
- HEA/HFN结局类型

【来自revenge.md】
- 仇恨来源(具体罪行)
- 金手指设定
- 打脸节奏规划

【来自china-1920s】
- 具体年份(1920-1929)
- 地理位置(北京/上海/其他)
- 社会阶层设定

/plan - Genre Knowledge Fusion

Fuse suggestions from multiple knowledge bases into the plan:

【自动应用】

## 章节规划(融合3个知识库)

第1-5章:相遇与仇恨建立
- [romance] 初次相遇场景(meet-cute)
- [revenge] 展示前世/过去的深仇大恨
- [1920s] 民国时代氛围营造

第6-10章:关系升温与小打脸
- [romance] 暧昧期:肢体接触、情感积累
- [revenge] 第一次打脸:仇人惊讶
- [1920s] 服饰、礼仪、社会规则展现

...

/write - Real-Time Writing Guidance

Automatically apply relevant knowledge while writing:

【写作前自动提醒】

📋 本章应用的知识库:

✓ romance.md - 对话火花技巧
  → 调情对话:挑战而非顺从
  → 肢体语言:眼神、触碰、距离

✓ revenge.md - 打脸场景爽感
  → 期待 → 反转 → 惊愕 → 霸气

✓ 1920s - 时代细节
  → 称呼:大人、老爷、小姐
  → 场景:茶馆、洋行、租界

/analyze - Genre Convention Checks

Perform the corresponding checks based on the activated knowledge base:

【自动分析】

## 类型符合度分析

### 言情小说检查(基于romance.md)
- [x] 关系弧线是主情节
- [x] 包含必备情感节奏点
- [ ] ⚠️ 缺少初吻场景(建议在第15章)
- [x] HEA结局承诺明确

### 复仇爽文检查(基于revenge.md)
- [x] 仇恨深刻具体
- [x] 打脸频率合理(每5章1次)
- [x] 主角实力提升合理

### 历史准确性检查(基于1920s)
- [x] 时代背景正确
- [ ] ⚠️ 第8章出现"手机"(时代不符)
- [x] 称呼系统正确

Knowledge Base Extension

Currently Supported Knowledge Bases

Category Completed Planned
Genre Knowledge 5 10+
Reference Materials 1 20+

Completed(v1.0):

  • genres/romance.md
  • genres/mystery.md
  • genres/historical.md
  • genres/revenge.md
  • genres/wuxia.md
  • references/china-1920s/

Planned(v1.1+):

  • genres/fantasy.md (Fantasy)
  • genres/sci-fi.md (Science Fiction)
  • genres/horror.md (Horror)
  • references/ancient-china/ (Various Dynasties)
  • references/modern-workplace/ (Modern Workplace)

Adding a New Knowledge Base

  1. Intemplates/knowledge-base/Create a file in the corresponding directory
  2. Updatetemplates/knowledge-base/README.md's keyword mapping table
  3. setting-detector will automatically recognize it (no need to modify this file)

Example: Adding a Fantasy Knowledge Base

# 1. 创建文件
touch templates/knowledge-base/genres/fantasy.md

# 2. 更新README.md关键词映射
fantasy:
  keywords: [奇幻, 魔法, 世界构建, 魔法系统]
  auto_load: genres/fantasy.md

# 3. 完成!下次用户说"奇幻"就会自动激活

Intelligent Features

1. Fuzzy Matching

It can recognize even if it's not an exact keyword:

"我想写个穿越到民国的复仇故事"
           ↓
识别:"民国" → 1920s中国
     "复仇" → revenge

"女主重生后要报仇"
           ↓
识别:"重生" + "报仇" → revenge(重生复仇)

2. Context Understanding

Continuously recognize based on the conversation context:

第1条消息:"我要写小说"
→ 未激活任何知识库(等待更多信息)

第2条消息:"主角是侦探"
→ 激活mystery.md

第3条消息:"还有感情线"
→ 额外激活romance.md

→ 当前激活:mystery + romance(浪漫悬疑)

3. Automatic deduplication

Avoid duplicate activation:

用户:"这是武侠小说,江湖背景,有武功"
            ↓
识别到3个武侠关键词,但只激活1次wuxia.md

Frequently Asked Questions

Q: How do I know which knowledge base has been activated?

A: Just ask me at any time "Which knowledge bases are currently activated?" and I will list them.

Q: What should I do if automatic detection is wrong?

A: Just tell me directly:

"这不是言情小说,请停用romance知识库"
"这是科幻小说,请激活sci-fi知识库"(如果已有)

Q: How many knowledge bases can be activated at the same time?

A: Theoretically unlimited, but 3-5 is recommended as optimal:

  • Too few: guidance is not comprehensive enough
  • Too many: high token consumption, possible conflicts

Practical experience: 3 knowledge bases (such as romance + revenge + 1920s) are already very rich.

Q: Will knowledge bases conflict?

A: No! Knowledge bases are designed to work together:

  • romance + mystery = romantic suspense✓
  • fantasy + romance = fantasy romance✓
  • historical + revenge = ancient revenge✓

Q: When should I manually specify a knowledge base?

A: When:

  • Highly specialized terminology is used (I may not have recognized it)
  • You want to try a different type of fusion
  • Automatic detection does not match your intent

Q: Will knowledge bases stay activated all the time?

A: Yes, until:

  • You explicitly say "deactivate XX knowledge base"
  • Or a new conversation starts
  • Or you switch to a completely different story

Best practices

1. Clarify the genre early in the creative process

推荐做法:
用户:"我要写一部民国背景的复仇言情小说"

不推荐:
用户:"我要写小说"
AI:"好的"
用户:"主角姓李"
AI:"嗯"
(20轮对话后才提到是什么类型)

2. Regularly check activation status

Ask once every 5-10 chapters:

"当前激活的知识库还适合吗?"

I will check and suggest whether adjustments are needed.

3. Genre fusion should be reasonable

✓ 好的组合:
- romance + mystery(浪漫悬疑)
- historical + romance(古言)
- revenge + romance(复仇+感情)

⚠️ 困难的组合:
- horror + romance(恐怖言情?读者可能不适应)
- mystery + wuxia(推理武侠,需要特殊设计)

不是不能做,但需要特别小心融合方式。

4. Make use of reference materials

If the story has a clear historical background, be sure to activate the corresponding reference materials:

"1920年代" → china-1920s
"古代" → 指定具体朝代(如"唐代"、"明朝")

Historical details are accurate, and readers' immersion is strong.


Technical notes

Detection algorithm

1. 用户输入 → 提取关键词
2. 关键词 → 映射到知识库(基于README.md)
3. 去重 → 避免重复激活
4. 加载 → Read相应的.md文件
5. 应用 → 在后续对话中持续应用知识

Token management

激活状态检查:每次对话开始时
知识库内容:按需加载,缓存在对话上下文中
更新策略:只在明确需要时重新读取

Collaboration with other Skills

setting-detector is the "knowledge dispatcher", and other Skills are the "executors":

setting-detector → 决定加载哪些知识
consistency-checker → 基于激活的知识库检查一致性
workflow-guide → 根据类型提供特定流程指导
genre-specific skills → 提供类型特定的深度技巧

Summary

setting-detector is the Novel Writer Skillsbrain:

✓ Automatically detects story settings ✓ Intelligently activates the corresponding knowledge bases ✓ Token-efficient (loads on demand) ✓ Continuously applies professional knowledge ✓ Requires no user intervention

Let AI automatically become an expert in your story's genre! 🧠✨


This Skill version: v1.0 Last updated: 2025-10-18 Dependencies: templates/knowledge-base/ system Collaboration: consistency-checker, workflow-guide, genre-specific skills