Skip to content

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

claude-templates

Personal starting point for every new project: a CLAUDE.md template plus .claude/ guardrails (settings, PreToolUse guard hook, path-scoped data rules).

Layout

Per-project template, copied fresh into each new repo:

  • CLAUDE.md — team-law template, fill in the [brackets] after copying.
  • .claude/settings.json — permission denylist + hook wiring.
  • .claude/hooks/guard.sh — PreToolUse guard for the Bash tool (blocks force-push, rm -rf, secret reads, etc).
  • .claude/rules/data.md — path-scoped rules for migrations/schema files.

Machine-level, symlinked once via setup.sh (edits here are live everywhere after a git pull — no re-copying):

  • rules/engineering.md → linked to ~/.claude/rules/engineering.md, loaded automatically by Claude Code for every project on the machine.
  • skills/bootstrap-project/ → linked to ~/.claude/skills/bootstrap-project/, the skill that does the per-project copy below.

Setup on a new machine

git clone https://github.com/mantisdotdev/claude-templates.git ~/dotfiles/claude-templates

Then tell Claude: "read ~/dotfiles/claude-templates/SETUP.md and do what it says." It runs setup.sh for you and won't overwrite anything that's already there.

(Or run it yourself: bash ~/dotfiles/claude-templates/setup.sh.)

That's it — engineering.md and the bootstrap-project skill are now live for every project on this machine.

Starting a new project

In an empty/new project directory, ask Claude to bootstrap the project (triggers the bootstrap-project skill), or copy manually:

cp ~/dotfiles/claude-templates/CLAUDE.md ./CLAUDE.md
cp -r ~/dotfiles/claude-templates/.claude ./.claude
chmod +x .claude/hooks/guard.sh

Fill in the [bracket] placeholders in CLAUDE.md for the new project.

Keeping machines in sync

To pull updates on any machine: git -C ~/dotfiles/claude-templates pull (symlinked files update instantly; re-run setup.sh only if new files were added).

About

Personal CLAUDE.md + .claude/ bootstrap templates for new projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages