markdown-writing
Skill1 starsChanged 11 months agoMITView on GitHub
Guidelines for creating and modifying markdown files. Use when writing documentation, README files, or any markdown content.
In this repository10 other files it gives its agents.
- bash-script-expertSkill
- draw-ioSkill
- feature-devSkill
- file-organizerSkill
- frontend-designSkill
- planning-with-filesSkill
- skill-creatorSkill
- spec-interviewSkill
- web-artifacts-builderSkill
- youtube-downloaderSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
21 rules. About 0 are common, 16 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Always lint after changes: - Run markdownlint --fix then markdownlint to verify
- Very specific: line 53
Use ATX style (#) not underline style
- Distinctive: line 79
Use 4 spaces for nested list items
- Distinctive: line 80
Add blank line before and after lists
- Very specific: line 81
Use - for unordered lists (not * or +)
- Distinctive: line 115
Add blank line before the opening fence
- Distinctive: line 116
Add blank line after the closing fence
- Very specific: line 117
Always specify language (never use plain ` )
- Distinctive: line 121
Use backticks for inline code:
- Very specific: line 147
Use pipes (|) for column separators
- Distinctive: line 196
Verify clean: - No output means success
- Distinctive: line 300
Must be well-formatted for optimal parsing by AI
- Distinctive: line 301
Follow all markdownlint rules strictly
- Distinctive: line 302
Use clear, hierarchical structure
- Distinctive: line 307
Start with H1 title
- Distinctive: line 309
Add installation/usage sections
- Distinctive: line 310
Keep concise and scannable
- Distinctive: line 314
Follow Keep a Changelog format
- Distinctive: line 315
Use consistent date formatting
- Distinctive: line 333
Problem: Not running from repository root
- Distinctive: line 359
Always run markdownlint from repository root
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
markdown-writing Guidelines
This skill provides guidance for creating and editing markdown files.
Critical Rules
- Always lint after changes - Run
markdownlint --fixthenmarkdownlintto verify - Run from repository root - Ensures
.markdownlint.jsonconfig is loaded - Use UTF-8 encoding - Especially for directory trees and special characters
- Follow WooCommerce markdown standards - See configuration rules below
WooCommerce Markdown Configuration
The project uses markdownlint with these specific rules (from .markdownlint.json):
Enabled Rules
- MD003: Heading style must be ATX (
# HeadingnotHeading\n===) - MD007: Unordered list indentation must be 4 spaces
- MD013: Line length limit disabled (set to 9999)
- MD024: Multiple headings with same content allowed (only check siblings)
- MD031: Fenced code blocks must be surrounded by blank lines
- MD032: Lists must be surrounded by blank lines
- MD033: HTML allowed for
<video>elements only - MD036: Emphasis (bold/italic) should not be used as headings - use proper heading tags
- MD040: Fenced code blocks should specify language
- MD047: Files must end with a single newline
Disabled Rules
- no-hard-tabs: Tabs are allowed
- whitespace: Trailing whitespace rules disabled
Markdown Writing Guidelines
Headings
# Main Title (H1) - Only one per file
## Section (H2)
### Subsection (H3)
#### Minor Section (H4)- Use ATX style (
#) not underline style - One H1 per file (usually the title)
- Maintain heading hierarchy (don't skip levels)
Lists
Unordered lists:
- Item one
- Item two
- Nested item (4 spaces)
- Another nested item
- Item threeOrdered lists:
1. First item
2. Second item
3. Third itemImportant:
- Use 4 spaces for nested list items
- Add blank line before and after lists
- Use
-for unordered lists (not*or+)
Code Blocks
Always specify the language:
```bash
pnpm test:php:env
```
```php
public function process_order( int $order_id ) {
// code here
}
```
```javascript
const result = calculateTotal(items);
```Common language identifiers:
bash- Shell commandsphp- PHP codejavascriptorjs- JavaScripttypescriptorts- TypeScriptjson- JSON datasql- SQL queriesmarkdownormd- Markdown examples
Code block rules:
- Add blank line before the opening fence
- Add blank line after the closing fence
- Always specify language (never use plain
```)
Inline Code
Use backticks for inline code:
Use the `process_order()` method to handle orders.
The `$order_id` parameter must be an integer.Links
[Link text](https://example.com)
[Internal link](../path/to/file.md)
[Link with title](https://example.com "Optional title")Tables
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Value 1 | Value 2 | Value 3 |
| Value 4 | Value 5 | Value 6 |- Use pipes (
|) for column separators - Header separator row required
- Alignment optional (
:---,:---:,---:)
Directory Trees
Always use UTF-8 box-drawing characters:
src/
├── Internal/
│ ├── Admin/
│ │ └── Controller.php
│ └── Utils/
│ └── Helper.php
└── External/
└── API.phpNever use:
- ASCII art (
+--,|--) - Spaces or tabs for tree structure
- Control characters
Emphasis
**Bold text** for strong emphasis
*Italic text* for regular emphasis
***Bold and italic*** for very strong emphasisWorkflow for Editing Markdown
- Make your changes to the markdown file
Auto-fix linting issues:
markdownlint --fix path/to/file.mdCheck for remaining issues:
markdownlint path/to/file.md- Manually fix what remains (usually language specs for code blocks)
- Verify clean - No output means success
- Commit changes
Common Linting Errors and Fixes
MD007: List indentation
Problem:
- Item
- Nested (only 2 spaces)Fix:
- Item
- Nested (4 spaces)MD031: Code blocks need blank lines
Problem:
Some text
```bash
command
```
More textFix:
Some text
```bash
command
```
More textMD032: Lists need blank lines
Problem:
Some text
- List itemFix:
Some text
- List itemMD036: Emphasis as heading
Problem:
**Example: Using bold as a heading**
Some content hereFix:
#### Example: Using a proper heading
Some content hereMD040: Code needs language
Problem:
```
code here
```Fix:
```bash
code here
```Special Cases
CLAUDE.md Files
CLAUDE.md files are AI assistant documentation:
- Must be well-formatted for optimal parsing by AI
- Follow all markdownlint rules strictly
- Use clear, hierarchical structure
- Include table of contents for long files
README Files
- Start with H1 title
- Include brief description
- Add installation/usage sections
- Keep concise and scannable
Changelog Files
- Follow Keep a Changelog format
- Use consistent date formatting
- Group changes by type (Added, Changed, Fixed, etc.)
Troubleshooting
File Shows as "data" Instead of Text
Problem: File is corrupted with control characters
Fix:
tr -d '\000-\037' < file.md > file.clean.md && mv file.clean.md file.md
file file.md # Verify shows "UTF-8 text"Linting Shows Unexpected Errors
Problem: Not running from repository root
Fix:
# Always run from root
cd /path/to/woocommerce
markdownlint path/to/file.md
# NOT like this
markdownlint /absolute/path/to/file.mdAuto-fix Doesn't Work
Problem: Some issues require manual intervention
Fix:
- Language specs for code blocks must be added manually
- Long lines may need manual rewrapping
- Some structural issues require content reorganization
Notes
- Most markdown issues are auto-fixable with
markdownlint --fix - Always run markdownlint from repository root
- UTF-8 encoding is critical for special characters
- CLAUDE.md files must pass linting for optimal AI parsing
- See
woocommerce-dev-cycleskill for markdown linting commands
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

