Markdown Frontmatter That Agents Can Use

Which frontmatter fields help Claude Code and other agents pick the right note: a one-line description, sortable dates, a source link and a clear status.

By Updated 9 min read

The Short Version

  • Give each note five fields: type, description, updated, source and status.
  • Write the description as one line that states what the note claims.
  • Keep every value on one line, because line-based readers return only the first line.
  • Quote every string, so a colon or hash in a title cannot break the block.
  • Write dates as year, month, day, such as 2026-11-20, so agents sort them as plain text.
On this page
  1. Agents Read the Top of a File Before They Read the Body
  2. Markdown Frontmatter for AI Agents Needs Only Five Fields
  3. The Claim Test Decides Whether a Description Works
  4. Put a Field in the Header Only When an Agent Filters on It
  5. One Line per Value Keeps Simple Tools Working
  6. Quotes Keep Titles From Breaking the Header
  7. Dates Belong in Year-Month-Day Order
  8. Obsidian Reserves Three Properties
  9. Three Mistakes Make a Header Lie to Your Agent
  10. Headings Do the Job When Frontmatter Is Missing
  11. Add Frontmatter to Existing Notes in Four Steps
  12. Keep Assistant-Written Notes in the Same Format
  13. Skip the Fields When Only You Read the Notes
  14. Start From the Notes You Already Have
  15. Questions and Answers

Your assistant answers from the wrong note. Markdown frontmatter for AI agents fixes that with a short header on each note. Use five fields: type, description, updated, source and status. Write the description as one line that states what the note claims.

You ask about something you know you wrote down, and it answers from a different note, or from nowhere. It is not careless. It has hundreds of files and no way to tell which one matters without opening them all. With frontmatter, an assistant scans hundreds of notes by their first lines and opens only the matches. Keep every value on one line and put quotes around each one.

Those fields work because an agent reads the header first. Some formats break that, and you can add the fields to notes you already have in one pass.

Agents Read the Top of a File Before They Read the Body#

An assistant has limited room to think with. Reading every note in full is slow and expensive. So good assistants read a little of each file first, then open the ones that matter.

Anthropic's Agent Skills show the pattern clearly. Each skill is a file with a name and a description in its header. The Agent Skills overview says Claude loads only that header at startup, at about 100 tokens per skill. It reads the rest only when a request matches the description.

The same docs say the description "must say both what the Skill does and when to use it." That is good advice for a note too. The description decides whether the note gets opened.

Markdown Frontmatter for AI Agents Needs Only Five Fields#

Start small. Every field you add is a field you must keep correct.

FieldExample valueWhat an assistant does with it
Typenote, project, person, sourceFilters to the right kind of file
DescriptionShort user interviews beat surveys for early discovery.Decides whether to open the note
Updated2026-11-20Prefers recent notes, flags stale ones
SourceA link to the newsletter or articleCites where an idea came from
Statusdraft, checked, archivedSkips drafts when it needs settled claims

A good description states a claim, such as "Ask users about the last time they had the problem, never about features they want." A weak one says "notes about user interviews." An assistant that reads only the first line already knows what you believe.

The Brainfeed notes list with accepted ideas labeled New to your notes or Builds on a note, each with its source newsletter and pull request
Example data in the Brainfeed app. Accepted ideas wait here with their labels until they go out in one pull request.

The Claim Test Decides Whether a Description Works#

A description works when someone could disagree with it. Call it the claim test. Nobody can disagree with "notes on pricing", so that label fails. A claim passes, because a reader can say yes or no to it.

Example. Four descriptions from a demo vault, before and after the claim test.

BeforeAfter
Notes on pricingAnnual plans cut churn more than discounts do for small teams.
Call with PriyaPriya's team will pay for audit logs before it pays for SSO.
Agent stuffAgents pick a file by its description, so a vague one hides the note.
Ideas from a product newsletterAsk users about the last time they had the problem.

The after column does two jobs. An agent can match a question to it without opening the file. And you can see at a glance which notes you still believe.

Keep each description to one sentence of 25 words or fewer. Anthropic caps a skill description at 1,024 characters, and a note needs far less. A long description repeats the body, and the agent pays for that repeat on every scan.

Put a Field in the Header Only When an Agent Filters on It#

The header is for picking and sorting. The body is for reading. One test decides where a fact goes. If an agent would filter or sort on it, it goes in the header. If an agent would read it to answer, it goes in the body.

FactHeader or bodyWhy
Status, such as draftHeaderAgents skip drafts
The date you kept the ideaHeaderAgents sort by it
The source linkHeaderAgents cite it without reading the body
Why you believe the claimBodyAgents read it to answer
Links to related notesBodyAgents follow them after they open the note
A long summaryBodyIn the header it costs tokens on every scan

Basic Memory, an open-source memory tool for AI assistants, follows the same split. Its header holds the title, type, tags and dates. Facts and links to other notes sit in the body as list lines. A relation line names its type, such as "implements", before the link. Its docs add that the AI can fill the header fields itself, and you can search by them later.

One Line per Value Keeps Simple Tools Working#

Frontmatter allows a value to spill across several lines. Obsidian reads that fine. Many other tools read only the first line.

A lot of agent tooling reads the header one line at a time. If a description starts on the next line, those tools see a single stray character as the whole description. The assistant then sees a note whose description is one character long, and it never picks that file.

So keep three rules:

  1. Put each value on one line, however long.
  2. Use a list only for real lists, such as tags and aliases.
  3. Keep the description on one line, with no wrapping.

Quotes Keep Titles From Breaking the Header#

Some ordinary characters break an unquoted header. A colon, a hash sign or a leading dash each means something special.

Newsletter titles hit all three. "AI: what shipped this week" breaks the header if it sits there without quotes. The fix is simple: put double quotes around every value. It costs nothing, and the header never breaks on a title again.

Dates Belong in Year-Month-Day Order#

Write dates as year, month, day, such as 2026-11-20. An assistant can sort them as plain text, and every tool reads them.

Obsidian's properties guide stores dates in this order too. Its date picker shows your local format, but the file keeps year-month-day. So the same note works in Obsidian and anywhere else.

Use two dates when they mean different things. One says when a newsletter published an idea. The other says when you kept it. An assistant asked "what did I learn this month" wants the second one.

Obsidian Reserves Three Properties#

Obsidian treats three property names specially, and each one is a list:

  • Tags hold the note's tags.
  • Aliases hold other names for the note, so links find it.
  • CSS classes change how that one note looks.

Use tags and aliases as Obsidian expects. Assistants benefit from both. Aliases help an assistant match "PMF" to a note titled "Product market fit".

Obsidian also fixes one type per property name across the vault. If "updated" is a date in one note, it is a date in all of them. Pick the type once and keep it.

Three Mistakes Make a Header Lie to Your Agent#

A wrong header is worse than no header, because an agent trusts it. Three mistakes cause most wrong headers.

  1. An updated date that moves on every save. Some tools stamp the date when you fix a typo. The agent then treats a two-year-old idea as fresh. The fix is a second field, reviewed, that changes only when you reread the claim and still agree with it.
  2. A status that never changes. Every note says draft, so the field filters nothing. Limit status to three values and change it during your weekly review.
  3. Tags that split into synonyms. One note says ai, another says AI, a third says llm. An agent that filters on one tag misses the other two. List the allowed tags in your AGENTS.md file for a second brain and tell agents to use only those.

Each fix costs a minute a week. Without them, the header slowly turns into a list of claims the agent believes and you no longer do.

Obsidian's creator now publishes agent skills for Obsidian that teach agents its Markdown, properties and file formats. A consistent header makes that kind of agent work more reliable, and the guide to Obsidian and MCP shows how an agent reaches the vault in the first place.

Headings Do the Job When Frontmatter Is Missing#

Most vaults hold years of notes with no header. You do not need to fix all of them before an assistant can help.

A note's title and section headings already say a lot. Brainfeed's scanner reads exactly that from each note: the title and the first 6 section headings. It then matches each newsletter idea against them.

So write headings that state the claim of each section. "Ask About Past Behavior" tells an assistant more than "Notes" or "Part 2".

Add Frontmatter to Existing Notes in Four Steps#

You can ask an assistant to do the bulk work, as long as you review it.

  1. Fix the fields first. Write the five fields and their allowed values in a CLAUDE.md or AGENTS.md file at the top of the vault. The free AGENTS.md generator gives you a starting file.
  2. Run on one folder. Ask the assistant to add headers to 20 notes and to write each description from the note's own text.
  3. Review the change. Open it as a pull request and read every description. A wrong description misleads every future run.
  4. Repeat by folder. Once the first 20 look right, run the next folder.

Tell the assistant never to change the body of a note during this pass. It should touch only the header.

Keep Assistant-Written Notes in the Same Format#

Notes your assistants write need the same fields as notes you write. Otherwise the next assistant cannot tell a checked claim from an unchecked one.

Add one more field for that. It records whether the idea is new, builds on a note, or conflicts with one. Add a source and a date on every note an assistant creates. Then any later assistant can trace the claim back to where it came from. The same header is what lets Claude Code build memory from newsletters without mixing your claims with theirs.

Example. This is demo content, not a logged run. An issue claims that agents pick files by their description line. Your vault holds a note on agent context, so the Brainfeed card reads "builds on" that note. You accept it. The pull request adds a new note whose header holds the source, the issue date, the date you accepted it and the "builds on" label. A later assistant can filter on that label and follow the source back to the issue.

Skip the Fields When Only You Read the Notes#

Frontmatter costs upkeep, and two kinds of vault gain little from it.

  • No assistant reads the vault. If you search by hand in Obsidian, tags and links already do the job.
  • The vault is a short-lived project folder. A folder you will delete in a month does not repay five fields.

Start From the Notes You Already Have#

Brainfeed writes accepted newsletter ideas as notes with this kind of header, in its own folder of your repo, through a pull request you merge.

Run the free scan to see what it reads from your notes today. It reads up to 40 notes from a GitHub repo in your browser and matches 41 newsletters to their titles and headings. Try it at brainfeed.atharvashah.com/#try.

Then hand the weekly reading to Brainfeed. It labels each idea against your notes, waits for your swipe, and writes only what you accept, in its own folder. Your first pull request is free. Starter is $9 for your first month, then $19, at brainfeed.atharvashah.com/#join.

Questions and Answers#

What frontmatter fields should a note have for AI agents?
Five fields cover most needs: a type, a one-line description that says what the note claims, a created or updated date in ISO format, a source link when the idea came from outside, and a status. The description matters most, because an agent can read it without opening the body.
Why does a one-line description help an agent?
An agent can scan the first lines of many files cheaply and open only the matches. Anthropic's Agent Skills work this way. Claude loads only the name and description of each skill at startup, about 100 tokens per skill, and reads the body when a request matches.
Should frontmatter values be quoted?
Quote every string that could hold a colon, a hash or a leading dash. A newsletter title like 'AI: the next step' breaks an unquoted header. Quoting every string is the simplest rule, and it costs nothing. Use double quotes so the value can also hold an apostrophe.
What is YAML frontmatter in Markdown?
YAML frontmatter is a short block of fields at the very top of a Markdown file, between two lines of three dashes. Each line holds one key and one value, such as a title, a date or a status. Obsidian shows these fields as properties, and agents read them before the body.
Can I use multi-line YAML in frontmatter?
YAML allows it, and Obsidian reads it. Many small scripts and agent tools read frontmatter one line at a time. Those tools read a description split across lines as a single stray character. Keep each key field on one line, inside double quotes.
Which properties does Obsidian treat specially?
Obsidian has three default properties: tags, aliases and cssclasses, each a list. It supports text, list, number, checkbox, date, date and time, and tags as types. A date is stored as 2020-08-21, and a date and time as 2020-08-21T10:30:00. One property name keeps one type across the whole vault.

Keep the Best Ideas From Every Newsletter

Paste a GitHub repo of Markdown notes. The free scan shows which of 41 newsletters fit what you already know.

No account needed. Your first pull request is free.

ExampleFrom a newsletter issue

Small teams now ship with one agent per repo.

Builds on agents.md