Bgmx

From yjl9903/bgmx · View interactive version

Bgmx is an AI agent skill from the GitHub repository yjl9903/bgmx. Maintain bgmx project data workflows only when the user explicitly invokes $bgmx or explicitly asks Codex to maintain bgmx data. Covers syncing Bangumi subject data, manually creating Bangumi subject revisions, syncing yuc.wiki seasonal calendars, and switching the active online calendar season.

How to use this skill

Skill file

bgmx

Overview

Use this skill for routine bgmx data maintenance. Treat commands that include --update-server,

--update-active, subject revision, or direct bgmw HTTP writes as production-affecting unless the

user points at a local --base-url.

Use bgmx ... in examples. If bgmx is unavailable, use npx --yes bgmx ....

Workflow

  1. Confirm the CLI is available:

```bash

command -v bgmx >/dev/null 2>&1 && bgmx --version || npx --yes bgmx --version

```

  1. Inspect current state before writing:

--base-url.

SECRET=<value>. Prefer .env; do not pass secrets directly on the command line.

  1. Use read-only commands first when possible:
  1. After writing, run the narrow verification command for the affected workflow and summarize the

command output.

Sync Bangumi Subjects

Use this when the user asks to refresh bgmx subject data from Bangumi.

```bash

bgmx sync bangumi --update-server

```

.env:

```bash

bgmx sync bangumi

```

After syncing, inspect the log for unknown subjects and failures. If the user asks for a release or

PR, mention the sync count and any error count.

Manage Subject Revisions

Use revisions for manual corrections to a bgmx subject's search behavior. The CLI is interactive.

  1. Inspect the currently effective subject and enabled revisions:

```bash

bgmx subject <subject_id>

```

  1. Create a revision:

```bash

bgmx subject revision <subject_id>

```

  1. Choose one of the supported fields:
  1. For set fields, choose set.add, set.delete, or field.set. For before/after, enter a

parseable datetime.

  1. List all revisions, including disabled revisions:

```bash

bgmx subject revision list <subject_id>

```

  1. Enable or disable an existing revision:

```bash

bgmx subject revision enable <subject_id> <revision_id>

bgmx subject revision disable <subject_id> <revision_id>

```

  1. Permanently delete a revision only when the user explicitly asks for deletion:

```bash

bgmx subject revision delete <subject_id> <revision_id>

```

Prefer small, targeted revisions. Do not edit database rows directly unless the user explicitly asks

for a migration or repair.

Sync And Switch Calendar

Use this section only for calendar update work: importing a yuc.wiki season, resolving Bangumi

subject ids, uploading the calendar, marking a season active, or cancelling an active season.

Update And Activate A Calendar

  1. Generate an initial yuc calendar session file in a draft directory without .env, so it cannot

upload. Use an explicit session file name so it can be reviewed and edited:

```bash

bgmx sync yuc \

--year 2026 \

--month 7 \

--session yuc-2026-07.yaml

```

  1. Read the generated session file. Find every calendar item whose id is missing or -1.
  2. Infer missing Bangumi subject ids using the available tools:
  1. Update the session file with resolved Bangumi subject ids.
  2. Report the complete calendar before uploading. Include every animation in the season and its

Bangumi subject id, grouped by weekday and web/ONA.

  1. Wait for the user to confirm the reported calendar.
  2. Upload the confirmed calendar and mark the season active:

```bash

bgmx sync yuc \

--year 2026 \

--month 7 \

--session yuc-2026-07.yaml \

--update-server \

--update-active

```

  1. Verify the uploaded season:

```bash

bgmx calendar --season 2026-07

```

Calendar seasons use yyyy-MM where MM is 01, 04, 07, or 10. sync yuc derives this

season from explicit --year and --month; when both are omitted and --session is set, it derives

them from the session file name, with or without the hyphen between year and month.

Cancel An Active Calendar

Use this when the user asks to deactivate a season without deleting its calendar data.

  1. Confirm the target season:

```bash

bgmx calendar --season 2026-07

```

  1. Mark it inactive:

```bash

bgmx sync yuc \

--year 2026 \

--month 7 \

--session yuc-2026-07.yaml \

--update-server \

--no-update-active

```

  1. Verify active calendar state:

```bash

bgmx calendar

bgmx calendar --season 2026-07

```

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.