← Back to Skills Marketplace
q7766206

Novel Character Profile Builder

by q7766206 · GitHub ↗ · v1.0.0
cross-platform ⚠ suspicious
815
Downloads
1
Stars
6
Active Installs
1
Versions
Install in OpenClaw
/install character-profile-cn
Description
Novel Character Profile Builder (小说人物档案创建工具) — A bilingual CN/EN skill for creating structured, detailed character profiles for fiction writing. Generates co...
README (SKILL.md)

小说人物档案创建工具

概述

本skill帮助小说作者创建结构化的人物角色档案,以markdown格式输出。适用于小说创作前期的人物设定阶段,确保角色设定完整、一致,为故事创作奠定基础。

快速开始

当用户需要创建人物档案时:

  1. 设置工作目录:访问用户工作目录,并切换到该目录
  2. 收集角色信息:询问用户角色的核心信息
  3. 选择模板类型:根据角色类型选择合适的模板
  4. 填充详细信息:逐步引导用户完善各个字段
  5. 生成markdown档案:输出格式化的markdown文档

核心工作流程

1. 确定角色类型

首先识别角色在故事中的定位:

  • 主角:故事核心,需要最详细的档案
  • 重要配角:关键支持角色,需要较详细档案
  • 次要角色:功能性角色,需要基本档案
  • 反派:对立角色,需要动机和背景深度分析

2. 信息收集顺序

按照以下逻辑顺序收集信息:

  1. 基础身份:姓名、年龄、性别、职业等
  2. 外在特征:外貌、着装、举止
  3. 内在特质:性格、价值观、信仰
  4. 背景故事:过去经历、关键事件
  5. 关系网络:与其他角色的联系
  6. 故事功能:角色弧线、目标、冲突

3. 档案结构

所有档案都包含以下核心部分:

# [角色姓名] - 角色档案

## 基本信息
- **姓名**:
- **年龄**:
- **性别**:
- **职业/身份**:
- **故事中的角色**:

## 外貌特征
- **整体印象**:
- **面部特征**:
- **身材体型**:
- **着装风格**:
- **标志性特征**:

## 性格特点
- **核心性格**:
- **优点**:
- **缺点**:
- **价值观**:
- **恐惧**:
- **渴望**:

## 背景故事
- **出身背景**:
- **关键经历**:
- **转折点**:
- **未解之谜**:

## 人物关系
- **与主角关系**:
- **重要关系人**:
- **敌对关系**:
- **情感羁绊**:

## 故事发展
- **角色目标**:
- **内在冲突**:
- **外在冲突**:
- **发展弧线**:
- **可能的结局**:

## 创作笔记
- **灵感来源**:
- **象征意义**:
- **潜在发展**:

详细指南

针对不同角色类型的调整

主角模板

  • 需要最完整的背景故事和内心冲突
  • 详细的发展弧线规划
  • 复杂的动机层次
  • 参考:主角详细指南

反派模板

  • 重点刻画动机的合理性
  • 详细的对立逻辑
  • 潜在的救赎可能性
  • 参考:反派塑造指南

配角模板

  • 突出功能性特点
  • 简化的背景故事
  • 明确的故事作用
  • 参考:配角设计指南

高级技巧

角色一致性检查

创建档案后,进行以下检查:

  1. 动机一致性:行为是否与动机匹配
  2. 发展合理性:变化是否有合理铺垫
  3. 关系逻辑性:人物关系是否自然
  4. 冲突有效性:冲突是否推动故事

角色关系矩阵

对于多个角色,创建关系矩阵:

  • 情感强度
  • 冲突程度
  • 信任等级
  • 依赖关系

使用示例

示例1:创建奇幻小说主角

用户:我需要创建一个奇幻小说的主角,年轻法师,出身平凡但有特殊血统

步骤:
1. 识别为"主角"类型
2. 使用主角模板
3. 重点询问:特殊血统的设定、法师能力的限制、成长路径
4. 生成完整档案,强调魔法系统和成长弧线

示例2:创建都市情感故事配角

用户:需要一个都市故事的女主角闺蜜,性格开朗但有自己的秘密

步骤:
1. 识别为"重要配角"类型
2. 使用配角模板,调整情感深度
3. 重点询问:秘密的内容、与女主的关系、独立故事线
4. 生成档案,平衡功能性和深度

输出文件处理

生成的markdown档案可以:

  1. 直接保存为.md文件
  2. 集成到小说写作软件
  3. 作为角色卡片打印使用
  4. 后续更新和迭代

常见问题

Q: 如何避免角色模板化?

A: 在每个部分加入独特细节,寻找角色的矛盾点和非常规特征。

Q: 档案应该多详细?

A: 根据角色重要性调整,主角可能需要5000+字,配角500-1000字。

Q: 如何处理角色发展?

A: 在"故事发展"部分规划多个阶段的状态变化。

参考文件

最佳实践

  1. 从核心概念开始:先确定角色的核心理念
  2. 逐步丰富细节:层层添加具体特征
  3. 检查逻辑一致性:确保所有元素协调
  4. 预留发展空间:为故事发展留有余地
  5. 迭代更新:随着写作进展更新档案

增强功能 (v1.1+)

概述

从v1.1版本开始,工具增加了LoreBible管理和冲突检测功能,帮助作者维护统一的故事设定宇宙。

核心功能

1. LoreBible目录管理

  • 工作目录支持:使用--workspace参数指定LoreBible工作目录
  • 自动目录创建:自动创建00_Prepare02_LoreBible/Characters等标准目录结构
  • 现有角色扫描:自动扫描和解析现有角色档案,构建角色索引

2. 冲突检测

  • 重复角色检测:检测姓名重复或高度相似的角色
  • 常识校验:检查年龄合理性、时间线一致性等常识错误
  • 关系冲突检测:检测角色关系中的矛盾和不一致
  • 冲突报告:生成详细的冲突报告和建议解决方案

3. 会话管理

  • 临时文件系统:用户确认前在00_Prepare目录保存临时档案
  • 用户确认流程:交互式展示冲突,用户确认后移动到最终目录
  • 会话状态持久化:支持断点续传,自动清理过期会话

4. 子代理工作流

  • 任务分解:将角色创建过程分解为原子任务
  • 依赖管理:自动处理任务依赖关系
  • 错误恢复:任务失败时自动重试,提供详细错误报告

使用方法

命令行增强模式

# 基本用法(传统模式)
python scripts/generate_profile.py --name "张三" --age "25" --gender "男"

# 增强模式(推荐)
python scripts/generate_profile.py --name "李四" --age "30" --workspace "/path/to/lorebible"

# 跳过用户确认
python scripts/generate_profile.py --name "王五" --workspace "/path/to/lorebible" --no-confirm

# 指定模板类型
python scripts/generate_profile.py --name "赵六" --type "protagonist" --workspace "/path/to/lorebible"

目录结构

工作目录/
├── 00_Prepare/           # 临时档案目录
├── 01_Research/          # 研究资料目录(可选)
└── 02_LoreBible/
    ├── Characters/       # 最终角色档案目录
    ├── Locations/        # 地点设定目录(可选)
    ├── Organizations/    # 组织设定目录(可选)
    └── Timeline/         # 时间线目录(可选)

子代理工作流

# 运行完整工作流
python scripts/subagent_orchestrator.py "/path/to/lorebible" "character_creation"

# 运行快速创建模式
python scripts/subagent_orchestrator.py "/path/to/lorebible" "quick_creation"

配置文件

校验规则配置 (config/validation_rules.json)

{
  "rules": [
    {
      "id": "age_realistic",
      "name": "年龄合理性",
      "description": "检查年龄是否在合理范围内",
      "condition": "age.isdigit() and not (0 \x3C= int(age) \x3C= 150)",
      "severity": "warning"
    }
  ]
}

工作流配置 (config/workflow_tasks.json)

{
  "workflows": {
    "character_creation": {
      "name": "角色创建工作流",
      "tasks": [
        {
          "id": "init_workspace",
          "name": "初始化工作空间",
          "agent_type": "lore_bible_manager"
        }
      ]
    }
  }
}

新脚本模块

  1. lore_bible_manager.py - LoreBible目录管理和角色扫描
  2. conflict_detector.py - 冲突检测和常识校验
  3. profile_session.py - 会话管理和用户确认流程
  4. subagent_orchestrator.py - 子代理工作流协调

向后兼容性

  • 传统模式:不指定--workspace参数时,使用传统生成模式
  • 交互模式:增强模式也支持交互式创建
  • 输出文件:传统模式输出到当前目录,增强模式输出到LoreBible目录

故障排除

常见问题

  1. 导入错误:确保所有新脚本文件在scripts/目录中
  2. 目录权限:确保工作目录有读写权限
  3. 配置文件缺失config/目录需要包含validation_rules.jsonworkflow_tasks.json

日志查看

启用详细日志:

import logging
logging.basicConfig(level=logging.DEBUG)

未来计划

  • 图形用户界面支持
  • 云同步功能
  • AI辅助角色生成
  • 跨作品角色库管理

版本历史:

  • v1.0 (初始版本): 基础角色档案生成功能
  • v1.1 (当前版本): LoreBible管理、冲突检测、会话管理、子代理工作流
Usage Guidance
This skill appears to implement the stated character-profile and LoreBible management features, but it operates on the user's filesystem and can create/move files. Before installing or allowing autonomous invocation: 1) Inspect scripts locally (especially lore_bible_manager.py, profile_session.py, conflict_detector.py) for any eval/exec of config strings or unexpected network calls; 2) Run the code in a sandbox or test workspace (not your home directory) to confirm behavior; 3) Avoid using or exposing --no-confirm until you trust the code — prefer interactive confirmation; 4) If you plan to point --workspace at an existing directory, make a backup first; 5) If you need higher assurance, ask the author for a package with explicit dependency and import paths and/or a minimal reproducible example demonstrating safe rule evaluation. If you want, I can scan the remaining truncated script sections for eval/exec or network usage and highlight exact lines of concern.
Capability Analysis
Type: OpenClaw Skill Name: character-profile-cn Version: 1.0.0 The skill bundle contains critical Remote Code Execution (RCE) vulnerabilities due to the use of `eval()` on externally configurable strings. Specifically, `scripts/conflict_detector.py` evaluates `rule.condition` from `config/validation_rules.json`, and `scripts/subagent_orchestrator.py` evaluates `condition` from `config/workflow_tasks.json`. An attacker able to modify these configuration files could execute arbitrary Python code. Additionally, `subagent_orchestrator.py` dynamically loads modules and classes based on `config/workflow_tasks.json`, further increasing the attack surface. While these are severe vulnerabilities, there is no clear evidence of intentional malicious behavior (e.g., data exfiltration, persistence) within the provided code, aligning with the 'suspicious' classification for vulnerabilities.
Capability Assessment
Purpose & Capability
The code files (profile generator, conflict detector, lore-bible manager, session manager, analyze/validate scripts) match the declared purpose of creating, validating, scanning, and managing character profiles. Templates, example assets, and workflow configs are coherent with a fiction-authoring tool.
Instruction Scope
SKILL.md explicitly tells the agent to 'access user work directory and switch to that directory' and the enhanced features scan existing profiles, create directories, save temp files, and can move files into a final Characters directory. These behaviors are plausible for a workspace manager, but they require filesystem read/write access to user paths. The documented --no-confirm / non-interactive options allow writing/moving files without user confirmation, increasing risk if invoked incorrectly.
Install Mechanism
No install spec is declared (instruction-only at registry level), so risk from downloads is low. However the package contains many Python scripts (no packaging/install specification), so running the skill will depend on executing local Python code. There is no declared dependency management or sandboxing — users should expect to run Python scripts from the repo.
Credentials
The skill requests no environment variables or external credentials, which is proportionate. A possible concern: validation rules/config include condition strings (e.g., 'age.isdigit() and not (0 <= int(age) <= 150)') that the code may evaluate at runtime — if the code evaluates condition text from config, a modified rules file could cause execution of arbitrary expressions. Review how rules/conditions are evaluated before trusting unvetted rule files.
Persistence & Privilege
always:false and no claimed modification to other skills. The skill legitimately writes files within a user-specified workspace and persists session state; this is expected. Still, the ability to run non-interactively (--no-confirm) and to create/modify directories in arbitrary paths increases the blast radius if the agent is invoked without careful workspace restrictions.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install character-profile-cn
  3. After installation, invoke the skill by name or use /character-profile-cn
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
Initial release
Metadata
Slug character-profile-cn
Version 1.0.0
License
All-time Installs 6
Active Installs 6
Total Versions 1
Frequently Asked Questions

What is Novel Character Profile Builder?

Novel Character Profile Builder (小说人物档案创建工具) — A bilingual CN/EN skill for creating structured, detailed character profiles for fiction writing. Generates co... It is an AI Agent Skill for Claude Code / OpenClaw, with 815 downloads so far.

How do I install Novel Character Profile Builder?

Run "/install character-profile-cn" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Novel Character Profile Builder free?

Yes, Novel Character Profile Builder is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Novel Character Profile Builder support?

Novel Character Profile Builder is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Novel Character Profile Builder?

It is built and maintained by q7766206 (@q7766206); the current version is v1.0.0.

💬 Comments