Skip to content
Skillpedia
Documentation15k Β· #11138

lat-md

What it does

This skill explains how to write lat.md documentation files, which describe a project's design decisions, rules and tests in a set format. It is for people keeping structured project notes that code can point back to.

When to use it

  • βœ“When you need to create a new section in a project's lat.md folder.
  • βœ“When you are editing existing lat.md files and need the correct structure.
  • βœ“When you want to review whether lat.md notes follow the required rules.

Skill link

https://github.com/fathah/hermes-desktop/blob/main/.agents/skills/lat-md/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/fathah/hermes-desktop/blob/main/.agents/skills/lat-md/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you help me write a lat.md section that explains how my project's login rules work?”

5 new skills a week. 1 minute to read.

How it works

The agent follows a set of rules: each section starts with a short opening paragraph, and the notes describe what the project does and why, rather than repeating the code. The text is designed to be picked up by search and by other tools.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

lat.md Authoring Guide

This skill covers the syntax, structure rules, and conventions for writing lat.md/ files. Load it whenever you need to create or edit sections in the lat.md/ directory.

What belongs in lat.md

lat.md/ files describe what the project does and why β€” domain concepts, key design decisions, business logic, and test specifications. They do NOT duplicate source code. Think of each section as an anchor that source code references back to.

Good candidates for sections:

  • Architecture decisions and their rationale
  • Domain concepts and business rules
  • API contracts and protocols
  • Test specifications (what is tested and why)
  • Non-obvious constraints or invariants

Bad candidates:

  • Step-by-step code walkthroughs (the code itself is the walkthrough)
  • Auto-generated API docs (use tools for that)
  • Temporary notes or TODOs

Section structure

Every section must have a leading paragraph β€” at least one sentence immediately after the heading, before any child headings or other block content.

The first paragraph must be ≀250 characters (excluding [[wiki link]] content). This paragraph is the section's identity β€” it appears in search results, command output, and RAG context.

# Good Section

Brief overview of what this section documents and why it matters.

More detail can go in subsequent paragraphs, code blocks, or lists.

## Child heading

Details about this child topic.
# Bad Section

## Child heading

This is invalid β€” "Bad Section" has no leading paragraph.

lat check enforces this rule.

Section IDs

Sections are addressed by file path and heading chain:

  • Full form: lat.md/path/to/file#Heading#SubHeading
  • Short form: file#Heading#SubHeading (when the file stem is unique)

Examples: lat.md/tests/search#RAG Replay Tests, cli#init, parser#Wiki Links.

Wiki links

Cross-reference other sections or source code with [[target]] or [[target|alias]].

Section links

See [[cli#init]] for setup details.
The parser validates [[parser#Wiki Links|wiki link syntax]].

Source code links

Reference functions, classes, constants, and methods in source files:

[[src/config.ts#getConfigDir]]          β€” function
[[src/server.ts#App#listen]]            β€” class method
[[lib/utils.py#parse_args]]             β€” Python function
[[src/lib.rs#Greeter#greet]]            β€” Rust impl method
[[src/app.go#Greeter#Greet]]            β€” Go method
[[src/app.h#Greeter]]                   β€” C struct

lat check validates that all targets exist.

Code refs

Tie source code back to lat.md/ sections with @lat: comments:

// @lat: [[cli#init]]
export function init() { ... }
# @lat: [[cli#init]]
def init():
    ...

Supported comment styles: // (JS/TS/Rust/Go/C) and # (Python).

Place one @lat: comment per section, at the relevant code β€” not at the top of the file.

Test specs

Describe tests as sections in lat.md/ files. Add frontmatter to require that every leaf section has a matching @lat: comment in test code:

---
lat:
  require-code-mention: true
---
# Tests

Authentication test specifications.

## User login

Verify credential validation and error handling.

### Rejects expired tokens

Tokens past their expiry timestamp are rejected with 401, even if otherwise valid.

### Handles missing password

Login request without a password field returns 400 with a descriptive error.

Each test references its spec:

# @lat: [[tests#User login#Rejects expired tokens]]
def test_rejects_expired_tokens():
    ...

Rules:

  • Every leaf section under require-code-mention: true must be referenced by exactly one @lat: comment
  • Every section MUST have a description β€” at least one sentence explaining what the test verifies and why
  • lat check flags unreferenced specs and dangling code refs

Frontmatter

Optional YAML frontmatter at the top of lat.md/ files:

---
lat:
  require-code-mention: true
---

Currently the only supported field is require-code-mention for test spec enforcement.

Validation

Always run lat check after editing lat.md/ files. It validates:

  • All wiki links point to existing sections or source code symbols
  • All @lat: code refs point to existing sections
  • Every section has a leading paragraph (≀250 chars)
  • All require-code-mention leaf sections are referenced in code
FAQ

Should lat.md notes copy the source code?

No. They describe the what and why, and the code itself is the walkthrough.

How long should the opening paragraph be?

It must be 250 characters or fewer, not counting any wiki link text.

What should not go in these files?

Temporary notes, to-do items and auto-generated API docs are not good candidates.

Details

Original description by the author

Writing and maintaining lat.md documentation files β€” structured markdown that describes a project's architecture, design decisions, and test specs. Use when creating, editing, or reviewing files in the lat.md/ directory.

repo: fathah/hermes-desktop

Popularity

GitHub stars
15k
Ranking position
#11138
License
MIT
Updated
10/13/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills