Add statusline scripts, context-load improvements, and prior distill updates
- Add statusline.sh and set-topic.sh for per-session status line topics - Update context-load with improved directory walking and output format - Update CLAUDE.md with status line docs and early-call safety note - Update MEMORY.md and README.md with new script/skill entries - Add memory files: script-statusline, skill-decompose, skill-orchestrate, gotchas-gitea - Add networking.md best practice (nftables, systemd sockets, Docker forwarding, TLS) - Update best practices from prior distill: documentation, kubernetes, scripting, secrets-management, skills-development - Prune reflected session logs, add new session logs - Update reflection state Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
31
CLAUDE.md
31
CLAUDE.md
@@ -19,6 +19,8 @@
|
||||
- **No project right now**: Do nothing further — just respond normally.
|
||||
- **New project!**: Follow the "New Projects" section below. Also read `~/dev/claude/secrets/` as above. Read `BESTPRACTICES.md` (loaded automatically by `context-load`) and load topic files relevant to the new project's technology stack.
|
||||
|
||||
3. **Set the status line topic** after the user selects a project or describes their task. See the "Status Line" section below.
|
||||
|
||||
## Secrets (`~/dev/claude/secrets/`)
|
||||
|
||||
**CRITICAL — treat this folder with extreme paranoia:**
|
||||
@@ -277,3 +279,32 @@ These are hard-won lessons from real project work:
|
||||
- **Automate repeated sequences.** If you run the same 3+ commands in sequence more than once, it should become a script.
|
||||
- **Reflect after milestones.** Don't just finish — review what happened, what went wrong, what can be improved. Write it down so future sessions benefit.
|
||||
|
||||
## Status Line
|
||||
|
||||
A persistent bar at the bottom of Claude Code shows the current topic, model, and context usage: `[Model Name] topic | N% context`.
|
||||
|
||||
### Setting the Topic
|
||||
|
||||
After the user selects a project or describes their task (i.e., after the first response where the status line has had a chance to run), set the topic:
|
||||
|
||||
```bash
|
||||
~/.claude/status/set-topic.sh "$(pwd)" "project-name: brief task description"
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
- `~/.claude/status/set-topic.sh "$(pwd)" "brainiac-app: M2 web frontend"`
|
||||
- `~/.claude/status/set-topic.sh "$(pwd)" "cluster-bootstrap: Cilium upgrade"`
|
||||
- `~/.claude/status/set-topic.sh "$(pwd)" "General chat"`
|
||||
|
||||
### When to Update
|
||||
|
||||
- **Session start**: Set the topic once the user picks a project or task
|
||||
- **Focus change**: Update if the user shifts to a different project or task mid-session
|
||||
- **Keep it short**: Aim for `project: task` format, under ~40 characters
|
||||
|
||||
### How It Works
|
||||
|
||||
The status line script (`scripts/statusline.sh`) runs after each assistant message. It writes the session ID to `/tmp/claude-session-id-<md5 of cwd>`, which `set-topic.sh` reads to find the correct per-session topic file at `~/.claude/status/<session-id>/claude-topic.txt`.
|
||||
|
||||
**Early calls are safe:** If `set-topic.sh` is called before the status line has run (i.e., on the first message), the topic is queued to a pending file and automatically applied when the status line first runs after the next response.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user