foreshadowing-system

foreshadowing-system is a skill for Claude Code, Codex from LiPu-jpg/Openwrite. It costs 52 tokens per session (1,004 once invoked), scanned A, original, Apache-2.0.

A system for tracking foreshadowing in novels. Foreshadowing means placing a clue or unresolved question earlier in a story and addressing it later.

In plain words
What is it for?
Use it to create, list, update, and validate story clues, including main plot threads, side threads, and easter eggs.
Why use it?
It helps writers see which clues are waiting to be resolved, which have been resolved, and which were abandoned, while checking how they connect.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create, list, update, and validate story clues, including main plot threads, side threads, and easter eggs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lipu-jpg/openwrite/foreshadowing-system
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LiPu-jpg/Openwrite --skill foreshadowing-system
Clone the repo
git clone --depth 1 https://github.com/LiPu-jpg/Openwrite

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for foreshadowing-system

README.md
[![agentmods](https://agentmods.dev/badge/skills/lipu-jpg/openwrite/foreshadowing-system/github.svg)](https://agentmods.dev/skills/lipu-jpg/openwrite/foreshadowing-system)
Your own site
<a href="https://agentmods.dev/skills/lipu-jpg/openwrite/foreshadowing-system"><img src="https://agentmods.dev/badge/skills/lipu-jpg/openwrite/foreshadowing-system/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for foreshadowing-system

Your own site · 80×15
<a href="https://agentmods.dev/skills/lipu-jpg/openwrite/foreshadowing-system"><img src="https://agentmods.dev/badge/skills/lipu-jpg/openwrite/foreshadowing-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,004 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.01004
Opus 5.5 $0.00021 $0.00402
Sonnet 5.5 $0.00010 $0.00201
Haiku 4.5 $0.00005 $0.00100

Measured 1mo ago against content hash ff4638e801fd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

foreshadowing-system scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

presets/goethe/skills/foreshadowing-system/SKILL.md · 125 lines

What it actually says

伏笔管理系统

管理小说中的伏笔和悬念,确保故事线索连贯。

核心概念

伏笔(foreshadowing)是作者在前面章节埋下的线索,后面再回收。

伏笔状态:

  • 埋伏 - 已埋下,等待回收
  • 待收 - 即将回收
  • 已收 - 已回收
  • 废弃 - 放弃的伏笔

伏笔层级:

  • 主线 - 核心剧情伏笔
  • 支线 - 次要剧情伏笔
  • 彩蛋 - 趣味小彩蛋

可用工具

工具 说明
create_foreshadowing 创建伏笔节点
list_foreshadowing 列出伏笔
update_foreshadowing 更新伏笔状态
validate_foreshadowing 验证伏笔DAG

使用示例

创建伏笔

用户: 在第三章埋一个伏笔,关于主角的神秘身世

AI: 好的,我来创建一个主线伏笔。
[COMMAND] create_foreshadowing {
  "node_id": "f001",
  "content": "主角发现自己体内有一道封印的神秘力量",
  "weight": 9,
  "layer": "主线",
  "created_at": "ch_003",
  "target_chapter": "ch_015"
}

结果: ✅ 伏笔已创建
- ID: f001
- 内容: 主角发现自己体内有一道封印的神秘力量
- 权重: 9
- 层级: 主线
- 预期回收: 第15章

查看待回收伏笔

用户: 有哪些待回收的伏笔?

AI: 让我查询一下...
[COMMAND] list_foreshadowing {
  "status": "待收",
  "min_weight": 5
}

结果:
- f001: 主角身世之谜 (权重9, 主线)
- f003: 师父的秘密 (权重7, 主线)
- f005: 神秘玉佩 (权重6, 支线)

更新伏笔状态

用户: 第八章回收了 f003 的伏笔,更新状态

AI: 好的
[COMMAND] update_foreshadowing {
  "node_id": "f003",
  "status": "已收"
}

结果: ✅ f003 状态已更新为「已收」

验证伏笔DAG

用户: 检查伏笔有没有问题

AI: 让我验证一下伏笔图...
[COMMAND] validate_foreshadowing {}

结果:
- ✅ DAG有效,无环
- ✅ 无孤立引用
- ⚠️  提示: 有3个伏笔超期未收

创建伏笔的时机

在写作时,AI 应该主动识别并建议创建伏笔:

  1. 建立悬念时 - "主角做了一个奇怪的梦..."
  2. 引入神秘元素时 - "某个配角的来历不明..."
  3. 埋下线索时 - "桌上放着一封未拆的信..."
  4. 暗示未来事件时 - "天气预报说三天后会下大雨..."

伏笔设计原则

  1. 可识别性 - 伏笔要能被读者注意到
  2. 合理性 - 回收时要有合理的解释
  3. 权重分配 - 重要伏笔高权重,主线权重≥7
  4. 时机控制 - 埋设和回收之间要有足够铺垫

DAG验证规则

  1. 无环 - 伏笔之间不能循环依赖
  2. 有向 - 边必须从伏笔指向回收点
  3. 可达 - 每个待收伏笔必须有明确的回收章节
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 125 lines · 52 tokens per session scan A ff4638e801fd

Subscribe to this mod's changes

foreshadowing-system is a skill published in the GitHub repository LiPu-jpg/Openwrite (872 stars, last pushed yesterday), licensed Apache-2.0. It adds 52 tokens to every session and 1,004 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.