My crush config, skills, and hooks.
Find a file
RedWizard 87b991aacf Add methodology-reminder and memory-reminder and commit-reminder to notifications
Enable three new notifiers for the chat-box project:
- methodology-reminder: context-sensitive TDD/Type-Driven/SOLID prompts by file type
- memory-reminder: prompts knowledge graph updates on significant file changes
- commit-reminder: reminds to log decisions before git commits

💘 Generated with Crush

Assisted-by: Crush:deepseek-v4-flash
2026-05-20 11:24:53 -04:00
.githooks Simplify pre-commit hook: no cross-platform config sync 2026-04-29 22:45:08 -04:00
.memory Update handoff with hook rewrite session summary 2026-05-18 22:35:42 -04:00
hooks@d0675d0282 Update hooks submodule pointer (orchestrator + notifier modules) 2026-05-12 12:00:37 -04:00
skills@7d58b51bb9 Migrate hooks to Python and add tmux-watcher hook 2026-05-11 15:19:31 -04:00
.env.example Fix README tree and create missing .env.example 2026-04-29 23:09:28 -04:00
.gitattributes Add .gitattributes to enforce LF line endings for shell scripts 2026-04-29 15:33:09 -04:00
.gitignore Merge remote changes: Python hooks, gitignored .env, Termux, notifications 2026-05-18 22:30:17 -04:00
.gitmodules Restructure into umbrella repo with submodules for skills and hooks 2026-04-29 11:37:45 -04:00
AGENTS.md Add no-rm-rf hook to Linux config and update docs 2026-04-30 15:29:22 -04:00
CHANGELOG.md Fix CRUSH_GLOBAL_CONFIG persist and harden setup.sh normalization 2026-05-06 17:44:38 -04:00
crush-config-info.md Replace niche hooks with context_paths and crush-config-info.md 2026-05-12 11:47:25 -04:00
crush.linux.json Merge remote changes: Python hooks, gitignored .env, Termux, notifications 2026-05-18 22:30:17 -04:00
crush.termux.json Add notification orchestrator with pluggable modules 2026-05-12 11:57:27 -04:00
crush.windows.json Add notification orchestrator with pluggable modules 2026-05-12 11:57:27 -04:00
notifications.json Add methodology-reminder and memory-reminder and commit-reminder to notifications 2026-05-20 11:24:53 -04:00
opencode.linux.json Add opencode permission rules for rm -rf and document plugin system 2026-05-18 22:35:18 -04:00
opencode.windows.json Add OpenCode platform config, setup bootstrapping, and drop chiasmus 2026-05-18 22:27:44 -04:00
README.md Add no-rm-rf hook to Linux config and update docs 2026-04-30 15:29:22 -04:00
setup-termux.sh Add Termux config and setup script 2026-05-11 23:49:02 -04:00
setup.ps1 Add OpenCode platform config, setup bootstrapping, and drop chiasmus 2026-05-18 22:27:44 -04:00
setup.sh Add OpenCode platform config, setup bootstrapping, and drop chiasmus 2026-05-18 22:27:44 -04:00
tui.json Add OpenCode platform config, setup bootstrapping, and drop chiasmus 2026-05-18 22:27:44 -04:00

Crush Global Configuration

Centralized Crush config with versioned skills, hooks, platform-specific configs (symlinked), and tooling for Windows and Linux.

Structure

crush-config/
├── crush.json            # Local symlink → crush.windows.json or crush.linux.json (not tracked)
├── crush.windows.json    # Windows config — edit this on Windows
├── crush.linux.json      # Linux config — edit this on Linux
├── AGENTS.md             # Full documentation for AI agents
├── .gitattributes        # Forces LF line endings for .sh files (Windows compat)
├── .githooks/
│   └── pre-commit        # Git hook: verifies crush.json is a symlink
├── .gitignore
├── .gitmodules
├── .env                  # (gitignored) — DEEPSEEK_API_KEY and other secrets
├── .memory/              # Memory MCP server persistence
├── setup.ps1             # Windows bootstrap
├── setup.sh              # Linux bootstrap
├── hooks/                # Submodule → forge.redwizard.party/RedWizard/custom-hooks
│   ├── .gitattributes    # LF line endings for .sh files
│   ├── rtk-rewrite.sh          # PreToolUse: rewrites bash via rtk (token savings)
│   ├── no-rm-rf.sh             # PreToolUse: blocks destructive rm with git backup info
│   ├── commit-reminder.sh      # PreToolUse: reminds agent to commit crush.json
│   ├── forgejo-push-reminder.sh# PreToolUse: retry advice on git push flake
│   ├── submodule-watch.sh      # PreToolUse: submodule commit workflow reminder
│   └── skill-context-injector.sh# PreToolUse: injects context when loading crush-config skill
└── skills/               # Submodule → forge.redwizard.party/RedWizard/custom-skills
    └── skills/
        └── standard-ebooks/  # Standard Ebooks production workflow

Initial Setup on a New Machine

Prerequisites

  • Git
  • Crush installed
  • DEEPSEEK_API_KEY env var set (create a .env file from .env.example or set it directly)

Windows

git clone --recurse-submodules https://forge.redwizard.party/RedWizard/crush-config.git C:\crush-config
cd C:\crush-config
.\setup.ps1

Linux

sudo mkdir -p /opt/crush-config
sudo chown $(whoami):$(id -gn) /opt/crush-config
git clone --recurse-submodules https://forge.redwizard.party/RedWizard/crush-config.git /opt/crush-config
cd /opt/crush-config && chmod +x setup.sh && ./setup.sh

Restart your terminal. Crush now reads from this config.

If you already cloned without --recurse-submodules

git submodule update --init --recursive

Platform-Specific Configs

File Target CRUSH_GLOBAL_CONFIG value Symlink
crush.windows.json Windows C:\crush-config\crush.windows.json crush.json → crush.windows.json
crush.linux.json Linux /opt/crush-config/crush.linux.json crush.json → crush.linux.json

crush.json is a local symlink — it points to the current platform's config file. Platform configs are maintained independently so they can diverge as needed. When you edit crush.json through Crush, you're transparently editing the platform file for your OS. Only commit the platform file for your operating system (e.g., crush.windows.json on Windows).

Git Hooks

Pre-commit (./.githooks/pre-commit)

Verifies that crush.json is a symlink (not a regular file). Warns if crush.json is a regular file. Does not sync or transform configs — platform files are maintained independently.

Crush PreToolUse Hooks

Six hooks run inside Crush before tool calls. They live in the hooks/ submodule:

Hook Trigger Purpose
rtk-rewrite.sh bash Rewrites commands via rtk rewrite for token savings
no-rm-rf.sh bash Blocks destructive rm commands with git backup info
commit-reminder.sh edit|write Reminds to update CHANGELOG.md/README.md, then commit+push — fires for any file in main repo or submodules
forgejo-push-reminder.sh bash Advises retry on git push auth flake
submodule-watch.sh edit|write Reminds agent to commit/push submodule changes
skill-context-injector.sh view When loading the crush-config skill, injects pointers to AGENTS.md, README.md, CHANGELOG.md

All hooks use Crush's exit-code protocol — they never block, only inject context or rewrite input.

Line Ending Strategy

Windows Git with core.autocrlf=true converts LF→CRLF on checkout, which breaks bash scripts. The .gitattributes files (superproject and hooks submodule) force *.sh text eol=lf to prevent this.

Updating Submodules

# Pull latest from all submodules
git submodule update --remote --merge

# Commit the updated submodule pointers
git add skills hooks
git commit -m "Update submodules to latest"

Agent Workflow (for AI Agents)

Whenever the platform config is modified, the agent MUST commit and push before concluding:

git add crush.windows.json  # or crush.linux.json
# Also update CHANGELOG.md and README.md if needed
git commit -m "description of change"
git push

Never stage crush.json — it's a local symlink, not tracked in git.

The pre-commit hook only verifies the symlink exists; no auto-generation happens.