CtrlK
BlogDocsLog inGet started
Tessl Logo

nitinjain999/platform-skills

Production-grade platform engineering handbook — Kubernetes, Terraform, Flux CD, GitHub Actions, AWS, and more.

67

Quality

84%

Does it follow best practices?

Impact

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

README.mdexamples/agent-self-improve/

Agent Self-Improvement — Examples

Status: Beta

This directory contains ready-to-copy templates for bootstrapping the self-improving agent pattern in any project.

Contents

FilePurpose
.learnings/LEARNINGS.mdPositive learnings log template
.learnings/ERRORS.mdError and mistake log template
.learnings/FEATURE_REQUESTS.mdRecurring unmet needs log template
memory/working-buffer.mdWAL scratchpad and task state template
memory/SESSION-STATE.mdAlways-on capture of corrections, preferences, decisions, proper nouns
memory/YYYY-MM-DD.mdDaily notes template — rename to actual date on first use
scripts/session-end.shStop hook (macOS/Linux/WSL): drains errors, saves daily notes, session counter, review reminder
scripts/session-start-reminder.shPreToolUse hook (macOS/Linux/WSL): injects memory-load banner at first tool use each session
scripts/session-end.ps1Stop hook (Windows native PowerShell): same behaviour as .sh equivalent
scripts/session-start-reminder.ps1PreToolUse hook (Windows native PowerShell): same behaviour as .sh equivalent
global-claude.mdTemplate for ~/.claude/CLAUDE.md — path override, session-start, in-session logging rules
settings.json.exampleAll 3 hooks wired for macOS / Linux / WSL / Git Bash
settings-windows.json.exampleAll 3 hooks wired for Windows native (PowerShell)

Platform support

PlatformShell scriptsSettings file
macOSsession-end.sh, session-start-reminder.shsettings.json.example
Linux (Ubuntu, Debian, RHEL, Fedora, Arch)session-end.sh, session-start-reminder.shsettings.json.example
Linux (Alpine, busybox-only)Install bash first: apk add bashsettings.json.example
Windows — WSL or Git Bashsession-end.sh, session-start-reminder.shsettings.json.example
Windows — native PowerShellsession-end.ps1, session-start-reminder.ps1settings-windows.json.example

Windows recommendation: WSL (Windows Subsystem for Linux) or Git Bash is the simplest path — no PowerShell scripts needed, and the bash setup is identical to macOS/Linux. Use the native PowerShell scripts only if you cannot use WSL or Git Bash.

The global config directory (~/.claude/) resolves to the same location on all platforms:

  • macOS / Linux: ~/.claude//Users/<you>/.claude/ or /home/<you>/.claude/
  • Windows: ~/.claude/C:\Users\<you>\.claude\ (Node.js os.homedir() resolves ~)
  • WSL / Git Bash on Windows: same as Linux above

Usage

The recommended approach is to run the init command — it asks whether you want global or project-local setup before creating anything:

/platform-skills:self-improve init

Or copy manually:

# macOS / Linux / WSL / Git Bash — global setup (recommended for individuals)
cp -r examples/agent-self-improve/.learnings ~/.claude/
cp -r examples/agent-self-improve/memory ~/.claude/

# macOS / Linux / WSL / Git Bash — project-local setup (shareable with the team)
cp -r examples/agent-self-improve/.learnings .
cp -r examples/agent-self-improve/memory .

For project-local setup, add to .gitignore for personal-only notes (recommended — daily notes grow fast):

.learnings/
memory/

Commit .learnings/ only if you want the team to share and build on these learnings; keep memory/ local.

Wire the hooks — macOS / Linux / WSL / Git Bash

# Copy scripts
mkdir -p ~/.claude/scripts
cp examples/agent-self-improve/scripts/session-end.sh ~/.claude/scripts/
cp examples/agent-self-improve/scripts/session-start-reminder.sh ~/.claude/scripts/
chmod +x ~/.claude/scripts/*.sh

# Copy settings (merge manually if ~/.claude/settings.json already exists)
cp examples/agent-self-improve/settings.json.example ~/.claude/settings.json

# Copy global CLAUDE.md
cp examples/agent-self-improve/global-claude.md ~/.claude/CLAUDE.md

Wire the hooks — Windows native (PowerShell)

# Copy scripts
New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude\scripts"
Copy-Item examples\agent-self-improve\scripts\session-end.ps1 "$env:USERPROFILE\.claude\scripts\"
Copy-Item examples\agent-self-improve\scripts\session-start-reminder.ps1 "$env:USERPROFILE\.claude\scripts\"

# Copy settings (merge manually if settings.json already exists)
Copy-Item examples\agent-self-improve\settings-windows.json.example "$env:USERPROFILE\.claude\settings.json"

# Copy global CLAUDE.md
Copy-Item examples\agent-self-improve\global-claude.md "$env:USERPROFILE\.claude\CLAUDE.md"

If you see an execution policy error when the hooks run, allow local scripts once:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

What the hooks do:

HookTriggerWhat it does
Stopsession-end.sh / .ps1Session closeSaves daily notes, drains .pending-errors.log → ERR entries, clears session marker, increments counter, nudges if no LRN logged
PreToolUsesession-start-reminder.sh / .ps1First tool use per sessionPrints memory-load banner once, silent after that
PostToolUseEvery failed tool callAppends to .pending-errors.log for batch processing at session end

Reference

  • How it works (concepts, lifecycle, examples): examples/agent-self-improve/HOW_IT_WORKS.md
  • Full protocol reference: references/agent-self-improve.md
  • Slash command specification: commands/self-improve.md

examples

BEFORE_AFTER.md

CHANGELOG.md

CODE_OF_CONDUCT.md

COMMANDS.md

CONTRIBUTING.md

EDITOR_INTEGRATIONS.md

GETTING_STARTED.md

HOW_IT_WORKS.md

install.sh

INSTALLATION.md

LAUNCH.md

PROMPTS.md

QUICKSTART.md

README.md

renovate.json

SECURITY.md

SKILL.md

tessl.json

tile.json