ai-governance
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
Bootstrap and operate a self-improving agent workspace. Scaffolds .learnings/ and memory/ directories, captures errors and learnings during a session, detects recurring patterns, and promotes stable entries to project memory (CLAUDE.md, AGENTS.md, or references/). Also
> /plugin marketplace add nitinjain999/platform-skills > /plugin install platform-skills@platform-skills
How it fires
How this command gets triggered: by you, by Claude, or both.
/self-improveContext preview
What this command does when you run it.
Bootstrap and operate a self-improving agent workspace. Scaffolds .learnings/ and memory/ directories, captures errors and learnings during a session, detects recurring patterns, and promotes stable entries to project memory (CLAUDE.md, AGENTS.md, or references/). Also
name: self-improve description: Bootstrap and operate a self-improving agent workspace. Scaffolds .learnings/ and memory/ directories, captures errors and learnings during a session, detects recurring patterns, and promotes stable entries to project memory (CLAUDE.md, AGENTS.md, or references/). Also implements the Proactive Agent pillars — WAL protocol, working buffer, SESSION-STATE, daily notes, VBR, VFM scoring, ADL decision logic, heartbeat, and reverse prompting. Use when asked to "remember this lesson", "set up agent memory", "log that error", "promote learnings", "capture session state", or "enable proactive mode". argument-hint: "[init [global|local]|log [LRN|ERR|FEAT]|promote <ID>|migrate [global|local]|status|resume|review|state]" title: "Self-Improve Command" sidebar_label: "self-improve" custom_edit_url: null
Bootstrap and operate a self-improving, proactive agent workspace.
Before executing any mode, resolve `LEARNINGS_BASE`:
1. If mode is `init global` → use `~/.claude/` 2. Else if mode is `init local` → use `.` (current working directory) 3. Else if `~/.claude/.learnings/` exists → use `~/.claude/` as base (global setup) 4. Else if `.learnings/` exists in the current working directory → use `.` as base (project setup) 5. Else if mode is `init` (no argument) → ask the user to choose (see init mode below) 6. Else → default to `~/.claude/`, create the directories, and inform the user that global setup was auto-created
`~/.claude/` resolves consistently across all platforms (macOS, Linux, Windows) because Claude Code uses `os.homedir()` for `~`. On Windows this maps to `C:\Users\<you>\.claude\` — no manual path adjustment needed.
All path references in every mode below use `LEARNINGS_BASE` as the root:
| Logical path | Resolved path (global) | Resolved path (project) | |---|---|---| | `.learnings/LEARNINGS.md` | `~/.claude/.learnings/LEARNINGS.md` | `.learnings/LEARNINGS.md` | | `.learnings/ERRORS.md` | `~/.claude/.learnings/ERRORS.md` | `.learnings/ERRORS.md` | | `.learnings/FEATURE_REQUESTS.md` | `~/.claude/.learnings/FEATURE_REQUESTS.md` | `.learnings/FEATURE_REQUESTS.md` | | `memory/working-buffer.md` | `~/.claude/memory/working-buffer.md` | `memory/working-buffer.md` | | `memory/SESSION-STATE.md` | `~/.claude/memory/SESSION-STATE.md` | `memory/SESSION-STATE.md` | | `memory/YYYY-MM-DD.md` | `~/.claude/memory/YYYY-MM-DD.md` | `memory/YYYY-MM-DD.md` | | `.learnings/.pending-errors.log` | `~/.claude/.learnings/.pending-errors.log` | `.learnings/.pending-errors.log` |
Promotion targets (`CLAUDE.md`, `AGENTS.md`, `.github/copilot-instructions.md`) always remain project-local regardless of scope — only the capture files follow `LEARNINGS_BASE`.
Reference: `references/agent-self-improve.md` → Global vs project scope
Scaffold the global workspace under `~/.claude/` — learnings persist across all projects.
/platform-skills:self-improve init global
Steps: 1. Set `LEARNINGS_BASE=~/.claude/` 2. If `~/.claude/.learnings/` already exists: report current state, list existing files, and stop — do not overwrite 3. Create the directory structure:
~/.claude/.learnings/
LEARNINGS.md
ERRORS.md
FEATURE_REQUESTS.md
~/.claude/memory/
working-buffer.md
SESSION-STATE.md4. Seed each file with the correct header and an example entry marked `Status: example` 5. Detect the user's platform and offer to wire all three hooks in `~/.claude/settings.json`:
6. Offer to create `~/.claude/CLAUDE.md` from the template at `examples/agent-self-improve/global-claude.md` 7. Print bootstrap summary:
✓ ~/.claude/.learnings/LEARNINGS.md — positive learnings ✓ ~/.claude/.learnings/ERRORS.md — mistakes and root causes ✓ ~/.claude/.learnings/FEATURE_REQUESTS.md — recurring unmet needs ✓ ~/.claude/memory/working-buffer.md — WAL scratchpad and task state ✓ ~/.claude/memory/SESSION-STATE.md — always-on session capture ✓ ~/.claude/memory/YYYY-MM-DD.md — daily notes (created on first use)
8. Remind the user to run `/platform-skills:self-improve review` after a few sessions
Reference: `references/agent-self-improve.md` → Global vs project scope
---
Scaffold a project-local workspace in the current working directory — learnings live in the repo.
/platform-skills:self-improve init local
Steps: 1. Set `LEARNINGS_BASE=.` (current working directory) 2. If `.learnings/` already exists in `$PWD`: report current state, list existing files, and stop — do not overwrite 3. Create the directory structure:
.learnings/
LEARNINGS.md
ERRORS.md
FEATURE_REQUESTS.md
memory/
working-buffer.md
SESSION-STATE.md4. Seed each file with the correct header and an example entry marked `Status: example` 5. Check `.gitignore` — ask the user:
6. Offer to add hooks to `.claude/settings.json` (this project only):
A production-grade field handbook for platform, DevOps, SRE, and cloud engineers covering Kubernetes, Flux CD, Terraform, GitHub Actions, AWS, OPA/Rego, KEDA, Karpenter, supply chain security, Falco, observability, and more.
Repo: nitinjain999/platform-skills
Generate and enforce policy gates for AI coding agents (Copilot, Claude Code) — real-time session hooks that deny protected-path edits and dangerous commands,…
Generate, convert, and maintain animated GitHub-safe Markdown documents with animated SVG diagrams. Covers four SVG patterns (architecture flow, lifecycle…
AWS profile management for MCP servers — discover profiles across SSO, Granted, and assumed-role chains, check credential TTL, switch profiles across VS Code…
Structured guidance for AWS CloudFront distributions, WAF web ACLs, Lambda@Edge, CloudFront Functions, Firewall Manager multi-account enforcement, and IAM/IRSA…
Azure identity (Workload Identity, OIDC, Entra ID), resource tagging, AKS platform patterns, RBAC scoping, and production-readiness review — with Terraform…
Design, run, and debug Chaos Engineering experiments on Kubernetes using Litmus Chaos v3 and Chaos Mesh v2. Covers fault injection (pod-delete, network-loss,…