Claude Code Society, home

Learn, lesson 5 of 6

Project rules and skills

Every Claude Code session starts fresh. A CLAUDE.md file carries your rules into each one, so you stop repeating yourself. A skill packs a job you keep asking for into one short command.

What you're doing

CLAUDE.md is a plain text file at the top of your project. Claude reads it at the start of every session. Write down what you'd otherwise have to explain again: how the project is built, your conventions, the things it should always do. It's guidance, though, not a lock. Claude treats it as context, so to block an action outright you need a hook, which is lesson 6.

A skill is a folder with a SKILL.md file in it. You can run it by name, like /check-spec, and Claude can also pick it up on its own when your request matches its description. Unlike CLAUDE.md, a skill only loads when it's used.

Steps

  1. Let Claude Code write a first draft

    Start claude in your study-timer folder and run:

    Type into Claude Code
    /init

    Claude looks through the project and writes a CLAUDE.md with what it found.

  2. Add five rules of your own

    Open CLAUDE.md in any text editor, or type /memory and pick the project file. Add a section like this one, in your own words. A good rule is concrete enough that you could check whether it was followed: "Use 2-space indentation", not "format code properly".

    CLAUDE.md
    ## Rules
    - Keep everything in index.html. Don't add files unless I ask.
    - Use plain HTML, CSS and JavaScript. No frameworks or libraries.
    - Every button must work with the keyboard as well as the mouse.
    - Before you say a change is done, list what you changed and how I can check it in the browser.
    - Write commit messages in the present tense, under 60 characters.

    Keep the whole file short. The official guidance is under 200 lines; longer files cost more and get followed less.

  3. Check that it loads

    Exit and start claude again, then type /context. Your CLAUDE.md should be listed under Memory files.

  4. See one thing change

    Ask for something small, like "add a keyboard shortcut: the space bar starts and pauses the timer". Before your rules, Claude might have just made the change. Now it should end by listing what changed and how to check it, because rule four says so. Write down the difference you saw in one sentence; that's part of your proof.

  5. Write a small skill

    Project skills live in .claude/skills/, one folder per skill. The folder name becomes the command. Make the folder:

    macOS or Linux
    mkdir -p .claude/skills/check-spec
    Windows PowerShell
    mkdir .claude\skills\check-spec

    Then save this as .claude/skills/check-spec/SKILL.md. The part between the --- lines tells Claude when to use it; the rest is what it does.

    .claude/skills/check-spec/SKILL.md
    ---
    description: Checks the app against spec.md, line by line. Use when I ask whether the app matches the spec or is ready to share.
    ---
    
    Read spec.md and index.html. For each line of the spec, say whether the app does it and how you checked.
    Then list anything in the spec that's missing. Don't change any files.

    Rather not make files by hand? Ask Claude Code to create the folder and the file with exactly this text.

  6. Run it

    Type into Claude Code
    /check-spec

    Or ask "does my app match the spec?" and see whether Claude reaches for the skill by itself. If /check-spec doesn't show up when you type /, check the folder name and that the file is called SKILL.md.

  7. Save it

    Commit CLAUDE.md and the .claude/skills folder. Anyone who works on the project with you gets the same rules and the same skill.

Exercise

Proof of done

Write five rules for your project, show one thing that changed because of them, and add one small skill.

You're done when

  • /context lists your CLAUDE.md under Memory files, with your five rules in it.
  • You can say in one sentence what Claude did differently because of a rule.
  • /check-spec runs and reports on each line of your spec.
  • Both are committed.

Sources

Read on October 4, 2026.

  1. How Claude remembers your project: what CLAUDE.md is, where the project file lives, context and not enforcement, /init, writing checkable instructions, the 200-line target, /memory and /context.
  2. Extend Claude with skills: SKILL.md, the description that decides when it loads, project skills in .claude/skills/, running a skill by name, skill bodies loading only when used.