Aller au contenu
Skillpedia
Rédaction27k · #9956

baoyu-format-markdown

Ce qu’il fait

Cette compétence rend les longs textes plus faciles à parcourir en ajoutant de la structure et de l'emphase. Elle s'adresse aux rédacteurs dont le contenu est difficile à lire en un seul bloc.

Quand l’utiliser

  • ✓Quand vous avez un brouillon en texte brut qui a besoin d'intertitres et de listes.
  • ✓Quand vous voulez que les points clés d'un article soient faciles à repérer.
  • ✓Quand vous devez nettoyer un fichier markdown avant publication.

Lien du skill

https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-format-markdown/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/JimLiu/baoyu-skills/blob/main/skills/baoyu-format-markdown/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Mettez en forme cet article pour qu'il soit plus facile à parcourir, avec des intertitres et des points clés en gras.”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'agent ajoute un en-tête de métadonnées, un titre, un résumé, des intertitres et de l'emphase, corrige les coquilles évidentes, puis enregistre le résultat dans un nouveau fichier.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Markdown Formatter

Make plain text or markdown scannable so readers grasp key points and structure fast.

Core principle: Only adjust formatting and fix obvious typos. Never add, delete, or rewrite content.

User Input Tools

When this skill prompts the user, follow this tool-selection rule (priority order):

  1. Prefer built-in user-input tools exposed by the current agent runtime — e.g., AskUserQuestion, request_user_input, clarify, ask_user, or any equivalent.
  2. Fallback: if no such tool exists, emit a numbered plain-text message and ask the user to reply with the chosen number/answer for each question.
  3. Batching: if the tool supports multiple questions per call, combine all applicable questions into a single call; if only single-question, ask them one at a time in priority order.

Concrete AskUserQuestion references below are examples — substitute the local equivalent in other runtimes.

Script Directory

{baseDir} = this SKILL.md's directory. ${BUN_X} = bun if installed; else npx -y bun if npx available; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

Script Purpose
scripts/main.ts Main entry point with CLI options (uses remark-cjk-friendly for CJK emphasis)
scripts/quotes.ts Replace ASCII quotes with fullwidth quotes
scripts/autocorrect.ts Add CJK/English spacing via autocorrect

Preferences (EXTEND.md)

First one found wins:

Priority Path Scope
1 .baoyu-skills/baoyu-format-markdown/EXTEND.md Project
2 ${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-format-markdown/EXTEND.md XDG
3 $HOME/.baoyu-skills/baoyu-format-markdown/EXTEND.md User home

None found → use defaults (no first-time setup for this skill).

Setting Values Default Description
auto_select true/false false Skip both title and summary selection, auto-pick best
auto_select_title true/false false Skip title selection only
auto_select_summary true/false false Skip summary selection only
Other — — Default formatting options, typography preferences

Workflow

The agent analyzes and formats (Steps 1-5), then runs the typography script (Step 6).

Step 1: Read & Detect Content Type

Read the file. It is Markdown if it has --- YAML frontmatter, #/##/### headings, or **bold**/*italic*/lists/code blocks/blockquotes; otherwise plain text.

If Markdown, ask:

Detected existing markdown formatting. What would you like to do?

1. Optimize formatting (Recommended)
   - Analyze content, improve headings, bold, lists for readability
   - Run typography script (spacing, emphasis fixes)
   - Output: {filename}-formatted.md

2. Keep original formatting
   - Preserve existing markdown structure
   - Run typography script only
   - Output: {filename}-formatted.md

3. Typography fixes only
   - Run typography script on original file in-place
   - No copy created, modifies original file directly
  • Optimize → Step 2 (full workflow)
  • Keep original → skip to Step 5 (copy file), then Step 6
  • Typography only → skip to Step 6 on the original file

Step 2: Analyze Content (Reader's Perspective)

Read the whole text and ask what would help a reader quickly understand and remember it. Save {original-filename}-analysis.md — the blueprint for Step 4:

# Content Analysis: {filename}

## Highlights & Key Insights
- [core arguments/conclusions, surprising facts or data, counterintuitive claims, golden quotes]

## Structure Assessment
- Current flow: [describe]
- Suggested sections: [heading candidates with brief rationale; unheaded section boundaries; walls of text needing breaks]

## Reader-Important Information
- [actionable takeaways, key definitions, lists buried in prose, comparisons that should be tables]

## Formatting Issues
- [specific issues with location: heading hierarchy, mixed-topic paragraphs, parallel items as prose, unmarked code/commands/terms]

## Typos Found
- [obvious typos with corrections, or "None found"]

Step 3: Check/Create Frontmatter, Title & Summary

Create a YAML frontmatter block if missing.

Field Processing
title See Title Generation
slug Infer from file path or generate from title
summary One-sentence
Questions fréquentes

Modifie-t-elle mes mots ?

Non. La compétence ne fait qu'ajuster la mise en forme et corriger les coquilles évidentes ; elle n'ajoute ni ne réécrit de contenu.

Où le résultat est-il enregistré ?

Elle enregistre un nouveau fichier avec un suffixe de mise en forme, afin que votre original reste inchangé.

Gère-t-elle les textes en chinois ?

Oui. Elle utilise des outils qui gèrent l'emphase en CJK, de sorte que les textes multilingues sont pris en charge.

Détails

Description originale de l’auteur

Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.

repo: JimLiu/baoyu-skills

Popularité

Étoiles GitHub
27k
Position au classement
#9956
Licence
MIT
Mis à jour
02/11/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires