Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

skill-article-publisher

БесплатноЗапускает вложенные скриптыНе проверен

Automate article validation, semantic commit generation, and git publishing for MDX documentation. Validates syntax, runs build checks, creates semantic…

foreveryhот foreveryh★ 18 звёзд на GitHub

Об этом скилле

Article Publisher Automation Guide

This skill automates the complete article publishing workflow: MDX syntax validation, build verification, semantic commit generation, and git push. Use this to ensure documentation quality and maintain consistent git history.


Process

🚀 6-Step Publishing Workflow

This is a comprehensive publishing skill that validates and publishes MDX articles with automated semantic commits and git push.

Phase 1: Identify Target Files

1.1 Determine Article Location

First, identify what needs to be published:

For single article: Provide path to specific .mdx file

content/docs/en/development/my-article.mdx

For multiple articles: Provide directory containing changes

content/docs/en/development/

The skill will automatically detect:

  • New MDX files (added to git)
  • Modified MDX files
  • Multi-language versions (en, zh, fr)
  • File types (skill analysis, tutorials, etc.)

1.2 Review Current Git Status

Before publishing, understand the current state:

Check git status:

git status

Review changes:

git diff --staged

Ensure all MDX files are saved and ready for validation.


Phase 2: Run Validation

2.1 MDX Syntax Validation

Run validation script:

cd .claude/skills/skill-article-publisher
python scripts/validate_mdx.py /path/to/article.mdx

Or validate directory:

python scripts/validate_mdx.py content/docs/en/development/

What it checks:

  • ✅ YAML frontmatter structure
  • ✅ Required fields (title, description, lang)
  • ✅ Unescaped comparison operators (>, <) in text
  • ✅ Common unescaped characters
  • ✅ MDX component tag balance
  • ✅ HTML tag balance

Critical checks for Claude skills:

  • Comparison operators: Always use &gt; and &lt; instead of > and < in text
    • ❌ Wrong: >80% accuracy
    • ✅ Correct: &gt;80% accuracy
  • Frontmatter: Must have title, description, lang fields
  • Lang codes: Should be en, zh, or fr for standard Claude skills

2.2 Build Validation (Optional but Recommended)

Run build to verify MDX compilation:

npm run build

Why this matters:

  • Primary validation: Build catches all MDX syntax errors
  • Verifies MDX components render correctly
  • Ensures imports and dependencies work
  • Validates TypeScript types if applicable

Important note on validation: The MDX validation script focuses on common issues (comparison operators, frontmatter), while complex MDX component syntax validation is best handled by the build process. Always run build validation for complete assurance.

Or use validation script with build:

python scripts/validate_mdx.py content/docs/en/development/article.mdx --build

Build timeout: 5 minutes (adjust in script if needed)

Interpret results:

  • ✅ Build succeeds → MDX syntax is valid
  • ❌ Build fails → Check error messages for issues
  • ⚠️ Build timeout → May indicate large project or problem

Phase 3: Review Validation Results

3.1 Analyze Validation Output

Validation report structure:

MDX VALIDATION REPORT
================================================================================

❌ ERRORS (2):
  File: content/docs/en/development/article.mdx:730
  Error: Unescaped comparison operator found. Use &gt; instead of > in: Typical benchmarks: >80% accuracy

⚠️  WARNINGS (1):
  File: content/docs/en/development/article.mdx:1
  Warning: Lang code "ko" may not be supported.

📊 SUMMARY:
  Files checked: 1
  Files valid: 0
  Errors: 2
  Warnings: 1

❌ Validation failed due to errors

Fix errors before proceeding:

  1. Unescaped operators: Replace > with &gt; and < with &lt;
  2. Missing fields: Add required frontmatter fields
  3. Tag balance: Close any unclosed MDX components
  4. Invalid lang: Change to supported language code

Warnings are acceptable but should be reviewed.

3.2 Run Validation Again

After fixing issues, re-run validation:

python scripts/validate_mdx.py content/docs/en/development/article.mdx

Continue until: "All files passed validation"


Phase 4: Generate Commit Message

4.1 Detect Change Types

The publisher automatically detects:

Change type from file path:

  • analyzing-mcp-builder → feat (new skill analysis)
  • analyzing-skill-name → feat (skill analysis)
  • tutorial-* → docs (documentation/tutorial)
  • Other patterns → docs (default)

Change type from branch:

  • feature/* → feat
  • fix/* → fix
  • docs/* → docs
  • main → docs (default)

4.2 Multi-Language Detection

Languages detected from path:

  • /en/ → English
  • /zh/ → Chinese
  • /fr/ → French

Single file:

feat: publish analyzing-mcp-builder (en, zh, fr)

Multiple files:

feat: publish multiple articles (3 skill-analysis, 2 tutorial)

skill-analysis: analyzing-mcp-builder, analyzing-webapp-testing
tu
Полный SKILL.md на GitHub

Установить skill-article-publisher в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

README.mdexamples/publish-mcp-builder-output.mdreferences/semantic-commit-guide.mdscripts/publish_article.pyscripts/validate_mdx.py

FAQ

Что делает скилл skill-article-publisher?

Automate article validation, semantic commit generation, and git publishing for MDX documentation. Validates syntax, runs build checks, creates semantic commits, and pushes to remote repositories.

Как установить скилл skill-article-publisher?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл skill-article-publisher запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить skill-article-publisher с