Backfill memory files for all existing scripts and skills
Creates MEMORY.md index and 10 memory files documenting: - Scripts: context-load, start-claude, install-hooks, setup-formatters, git-status-report - Skills: /log, /reflect-logs, /reflect, /distill-best-practices, /linter Each file covers purpose, usage, how it works, and gotchas. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
28
memory/script-setup-formatters.md
Normal file
28
memory/script-setup-formatters.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# script: setup-formatters
|
||||
|
||||
**Location:** `scripts/setup-formatters.sh`
|
||||
|
||||
## Purpose
|
||||
|
||||
Opts a project into the auto-formatting system by creating a `formatters/` directory with symlinks back to the canonical formatter scripts in claude-foundations.
|
||||
|
||||
## Usage
|
||||
|
||||
```bash
|
||||
scripts/setup-formatters.sh <project-dir> <ext> [<ext> ...]
|
||||
```
|
||||
|
||||
Run with no arguments to see available formatters: `py`, `sh`, `ts`, `js`, `sql`, `json`, `yaml`, `md`.
|
||||
|
||||
## How it works
|
||||
|
||||
1. Creates `<project-dir>/formatters/` if needed
|
||||
2. Computes a relative path from the project's `formatters/` to `claude-foundations/formatters/`
|
||||
3. Creates symlinks for each requested extension
|
||||
4. If the project is a git repo and has no pre-commit hook, installs `pre-commit-lint.sh` as the git pre-commit hook
|
||||
|
||||
## Gotchas
|
||||
|
||||
- Uses `python3` for relative path computation — requires Python 3 available.
|
||||
- Won't overwrite an existing pre-commit hook.
|
||||
- The `formatters/` directory can be committed (symlinks) or gitignored — project's choice.
|
||||
Reference in New Issue
Block a user