Loading...
Loading...
Master markdown formatting, GitHub Flavored Markdown, README files, and documentation formatting. Use when writing markdown docs, READMEs, or formatting documentation.
npx skill4agent add aj-geddes/useful-ai-prompts markdown-documentation# H1 Header
## H2 Header
### H3 Header
#### H4 Header
##### H5 Header
###### H6 Header
Alternative H1
==============
Alternative H2
--------------**Bold text**
__Also bold__
*Italic text*
_Also italic_
***Bold and italic***
___Also bold and italic___
~~Strikethrough~~
`Inline code`
> Blockquote
> Multiple lines
> in blockquote
---
Horizontal rule (also ___ or ***)Unordered list:
- Item 1
- Item 2
- Nested item 2.1
- Nested item 2.2
- Item 3
Using asterisks:
* Item 1
* Item 2
Using plus:
+ Item 1
+ Item 2
Ordered list:
1. First item
2. Second item
1. Nested item 2.1
2. Nested item 2.2
3. Third item
Task list (GitHub Flavored Markdown):
- [x] Completed task
- [ ] Incomplete task
- [ ] Another task[Link text](https://example.com)
[Link with title](https://example.com "Link title")
Reference-style link:
[Link text][reference]
[reference]: https://example.com
Automatic link:
<https://example.com>
<email@example.com>


Reference-style image:
![Alt text][image-ref]
[image-ref]: image.pngInline code: `const x = 5;`
Code block with language:
```javascript
function hello(name) {
console.log(`Hello, ${name}!`);
}
```
```python
def hello(name):
print(f"Hello, {name}!")
```
```bash
npm install
npm start
```
Indented code block (4 spaces):
const x = 5;
console.log(x);Simple table:
| Column 1 | Column 2 | Column 3 |
|----------|----------|----------|
| Row 1 | Data | Data |
| Row 2 | Data | Data |
Aligned columns:
| Left | Center | Right |
|:-----|:------:|------:|
| Left | Center | Right |
| Text | Text | Text |
Minimal table:
Column 1 | Column 2
---------|----------
Data | Data
Data | DataFootnotes:
Here's a sentence with a footnote[^1].
[^1]: This is the footnote.
Definition list:
Term
: Definition
Emoji:
:smile: :rocket: :heart:
:+1: :-1: :eyes:
Automatic URL linking:
https://github.com
Task lists in issues:
- [x] #739
- [ ] https://github.com/octo-org/repo/issues/1
- [ ] Add tests
Mentioning users and teams:
@username
@org/team-name
Referencing issues and PRs:
#123
GH-123
username/repo#123# Project Name
Brief description of what this project does and who it's for.
[](https://github.com/user/repo/actions)
[](LICENSE)
[](https://www.npmjs.com/package/package-name)
## Table of Contents
- [Features](#features)
- [Demo](#demo)
- [Installation](#installation)
- [Usage](#usage)
- [API Reference](#api-reference)
- [Contributing](#contributing)
- [License](#license)
- [Contact](#contact)
## Features
- Feature 1
- Feature 2
- Feature 3
## Demo

Try it live: [https://demo.example.com](https://demo.example.com)
## Installation
### Prerequisites
- Node.js 18+
- npm or yarn
### Install via npm
```bash
npm install package-nameyarn add package-namegit clone https://github.com/user/repo.git
cd repo
npm install
npm run buildimport { Package } from 'package-name';
const instance = new Package({
option1: 'value1',
option2: 'value2'
});
instance.doSomething();const result = await instance.advancedMethod({
param1: 'value',
param2: 123
});
console.log(result);Class.method(param1, param2)param1param2const result = instance.method('value', 42);.configrc{
"setting1": "value1",
"setting2": true,
"setting3": {
"nested": "value"
}
}git checkout -b feature/AmazingFeaturegit commit -m 'Add some AmazingFeature'git push origin feature/AmazingFeature# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run in watch mode
npm run test:watch# Build for production
npm run build
# Deploy
npm run deploy
## Documentation Best Practices
### File Structure
### Linking Between Documents
```markdown
Link to another doc:
[Installation Guide](guides/installation.md)
Link to section in current doc:
[See Configuration](#configuration)
Link to section in another doc:
[API Authentication](api/authentication.md#oauth2)
Link to external resource:
[GitHub Markdown Guide](https://guides.github.com/features/mastering-markdown/)Create custom anchors:
<a name="custom-anchor"></a>
## Section Title
Link to it:
[Jump to section](#custom-anchor)<details>
<summary>Click to expand</summary>
Hidden content goes here.
- Can include lists
- Code blocks
- Images
```javascript
const code = 'works too';Common languages:
```javascript
```typescript
```python
```bash
```java
```go
```rust
```sql
```json
```yaml
```html
```css
```dockerfile
```graphql
```markdown




> **Note**
> This is a note
> **Warning**
> This is a warning
> **Important**
> This is important information
GitHub-style alerts (GFM):
> [!NOTE]
> Useful information
> [!TIP]
> Helpful advice
> [!IMPORTANT]
> Key information
> [!WARNING]
> Critical content
> [!CAUTION]
> Negative potential consequences```mermaid
graph TD
A[Start] --> B{Decision}
B -->|Yes| C[Do Something]
B -->|No| D[Do Something Else]
C --> E[End]
D --> E
```
```mermaid
sequenceDiagram
participant A as Alice
participant B as Bob
A->>B: Hello Bob!
B->>A: Hello Alice!
```# markdownlint
npm install -g markdownlint-cli
markdownlint '**/*.md'
# Configuration: .markdownlint.json
{
"default": true,
"MD013": false,
"MD033": false
}# prettier
npm install -g prettier
prettier --write '**/*.md'
# Configuration: .prettierrc
{
"proseWrap": "always",
"printWidth": 80
}# grip - GitHub README preview
pip install grip
grip README.md
# Open http://localhost:6419