ソース情報
- リポジトリ
- Uo1428/cordmine
- ソースの最終更新活動
- 2026年8月16日 14:56
- 検出された SKILL.md の言語
- 英語
- スター
- 6
- フォーク
- 0
インストール方法
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
ソースファイルを確認
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
メニュー
デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。
インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
直接コマンドでは確認用 Prompt が省略されます。実行前にソースを確認してください。
npx skills add https://github.com/Uo1428/cordmine --skill cordmineコマンドは1行のまま表示されます。コピー前に横へスクロールして全体を確認してください。
ローカルで確認しますか?SkillsMP が現在取得できるファイルをダウンロードできます。
SKILL.md を表示中
| name | cordmine |
| description | Discord archive CLI: search, sync freshness, DMs, summaries, repo/release work. |
Use local Discord archive data first for Discord questions. Hit Discord APIs
only when the archive is stale, missing the requested scope, or the user asks
for current external context. Drive everything through the cordmine CLI —
it is the agent-facing interface.
cordmine (Bun-first, zero runtime deps) — run via bunx cordmine<dataDir>/cordmine/cordmine.db (override via
CORDMINE_DB env or --db); on Windows
%LOCALAPPDATA%\cordmine\cordmine.dbDISCORD_BOT_TOKEN), never in filesbunx cordmine sync --guild <guild_id> # backfill (--full for history)
bunx cordmine search "query" --limit 20 --json # FTS search
bunx cordmine sql "select count(*) from messages" --json # read-only SQL
bunx cordmine status --json # archive health/counts
bunx cordmine coverage --json # per-channel coverage
bunx cordmine messages --channel general --limit 50
bunx cordmine channels --json
bunx cordmine members search alice
bunx cordmine digest --json
bunx cordmine embed # drain embedding queue
bunx cordmine version
CORDMINE_DB env or --db <path>CORDMINE_GUILDS env (comma-separated) or --guild / --guilds--token > --token-env NAME > DISCORD_BOT_TOKEN
(shell env or .env, which Bun auto-loads)--json for machine parsingSync flags:
bunx cordmine sync --full --guild <guild_id> \ # full history backfill
--exclude-channel <id> \ # skip channels
--exclude-kind forum,announcement \ # skip kinds (names or numbers)
--ignore-bots # skip bot/webhook messages
--with-embeddings # queue embeddings during sync
For recent/current questions, check freshness before analysis:
bunx cordmine status --json
bunx cordmine coverage --json
Precise freshness from the default database:
bunx cordmine sql "select coalesce(max(created_at),'') as newest from messages;"
Use --full only for deliberate historical backfills:
bunx cordmine sync --full --guild <guild_id>.
If SQLite reports busy/locked, check for stray bun processes holding the WAL before retrying.
search / messages for slices; use sql for exact counts.Useful SQL:
bunx cordmine sql "select count(*) as messages from messages;" --json
bunx cordmine sql "select coalesce(nullif(c.name,''), m.channel_id) as channel, count(*) as messages from messages m left join channels c on c.id = m.channel_id group by m.channel_id order by messages desc limit 20;" --json
bunx cordmine sql "select coalesce(nullif(mm.display_name,''), nullif(mm.global_name,''), nullif(mm.username,''), m.author_id) as author, count(*) as messages from messages m left join members mm on mm.guild_id = m.guild_id and mm.user_id = m.author_id group by m.guild_id, m.author_id order by messages desc limit 20;" --json
sql is read-only: only select / pragma / with queries are allowed.
Search internals: FTS5 (unicode61) over normalized content; query terms are
quoted and AND-joined; a plain LIKE '%x%' scan is ~10,000x slower than the
index (17 s vs <1 ms on 120k messages). Semantic ranking requires
bunx cordmine embed to have run; search --mode hybrid or
--mode semantic selects embedding-based ranking.
Bot-backed sync requires configured Discord bot credentials; do not invent token availability. The CLI never uses user tokens or calls Discord as the user. Archives are local-only; never include secrets if you publish snapshots.
For repo edits, prefer the existing Bun gates:
bun test
bunx tsc --noEmit
Then run a targeted CLI smoke for the touched surface:
CORDMINE_DB=<db> bunx cordmine status --json
CORDMINE_DB=<db> bunx cordmine search "test" --limit 5 --json
CORDMINE_DB=<db> bunx cordmine sql "select count(*) from messages;" --json