Markdown.summarize

From causify-ai/helpers · View interactive version

Markdown.summarize is an AI agent skill from the GitHub repository causify-ai/helpers. Summarize markdown content into bullet points while preserving header structure

How to use this skill

Skill file

Interface Specification

Inputs

| Parameter | Type | Required | Description |

|-----------|------|----------|-------------|

| <INPUT> | file path or text | Yes | Markdown file or text chunk to summarize |

| <NUM_WORDS> | integer | No* | Target output word count |

| <FRACTION> | float (0-1) | No* | Alternative to <NUM_WORDS>: fraction of original size |

| <MAX_HEADER_LEV> | integer | No | Max header level to preserve (default: preserve all levels) |

| <TAG> | string | No | Tag for output filename (default: derived from input) |

Outputs

| Item | Format | Description |

|------|--------|-------------|

| Console output | Text | Header structure preview + summary + statistics |

| Output file | Markdown | explanation.<tag>.md (overwrites if exists) |

| Word count | Integer | Original and target word counts printed to console |

Workflow

Parse Input

Determine Header Strategy

Case A: Input has header structure

Case B: Input is plain text (no headers)

Apply Header Level Filter

If <MAX_HEADER_LEV> not specified:

If <MAX_HEADER_LEV> specified:

(shortened if needed)

section becomes a * <TITLE> chunk

For every header kept (header fidelity):

text.rules.md

Calculate Target Length

Summarize Content

Group Into Chunks

content

Compress Content

Core Values define the culture

a parent bullet and one sub-bullet per claim

Is defined by the Core Values

order

that item

Output Results

Interactive Follow-up

Behavior Specifications

Header Fidelity

Chunk Format

# <Header copied from source>

* First chunk title
- Main point
  - Supporting detail
  - Supporting detail
- Main point

* Second chunk title
- Main point

Edge Cases

| Condition | Behavior |

|-----------|----------|

| No headers in input | Summarize into * <TITLE> chunks, no H1/H2 in output |

| <MAX_HEADER_LEV> = 1 | Collapse all H2+ into * <TITLE> chunks under H1 |

| <MAX_HEADER_LEV> > deepest level | Preserve all headers as-is |

| Source headers are not numbered | Output headers are not numbered |

| Source numbering has gaps or duplicates | Copy the numbers as they are |

| Section with a single topic | Emit a single chunk |

| Empty input | Return error message |

| Very short input | Return minimal summary maintaining structure |

Verification

ignoring fenced code blocks

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.