ruoyi-plus-soybean: Command for Codex

.codex/prompts/athena-migrate.md

athena-migrate is a command for Codex from m-xlsea/ruoyi-plus-soybean. It costs 0 tokens per session (1,309 once invoked), scanned A, original, MIT.

A command that migrates an AI project’s stored state from version 9.5 to 9.6. It backs up files, reorganises them, and creates a new index.

In plain words
What is it for?
It is for upgrading the project-state directory and moving older state files into the new structure.
Why use it?
It helps preserve project tasks, design notes, reviews, and progress when the storage layout changes between versions.

Command for Codex

Written for Codex: installed under .codex/. Also seen: reads .claude/ paths; mentions Codex.

This is m-xlsea/ruoyi-plus-soybean's own configuration. It tells Codex how to work on ruoyi-plus-soybean itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ruoyi-plus-soybean configures →

Reuse

Borrowing it

Nothing to install: this file belongs to m-xlsea/ruoyi-plus-soybean. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/m-xlsea/ruoyi-plus-soybean/master/.codex/prompts/athena-migrate.md
Clone the repo
git clone --depth 1 https://github.com/m-xlsea/ruoyi-plus-soybean

Made for: 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 athena-migrate

README.md
[![agentmods](https://agentmods.dev/badge/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate/github.svg)](https://agentmods.dev/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate)
Your own site
<a href="https://agentmods.dev/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate"><img src="https://agentmods.dev/badge/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate/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 athena-migrate

Your own site · 80×15
<a href="https://agentmods.dev/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate"><img src="https://agentmods.dev/badge/commands/m-xlsea/ruoyi-plus-soybean/athena-migrate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,309 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.
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.00000 $0.01309
Opus 5 $0.00000 $0.00655
Sonnet 5 $0.00000 $0.00262
Haiku 4.5 $0.00000 $0.00131

Measured 10d ago against content hash dc358fef0e45, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

athena-migrate 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 10d 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.

.codex/prompts/athena-migrate.md · 156 lines

How it starts

The opening of the file, as written. The whole thing — 156 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/athena-migrate (Codex) — v9.5 → v9.6 迁移

参考 CC 版 ~/.claude/skills/athena-migrate/SKILL.md. 算法一致 (因为 schema 跨平台相同, 这是铁律 6).

Codex 端差异:

  • 用 python3 替代 node 生成 _index.md (Codex 默认有 python3)
  • 检测 cx_version 写入 platform_features.cx_version, 不写 cc_version

备份脚本

mkdir -p .ai_state/.legacy-v9.5
cp -r .ai_state/{tasks.md,design.md,progress.md,lessons.md,handoff.md,project.json,reviews,hook-trace.jsonl} .ai_state/.legacy-v9.5/ 2>/dev/null || true

创建 details/

mkdir -p .ai_state/details/reviews .ai_state/details/tasks-archive

平移

[ -f .ai_state/tasks.md ] && mv .ai_state/tasks.md .ai_state/details/tasks-current.md
for f in design.md progress.md lessons.md handoff.md; do
  [ -f .ai_state/$f ] && mv .ai_state/$f .ai_state/details/$f
done
[ -d .ai_state/reviews ] && mv .ai_state/reviews .ai_state/details/reviews
[ -f .ai_state/compact-snapshot.json ] && rm .ai_state/compact-snapshot.json  # Codex 无 compact 也能有的旧文件

生成 _index.md (python3)

python3 << 'PY'
import json, os, re, sys

proj = {}
try:
    with open('.ai_state/.legacy-v9.5/project.json') as f:
        proj = json.load(f)
except FileNotFoundError:
    pass

def count_match(path, pattern):
    try:
        with open(path) as f:
            return len(re.findall(pattern, f.read(), re.MULTILINE))
    except FileNotFoundError:
        return 0

def last_section_line(path, head_prefix='## '):
    try:
        lines = open(path).read().split('\n')
        for i in range(len(lines) - 1, -1, -1):
            if lines[i].startswith(head_prefix):
                return i + 1
    except FileNotFoundError:
        pass
    return 0

def last_nonempty_line(path):
    try:
        lines = open(path).read().split('\n')
        for i in range(len(lines) - 1, -1, -1):
            stripped = lines[i].strip()
            if stripped and not stripped.startswith('<!--') and not stripped.startswith('#'):
                return i + 1
    except FileNotFoundError:
        pass
    return 0

tasks_pending = count_match('.ai_state/details/tasks-current.md', r'^- \[ \]')
tasks_done    = count_match('.ai_state/details/tasks-current.md', r'^- \[x\]')
progress_n    = last_nonempty_line('.ai_state/details/progress.md')
lessons_lines = count_match('.ai_state/details/lessons.md', r'^## ')
latest_lesson_line = last_section_line('.ai_state/details/lessons.md')

reviews = []
try:
    reviews = [f for f in os.listdir('.ai_state/details/reviews') if re.match(r'^sprint-\d+\.md$', f)]
except FileNotFoundError:
    pass
reviews_count = len(reviews)
latest_review = ''
if reviews:
    latest_review = 'details/reviews/' + sorted(reviews, key=lambda f: int(re.search(r'\d+', f).group()))[-1]

content = f'''---
schema_version: "9.6"
athena_version: "9.6.0"
project:
  path: "{proj.get('path','')}"
  stage: "{proj.get('stage','')}"
  sprint: {proj.get('sprint', 0)}
  active_goal: ""
counts:
  tasks_pending: {tasks_pending}
  tasks_done: {tasks_done}
  tasks_blocked: 0
  lessons_lines: {lessons_lines}
  progress_entries: {progress_n}
  reviews_count: {reviews_count}
pointers:
  latest_progress: "{('details/progress.md#L' + str(progress_n)) if progress_n else ''}"
  latest_review: "{latest_review}"
  latest_lesson: "{('details/lessons.md#L' + str(latest_lesson_line)) if latest_lesson_line else ''}"
  latest_proposal: ""
fingerprints:
  tasks_mtime: 0
  design_mtime: 0
  progress_mtime: 0
  lessons_mtime: 0
platform_features:
  cc_version: ""
  cx_version: ""
  goal_supported: false
  batch_supported: false
  background_supported: false
  session_memory_active: false
  cross_session_memory: "none"
gotchas: {json.dumps(proj.get('gotchas', []))}
conventions: {json.dumps(proj.get('conventions', []))}
tech_stack: "{proj.get('tech_stack','')}"
test_cmd: "{proj.get('test_cmd','')}"
build_cmd: "{proj.get('build_cmd','')}"
lint_cmd: "{proj.get('lint_cmd','')}"
dev_cmd: "{proj.get('dev_cmd','')}"
---

# 项目状态索引 (v9.6 migrated from v9.5.5)

## 最近活动

## 当前阻塞

## 下一动作 (PACE 建议)

## 反思建议 (Hook 沉淀)
'''

with open('.ai_state/_index.md', 'w') as f:
    f.write(content)
print('[migrate] _index.md generated')
PY

Read the full file on GitHub · 156 lines

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. 10d ago First seen · 156 lines · 0 tokens per session scan A dc358fef0e45

Subscribe to this mod's changes

athena-migrate is a command published in the GitHub repository m-xlsea/ruoyi-plus-soybean (325 stars, last pushed 2mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,309 tokens. 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-09-01.