mirror of
https://github.com/tiennm99/miti99.git
synced 2026-09-18 18:26:38 +00:00
Switches every call site to `node scripts/newsletter` and, in the same pass, fixes three structural problems in the skill layer. The seven subcommands were spelled out in five files; they are now enumerated once in docs/newsletter/engine-commands.md, and every other mention is a link except where a skill inlines the one or two commands it actually invokes. The shared post mechanics move out of mt-add-url's directory into docs/newsletter/, so no skill owns another skill's documentation and both runtimes reach it by a repository-relative path. The Codex adapters become symlinks to their canonical counterparts, which removes the parallel frontmatter that could drift. Two skills are renamed for a uniform mt-<verb>-<object> scheme: mt-add-post becomes mt-add-article, since it adds an article to a post, and mt-webfetch becomes mt-fetch-url. The other four already conformed. Note that $mt-add-post and mt-webfetch no longer resolve; no alias directories are left behind, because two names for one skill is the duplication this change removes. Trigger wording in the frontmatter descriptions is left alone apart from the renamed tokens and the corrected fetch-tier summary: those strings are how the runtimes decide whether to invoke a skill. Setup documentation now states the npm ci prerequisite. The engine has dependencies, so unlike its predecessor it does not run on a bare clone.
3.3 KiB
3.3 KiB
Multi-tool usage (Claude Code · OpenCode · Codex)
This repo is usable from three AI coding tools off one shared engine. The newsletter engine lives in scripts/newsletter/ (Node ESM) and every tool calls it as node scripts/newsletter <command> from the repo root — the commands are documented once in newsletter/engine-commands.md. Project instructions live once in AGENTS.md.
Per-tool setup & invocation
| Tool | Instruction file | How the workflow surfaces | Setup | Invocation example |
|---|---|---|---|---|
| Claude Code | CLAUDE.md → imports AGENTS.md |
Native skill auto-dispatch from .claude/skills/ |
npm ci once |
Paste a URL; mt-add-url auto-runs |
| OpenCode | AGENTS.md (auto-read) |
.claude/skills/ auto-discovered via the skill tool, governed by opencode.json |
npm ci once; opencode.json is committed |
Ask to add a URL; pick/skill mt-add-url |
| Codex | AGENTS.md (auto-read) |
Repository skills discovered from .agents/skills/ |
npm ci once |
Ask to add a URL or invoke $mt-add-url |
Shared engine: all three call node scripts/newsletter <command> from repo root — no per-tool script copies. It has npm dependencies, so run npm ci once after cloning.
Notes per tool
- Claude Code —
CLAUDE.mdis a thin file that importsAGENTS.md(@AGENTS.md); all instruction content lives inAGENTS.md. Permissions in.claude/settings.json. - OpenCode — reads
.claude/skills/<name>/SKILL.mdnatively (multi-location search up the worktree), so the samemt-*skills work with zero duplication.opencode.jsonmirrors the Claude allow-list intent (node/git/hugo/edit). No MCP block — relies on OpenCode's built-in web fetch/search. Restart OpenCode after editingopencode.json(config is not hot-reloaded). - Codex — reads repository skills from
.agents/skills/and can invoke them explicitly ($mt-add-url) or implicitly from their descriptions. Each.agents/skills/<name>/SKILL.mdis a symlink to its.claude/skills/counterpart, so there is one file to edit and nothing that can drift. If a checkout cannot follow symlinks (Windows without developer mode), replace them with thin pointer files that say "read and follow.claude/skills/<name>/SKILL.md".
Teardown — pick one, remove the rest
Once you commit to one tool, delete the others' config:
- Keep Claude Code only → remove
opencode.jsonand.agents/. Keep.claude/anddocs/newsletter/. - Keep OpenCode only → remove
.claude/settings*.jsonand.agents/. Keep.claude/skills/— OpenCode reads it. If you want to drop the.claude/dir entirely, first move skills to.opencode/skills/(scripts are path-neutral inscripts/newsletter/, so the move breaks nothing). Optionally makeAGENTS.mdthe only instruction file (deleteCLAUDE.md). - Keep Codex only → keep
.agents/skills/,AGENTS.md,scripts/newsletter/,docs/newsletter/, and the canonical.claude/skills/files the Codex skills symlink to. You may remove Claude-specific settings andopencode.json.
In every case: keep scripts/newsletter/, .claude/skills/, docs/newsletter/, and AGENTS.md — they are the shared engine, canonical workflows, shared documentation, and instructions.