agentleFS
urbanmorphurbanmorph/mdshare/CLAUDE.md

mdshare

CLAUDE.md9 starsChanged 5 months agoMITView on GitHub

mdshare is deliberately minimal. The core value is: upload markdown, get a link, share it. That's it. Design principles: - Simple over powerful — if a feature needs explanation, it's too complex - Zero friction — no login, no setup, no configuration. Paste and go. - Invisible infrastructure — users shouldn't know or care about the tech stack - Features earn their place — every feature must make the core flow faster or clearer. If it adds a button, menu,…

The file

We split this CLAUDE.md into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not a Google Docs competitor (no real-time cursors, no track changes)

    line 17
  2. Distinctive:

    Not a CMS or wiki

    line 18
  3. Distinctive:

    Not a note-taking app

    line 19
  4. Distinctive:

    Not a collaboration platform with user accounts

    line 20

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

@AGENTS.md

mdshare

Project Philosophy

mdshare is deliberately minimal. The core value is: upload markdown, get a link, share it. That's it.

Design principles:

  • Simple over powerful — if a feature needs explanation, it's too complex
  • Zero friction — no login, no setup, no configuration. Paste and go.
  • Invisible infrastructure — users shouldn't know or care about the tech stack
  • Features earn their place — every feature must make the core flow faster or clearer. If it adds a button, menu, or step, it needs strong justification.
  • Don't build what users haven't asked for — resist speculative features

What mdshare is NOT:

  • Not a Google Docs competitor (no real-time cursors, no track changes)
  • Not a CMS or wiki
  • Not a note-taking app
  • Not a collaboration platform with user accounts

When evaluating new features, ask:

  1. Does this make upload → share → collaborate faster?
  2. Can a first-time user figure it out without instructions?
  3. Does it add UI clutter?
  4. Could this be solved by the user's existing tools instead?

Tech Stack

  • Astro 5 on Cloudflare Workers (native, via @astrojs/cloudflare adapter)
  • React 19 as Astro islands (client:load, client:only="react")
  • Cloudflare D1 (SQLite), Durable Objects (WebSocket)
  • Tiptap editor with tiptap-markdown
  • Tailwind CSS v4
  • CI/CD: GitHub Actions → astro build && wrangler deploy on push to main

Key Files

  • lib/sanitize.ts — content sanitization pipeline (security-critical)
  • lib/tokens.ts — token generation and verification
  • lib/permissions.ts — permission resolution from tokens
  • lib/db.ts — D1 access via cloudflare:workers env
  • lib/db-types.ts — D1 row types (separated so client code can import without runtime)
  • lib/broadcast.ts — DO broadcast helper called from PUT/PATCH
  • src/pages/ — Astro pages (file-based routing)
  • src/pages/api/ — all REST API routes (Astro endpoints)
  • src/pages/d/[id].astro — document SSR page (dynamic OG tags from D1)
  • src/components/DocumentView.tsx — main editor component (React island, largest)
  • src/worker.ts — custom worker entry with WebSocket bypass + DO export + cron
  • src/layouts/Layout.astro — HTML shell, meta tags, JSON-LD, fonts
  • worker/document-ws.ts — Durable Object class for WebSocket sync
  • components/editor/ — Tiptap editor, toolbar, comments, highlights
  • public/.assetsignore — prevents wrangler from uploading _worker.js as an asset

Versions are pinned

astro, @astrojs/cloudflare, and @astrojs/react are pinned to exact versions in package.json (no ^) to prevent accidental upgrades. Astro 6 has a known picomatch CJS bug with the Cloudflare adapter — do NOT upgrade to Astro 6 until it's resolved.

Cloudflare Token

The project uses its own Cloudflare API token (separate from other projects). Store in .dev.vars for local dev. CI/CD uses GitHub secrets. Prefix wrangler commands with the token: CLOUDFLARE_API_TOKEN=... npx wrangler ...

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.