一键导入
nm-material
小说素材流水线管理:ingest、analyze、sync、delete、classify。仅当用户明确说出"使用 nm-material"或"启动 nm-material"时触发。不适用于任何隐式场景。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
小说素材流水线管理:ingest、analyze、sync、delete、classify。仅当用户明确说出"使用 nm-material"或"启动 nm-material"时触发。不适用于任何隐式场景。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
分析 git 变更并生成规范的 commit message,遵循 Conventional Commits 格式和中文结构化正文。 自动过滤 AI 供应商文案。仅当用户明确说出"使用 commit-msg"时触发。
引导创建符合团队约定的 SKILL.md 文件。 仅当用户明确说出"使用 my-create-skill"或"启动 my-create-skill"时触发。 不适用于任何隐式场景。
复杂任务前先规划执行策略,明确步骤、依赖、风险。仅当用户明确说出"使用 plan-first"或"启动 plan-first"时触发。不适用于任何隐式场景。
以 agent 对话为主扫描源,git 提交和反馈归档为验证补充,发现可复用的高频模式。 不预设模式类型,让模式自然浮现,所有候选由用户判断价值。 仅当用户明确说出"使用 skill-discovery"或"启动 skill-discovery"时触发。 不适用于任何隐式场景。
使用 nm-search 或启动 nm-search 时,用于检索小说素材参考;不适用于未显式点名该 Skill 的普通搜索请求。
分析指定改动的上下游影响,追踪调用链,发现潜在缺陷和隐患。仅当用户明确说出"使用 code-review-change"或"启动 code-review-change"时触发。不适用于任何隐式场景。
| name | nm-material |
| description | 小说素材流水线管理:ingest、analyze、sync、delete、classify。仅当用户明确说出"使用 nm-material"或"启动 nm-material"时触发。不适用于任何隐式场景。 |
小说素材管理中枢,覆盖导入、LLM 分析、数据库同步、分类、删除。
此 skill 仅通过显式调用触发。
必须同时满足:
| Goal | Command | Notes |
|---|---|---|
| Full pipeline | nm pipeline full <file.txt> | One-shot: ingest → analyze → sync |
| Resume pipeline | nm pipeline continue <material_id> | Resume from breakpoint |
| Import analyzed | nm material import <dir> | Skip LLM, direct import |
| Classify materials | nm material classify start --limit N | Batch genre classification |
| Delete material | nm material delete --id <id> --force | Destructive, irreversible |
批量对未入库素材进行 genre 分类,用于按需入库筛选。
| Command | Description |
|---|---|
nm material classify status | 查看分类进度统计 |
nm material classify start --limit N | 启动分类任务(可限制数量) |
nm material classify retry --seq N | 重试指定 sequence |
nm material classify retry --failed | 重试所有失败条目 |
nm material classify clean | 清空进度,重新开始 |
| File | Purpose |
|---|---|
data/classify_progress.yaml | 进度控制(断点恢复、失败列表) |
data/material_index.yaml | 分类结果(genre、elements、style、quality) |
分类结果包含以下维度:
| Field | Description |
|---|---|
genre_primary | 一级题材(从数据库动态加载) |
genre_secondary | 二级题材(可选) |
genre_description | 题材描述 |
elements | 核心元素(如:重生、系统、逆袭) |
elements_description | 元素特点描述 |
style | 风格基调(narrative、tone、pace) |
quality | 质量评分(writing、plot、character、score) |
confidence | 分类置信度(0.0-1.0) |
分布式采样(约 0.5% 章节):
最少 3 章,最多 30 章,每章最多 1500 字。
# 分类前 50 本
nm material classify start --limit 50
# 查看进度
nm material classify status
# 分类全部(约 23 小时)
nm material classify start
Stage order: ingest → analyze → outline → worldbuilding → characters → tags → refine → sync
| Stage | Command | Input | Output |
|---|---|---|---|
| Ingest | nm pipeline ingest <file.txt> | Raw .txt | source.txt, chapter_index.yaml |
| Analyze | nm pipeline analyze <material_id> | chapter_index.yaml | chapters.yaml, embeddings |
| Outline | nm pipeline outline <material_id> | chapters.yaml | outline/structure.yaml |
| Worldbuilding | nm pipeline worldbuilding <material_id> | chapters.yaml | worldbuilding/*.yaml |
| Characters | nm pipeline characters <material_id> | chapters.yaml | characters/profiles/*.yaml |
| Tags | nm pipeline tags <material_id> | source.txt | tags.yaml |
| Refine | nm pipeline refine <material_id> | all YAML | Updated statistics |
| Sync | nm storage sync <material_id> | All YAML + vectors | PostgreSQL |
nm pipeline status <material_id>
Shows completed/pending stages and suggests next command.
Use for migrating from other instances, importing annotated materials, or restoring backups.
nm material import <directory>
Requirements:
data/schemas/meta.yaml and chapter_index.yamltags tablenm material delete --id <material_id> --force
Deletes:
data/novels/{material_id}/ entire directorydata/index.yamlSafety rules:
.env configured with LLM_API_KEY (for analyze stages).env configured with DATABASE_URL (for sync stage)nm storage init-db)After nm pipeline full:
data/novels/{material_id}/chapter_index.yaml exists with chapters > 0data/novels/{material_id}/chapters.yaml exists as non-empty listdata/novels/{material_id}/meta.yaml shows status: indexed| Symptom | Cause | Action |
|---|---|---|
| "未检测到章节名" | Non-standard chapter format | Check file for unusual chapter titles |
| API connection error | Network issue | Auto-retry, no manual intervention needed |
| Mid-crash | Rate limiting etc. | Run nm pipeline continue - resumes from breakpoint |