mirror of
https://github.com/tiennm99/miti99.git
synced 2026-09-18 18:26:38 +00:00
Extract newsletter scripts to a neutral scripts/newsletter/ engine and add side-by-side support for all three AI coding tools off one source of truth. - Move 9 scripts + substack config from .claude/skills/**/scripts to scripts/newsletter/ (history preserved); fix PROJECT_ROOT depth and cross-require/config paths; repoint all SKILL.md invocations - Add canonical AGENTS.md; reduce CLAUDE.md to an @AGENTS.md import - Add opencode.json (permissions, no MCP); skills auto-discovered in place - Add codex/prompts/*.md (6 prompts) + copy installers (install.sh/.ps1) - Add docs/multi-tool-usage.md (setup, per-tool invocation, teardown) + README pointer
49 lines
1.9 KiB
Markdown
49 lines
1.9 KiB
Markdown
---
|
|
description: Add an article/blog URL to today's newsletter main content (Vietnamese summary)
|
|
argument-hint: <article-url>
|
|
---
|
|
|
|
# Add an article to the newsletter (article handler)
|
|
|
|
Given a clean article/blog URL, extract its content, write a Vietnamese summary, and insert it into today's newsletter main content. Does not classify/route — for YouTube/images/other use `/prompts:mt-add-url`.
|
|
|
|
Article URL: `$ARGUMENTS`
|
|
|
|
Shared scripts: `scripts/newsletter/` (run from repo root). Shared procedure: `.claude/skills/mt-add-url/references/newsletter-post-mechanics.md` — follow it for all post mechanics.
|
|
|
|
## Input
|
|
If a raw URL is given directly, clean/dedup it first:
|
|
```bash
|
|
node scripts/newsletter/add-url.js "<url>"
|
|
```
|
|
Trust `route: article`; skip if `duplicate` or not `accessible`.
|
|
|
|
## Workflow
|
|
1. **Post mechanics** — follow `.claude/skills/mt-add-url/references/newsletter-post-mechanics.md` to find/create today's post and (if new) get the newsletter number + apply the template.
|
|
2. **Extract** the article title and main content.
|
|
3. **Summarize in Vietnamese** — 1-2 paragraphs, max 300 words, professional tone for junior developers. Optionally 3-5 key points.
|
|
4. **Insert** the main-content block **before** the `### Bonus` section (or append at end if no Bonus yet — do not create an empty Bonus):
|
|
```markdown
|
|
## [Tiêu đề bài viết](clean_url)
|
|
|
|
[Tóm tắt tiếng Việt — tối đa 300 từ]
|
|
|
|
**Điểm chính:**
|
|
- [Ý chính 1]
|
|
- [Ý chính 2]
|
|
```
|
|
5. **Report:**
|
|
```
|
|
✅ Article added to Newsletter #[number]
|
|
📄 content/post/YYYY/MM/DD/index.md
|
|
🔗 [clean_url]
|
|
```
|
|
|
|
## Checklist
|
|
- [ ] Valid Hugo front matter (if post created) with correct date
|
|
- [ ] Title `"Newsletter #[number]"` (if created)
|
|
- [ ] Tags include `"AI-Assisted"`
|
|
- [ ] URL is clean (no tracking params)
|
|
- [ ] Vietnamese content ≥99%, grammar correct
|
|
- [ ] Article inserted before the Bonus section
|