agentleFS
aleconfaleconf/claude-code-spec-scaffold/example/CLAUDE.md

claude-code-spec-scaffold / example

CLAUDE.md1 starsChanged 6 months agoMITView on GitHub

This file is read automatically by Claude Code in every session. All instructions are mandatory and apply to every contributor. For all coding tasks — including plan mode, implementation, review, refactoring, and debugging — always invoke the karpathy-guidelines skill via the Skill tool before writing or editing any code. If in doubt, enhance code clarity, consistency, and maintainability. Whenever a plan is being presented, always invoke the grill-with-docs skill via the Skill tool to stress-test it before finalising. Always save…

The file

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

6 rules. About 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All instructions are mandatory and apply to every contributor.

    line 4
  2. Distinctive:

    If in doubt, enhance code clarity, consistency, and maintainability.

    line 11
  3. Very specific:

    Create docs/ if it does not already exist (mkdir -p docs/)

    line 22
  4. Distinctive:

    Create the file before calling ExitPlanMode

    line 24
  5. Distinctive:

    Do not proceed to implementation until the file is confirmed saved

    line 25
  6. Distinctive:

    Marketers: create and manage short links, read dashboards.

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 29,248 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

CLAUDE.md

This file is read automatically by Claude Code in every session. All instructions are mandatory and apply to every contributor.

Coding Guidelines

For all coding tasks — including plan mode, implementation, review, refactoring, and debugging — always invoke the karpathy-guidelines skill via the Skill tool before writing or editing any code. If in doubt, enhance code clarity, consistency, and maintainability.

Planning Sessions

Whenever a plan is being presented, always invoke the grill-with-docs skill via the Skill tool to stress-test it before finalising.

Plan Mode Rules

Always save the implementation plan as a Markdown file in docs/ before exiting plan mode.

  • Create docs/ if it does not already exist (mkdir -p docs/)
  • Filename: docs/plan-<feature-name>-<YYYY-MM-DD>.md
  • Create the file before calling ExitPlanMode
  • Do not proceed to implementation until the file is confirmed saved

Project Overview

Trim is a self-hosted URL shortener with click analytics, used internally by our marketing team to track campaign performance across email, social, and print channels.

What it does

  • Marketers create short links that redirect to long destination URLs
  • Each redirect is recorded as a click event with referrer, user agent, and approximate geolocation (country-level, from IP)
  • A dashboard aggregates click events into per-link and per-campaign reports

Main constraints

  • Self-hosted, single-region. Runs on one VM in our Frankfurt DC. No multi-region replication. Acceptable downtime: 1h/month.
  • GDPR scope. Click events contain IP-derived data. IPs are hashed at ingest and never stored raw. See docs/adr/0001-ip-hashing-at-ingest.md.
  • Redirect latency budget: 50ms p99. Anything slower and marketers notice on mobile. The redirect path must not touch the analytics database synchronously.
  • No public sign-up. Auth is via the company SSO; only marketing-team members can create short links.

Who uses it

  • Marketers create and manage short links, read dashboards.
  • Engineering maintains the service and consumes the click event stream for ad-hoc analysis.
  • Visitors (external) hit short links and get redirected. They never see the Trim UI.

Stack

  • Go for the redirect service (single binary, low-latency path)
  • Postgres for the link catalog
  • ClickHouse for click events (append-only, columnar reads for dashboards)
  • A small Next.js dashboard for marketers

Domain language

See CONTEXT.md for the canonical glossary. Use the terms defined there. If you find yourself reaching for a synonym (e.g. "URL" instead of "destination URL", "hit" instead of "click event"), stop and check the glossary first.

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.