Skip to content
Shareful

Share format specification

The complete SHARE.md format specification with field constraints, validation rules, and section-writing guidance.

File structure

A share lives in a directory named after its slug inside the shares/ folder:

shares/
  fix-nextjs-hydration-mismatch/
    SHARE.md
  prisma-connection-pooling/
    SHARE.md

Each SHARE.md file has two parts: YAML frontmatter and a markdown body with four required sections.

Required frontmatter fields

The frontmatter contains structured metadata in YAML format, enclosed by --- delimiters.

title

ConstraintValue
Typestring
Max length128 characters
RequiredYes

Start with a verb that matches the solution_type:

solution_typeVerb conventionExample
fix"Fix ...""Fix Prisma N+1 query problem with includes and joins"
workaround"Workaround for ...""Workaround for Next.js 14 middleware redirect loop"
pattern"Use ...", "Implement ...""Use TypeScript satisfies operator for type-safe config objects"
reference"Guide to ...", "Reference for ...""Guide to PostgreSQL JSONB query operators"
config"Configure ...""Configure ESLint flat config for TypeScript monorepos"

Good titles:

title: "Fix Docker build cache invalidation for node_modules"
title: "Use TypeScript satisfies operator for type-safe config objects"

Bad titles:

title: "Fix bug"          # Too vague, no technology or symptom
title: "fix prisma"        # No capitalization, no specifics

slug

A kebab-case identifier that doubles as the directory name and URL path.

ConstraintValue
Typestring
Max length64 characters
Pattern/^[a-z0-9-]+$/
RequiredYes

Must match the parent directory name exactly. The CLI generates slugs from titles automatically:

  1. Convert to lowercase
  2. Strip characters that are not a-z, 0-9, spaces, or hyphens
  3. Replace spaces with hyphens
  4. Collapse consecutive hyphens into one
  5. Trim leading and trailing hyphens
  6. Truncate to 64 characters
"Fix Prisma N+1 queries"       → fix-prisma-n1-queries
"Fix Docker build cache (v2)"  → fix-docker-build-cache-v2
"Fix Next.js hydration error"  → fix-nextjs-hydration-error

Good slugs:

slug: fix-prisma-n-plus-one-queries
slug: fix-docker-node-modules-layer-cache

Bad slugs:

slug: Fix-Prisma           # Uppercase not allowed
slug: fix_prisma_queries    # Underscores not allowed; use hyphens

tags

ConstraintValue
Typestring[]
Min items1
Max items10
Each max length32 characters
CaseLowercase only
RequiredYes

Cover three categories:

  1. Primary technology
  2. Problem domain
  3. Descriptors

Good tags:

tags: [prisma, database, performance, n-plus-one]
tags: [nextjs, react, hydration, ssr]

Bad tags:

tags: []                    # At least 1 tag required
tags: [Prisma]              # Must be lowercase

problem

ConstraintValue
Typestring
Max length256 characters
RequiredYes

One sentence describing the problem. Include the error message or symptom.

Good problem fields:

problem: "Prisma makes hundreds of individual queries when loading related data in a loop"
problem: "Docker rebuilds node_modules from scratch on every code change, making builds slow"

Bad problem fields:

problem: "Something is broken"    # No specifics, no error message
problem: "It doesn't work"        # Completely unhelpful

solution_type

ConstraintValue
Typeenum
Valuesfix, workaround, pattern, reference, config
RequiredYes
ValueDescriptionWhen to use
fixA direct fix for a bug or errorThe solution permanently resolves the root cause
workaroundA temporary workaround for a known issueThe root cause is upstream or unfixable; this bypasses it
patternA reusable coding pattern or architectureThe solution generalizes beyond a single error
referenceA lookup guide or cheat sheetThe content is informational, not fixing a specific error
configA configuration change resolving a setup issueThe fix is entirely in config files, not application code

Most shares are fix. When in doubt between fix and pattern, choose fix.

created

ConstraintValue
Typestring
FormatYYYY-MM-DD
RequiredYes

Use today's date. Quote the value in YAML:

created: "2026-02-08"

Optional frontmatter fields

These fields add context but are not required for validation.

environment

Technical context for the solution. Recommended.

environment:
  language: typescript
  framework: nextjs
  version: "14+"

ai_provider

Which AI assistant helped create or verify the solution. Set only if an AI was meaningfully involved.

An array of slugs linking to related shares.

verified

Whether the share has been verified. Set automatically from outcome reports -- do not set manually.

updated

ISO date (YYYY-MM-DD) for when the share was last updated.

Complete frontmatter example

---
title: "Fix Prisma N+1 query problem with includes and joins"
slug: fix-prisma-n-plus-one-queries
tags: [prisma, database, performance, n-plus-one]
problem: "Prisma makes hundreds of individual queries when loading related data in a loop"
solution_type: fix
created: "2026-02-08"
environment:
  language: typescript
  framework: prisma
ai_provider: "claude"
related:
  - fix-postgres-connection-pooling-serverless
---

Body sections

The markdown body must contain exactly four sections in this order. Total body must be under 300 lines. Aim for 60-150 lines.

Problem

Show the broken state so readers can confirm they have the same issue.

Must include:

  • Broken code
  • Error message or symptom
  • Impact

Solution

Show the fix with complete, runnable code. If there are multiple options, label the recommended one.

Why It Works

Explain the mechanism behind the fix. Do not just restate the solution.

Context

List version requirements first, then add gotchas, alternatives, and related tools.

Section length guidelines