Logo di Self Patch

Self Patch

Community
jasonkneen
self-patch

How I notice a recurring failure of my own, root-cause it, fix what I can myself (behavioral rules, config, ignore files), and — for anything needing a kernel change I can't apply — draft a verified proposal for the operator to review. The capstone that turns my mistakes into durable fixes. Use when I hit a repeated mistake, get corrected by the operator, see a failed VERIFY, or notice a pattern worth fixing.

Panoramica

Autorejasonkneen
Repositorylazar
Nome della skillself-patch
Stelle
31
Fork
5
File inclusi
3
LicenzaMIT
Link
  • Istruzioni in Markdown

    Un file SKILL.md che il modello carica quando serve, consumando token solo quando una richiesta è effettivamente pertinente.

  • Funziona con qualsiasi LLM

    Le skill IA sono in semplice Markdown, non in codice specifico di un fornitore, quindi funzionano con GPT, Claude, Gemini, Grok o un modello locale.

  • 3 file inclusi

    Script, modelli di documento e riferimenti che il modello può leggere mentre lavora. I file sono di sola lettura e non vengono mai eseguiti.

  • Open source

    Pubblicata da jasonkneen su GitHub. Leggi i sorgenti prima di installarla.

Installazione

Installa la skill IA Self Patch in TypingMind per usarla con qualsiasi LLM, oppure copiala in un altro agente in grado di leggere SKILL.md.

1

Installa in TypingMind

TypingMind installa una skill direttamente dalla sua cartella GitHub: legge SKILL.md, raccoglie i file delle risorse e salva il risultato in locale.

  1. Apri l'app e vai su Plugin → Skill.
  2. Scegli "Installa da GitHub".
  3. Incolla l'URL della cartella della skill riportato qui sotto e conferma.
    https://github.com/jasonkneen/lazar/tree/main/src/seed-skills/_meta/self-patch
  4. Attiva la skill in ogni chat in cui vuoi averla a disposizione.
Plugin → Skill → Nuova skill → Da URL GitHub, poi incolla l'URL della cartella e premi Continua.
2

Installa in un altro agente

Qualsiasi agente che legge il formato Agent Skills può usare questa skill: copia la cartella nella cartella delle skill di quell'agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jasonkneen/lazar.git /tmp/lazar
mkdir -p .claude/skills
cp -r /tmp/lazar/src/seed-skills/_meta/self-patch .claude/skills/self-patch
Dopo la copia, riavvia Claude Code per caricare la nuova skill.

Usala in TypingMind

Attiva Self Patch in qualsiasi chat di TypingMind e al resto pensa il modello. Il nome e la descrizione della skill sono nel prompt di sistema e, non appena arriva una richiesta pertinente, il modello carica da solo le istruzioni complete: non devi mai richiamarla manualmente e non consuma token finché non viene effettivamente usata.

Il modello carica automaticamente Self Patch non appena riceve una richiesta pertinente.

Funziona con qualsiasi modello IA

Le skill IA sono semplici istruzioni in Markdown, non codice specifico di un fornitore, quindi Self Patch non è vincolata al modello per cui è stata scritta. Installala una sola volta in TypingMind e usala con GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama o un modello locale che esegui tu, sempre con le tue chiavi API.

  • Caricata solo quando serve

    Il prompt di sistema contiene solo il nome e la descrizione. Le istruzioni vengono recuperate alla prima richiesta pertinente, quindi una skill inutilizzata non costa nulla.

  • Cambia modello durante la chat

    Poiché la skill è composta da istruzioni e non da codice, continua a funzionare anche se cambi modello: il nuovo modello legge lo stesso file SKILL.md.

Istruzioni della skill

Questo è il contenuto di SKILL.md che il modello carica. Leggilo prima dell'installazione: una skill è un insieme di istruzioni che il tuo modello seguirà.

self-patch — fixing myself

When I fail the same way twice, I fix it — I don't just apologize. This is the loop. It's REACTIVE (invoked by the operator, or by me noticing mid-session) and TIERED: I fix the non-kernel layers myself and verify; kernel changes I can only PROPOSE (my src/ is locked — that's the safety boundary, not a limitation to route around).

The loop: notice → root-cause → classify → act → record

1. Notice

A repeated mistake, operator feedback ("you did it again"), a failed VERIFY, or a pattern in memory/work-journal.md / bounded logs.

2. Root-cause — read, don't guess

Read the actual code/logs. Confirm the mechanism before fixing. Use gitignore-aware search (bare rg works via .ignore; ls/find for existence). Every good fix I've made came from reading source, not assuming.

3. Classify the layer

  • behavioral — a habit/instruction gap (I stall, I gaslight, I over-write). Fix = a rule in the PINNED hot set.
  • config — an env var, rc file, or ignore file (rg blindness → .ignore; nudge count → LAZAR_STALL_NUDGES). Fix = change the file/var.
  • kernel — needs Rust (max_tokens=8192, reset wipes memory/). I CANNOT edit the locked src/. Fix = draft a proposal (step 4c).

4. Act

4a. Behavioral fix (autonomous). Add ONE tight dated line to the PINNED hot set (see below). Then PROVE it: end my turn with [VERIFY]\ncontains=memory/PINNED.md:<distinctive phrase from the rule>\n[/VERIFY]. Never claim a behavioral fix without a passing VERIFY.

4b. Config fix (autonomous). Change the file/var, then VERIFY the effect (contains=, or a command whose output confirms it). Record it.

4c. Kernel fix (PROPOSAL ONLY — never apply).

  1. staged=$(bash skills/_meta/self-patch/stage-proposal.sh <name>) — stages a writable src/ copy under workspace/proposals//src/.
  2. Delegate the mechanical edit+build to a worker (isolates it from my context) by writing a PRECISE spawn prompt — exact file, exact old→new text, and an EXPECT-VERIFY: block requiring a build-ok marker — then: bash "$LAZAR_HOME/bin/lazar-spawn" <name> <prompt-file>. The worker edits $staged, runs cd $staged && CARGO_TARGET_DIR=/tmp/sp-$$ cargo build --release and, on success, writes $staged/../build-ok + a short DESIGN.md. (Or, for a tiny edit, I do this directly.)
  3. Gate on the envelope (matched:true = it compiled). NEVER run kernel-apply.sh myself.
  4. Surface to the operator, verbatim: "Kernel proposal <name> is staged and verified-building. Review the diff and run bash scripts/kernel-apply.sh <name> to apply."

5. Record

bash skills/_meta/self-patch/ledger.sh <layer> <symptom> <cause> <fix> <verified> → appends to memory/distilled/self-patch.md. The lesson persists.

PINNED hot-set discipline (keep the every-session injection lean)

  • Behavioral rules live under ## Behavioral rules (hot) in PINNED, ≤6 lines, each dated.
  • Promote a rule when a failure recurs; retire the coldest to memory/distilled/behavioral-history.md when the hot set overflows. Full history is never lost — only the always-injected copy is bounded.

Boundaries (never cross)

  • Never edit src/ directly (locked). Never run kernel-apply.sh myself — kernel changes are proposal-only, operator-applied.
  • Never touch workspace/tui (owner-managed).
  • Never pattern-delete under memory/distilled/.
  • Never call a fix done without a passing VERIFY.

Self-test

bash skills/_meta/self-patch/selftest.sh

File inclusi

Il modello legge questi file quando servono, mentre la skill è caricata. Sono accessibili in sola lettura e non vengono mai eseguiti.

Domande frequenti

Cosa fa la skill IA Self Patch?

How I notice a recurring failure of my own, root-cause it, fix what I can myself (behavioral rules, config, ignore files), and — for anything needing a kernel change I can't apply — draft a verified proposal for the operator to review. The capstone that turns my mistakes into durable fixes. Use when I hit a repeated mistake, get corrected by the operator, see a failed VERIFY, or notice a pattern worth fixing.

Perché usare Self Patch su TypingMind?

Perché la installi una volta e la usi con qualsiasi modello. Self Patch è scritta in semplice Markdown anziché in codice specifico di un fornitore, quindi la stessa skill funziona con GPT-5, Claude, Gemini, Grok o un modello locale, e puoi cambiare modello durante la chat senza che smetta di funzionare. TypingMind usa le tue chiavi API, quindi paghi direttamente i fornitori anziché un abbonamento per posto utente, e le tue skill e chat restano nel tuo spazio di archiviazione.

Come installo Self Patch in TypingMind?

Apri Plugin → Skill → Installa da GitHub in TypingMind e incolla https://github.com/jasonkneen/lazar/tree/main/src/seed-skills/_meta/self-patch. TypingMind legge il file SKILL.md, include i file associati e installa la skill, che puoi abilitare per ogni singola chat.

Quali modelli IA possono usare Self Patch?

Qualsiasi modello che colleghi in TypingMind. Le skill IA sono semplici istruzioni in Markdown anziché codice specifico di un fornitore, quindi GPT, Claude, Gemini, Grok e i modelli locali possono tutti caricare questa skill quando una richiesta corrisponde al suo scopo.

Quanti modelli IA posso usare con Self Patch?

Quanti ne vuoi. Se un modello supporta le skill, puoi usarlo con Self Patch: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e molti altri, tutti su TypingMind con le tue chiavi API.

La skill IA Self Patch è gratuita?

Sì. È pubblicata su GitHub da jasonkneen con licenza MIT. Paghi solo il tuo fornitore IA per i token che usi.

Cosa sono le skill IA?

Una skill IA è un pacchetto di istruzioni riutilizzabili che insegna a un modello IA come svolgere un'attività specifica. Segue il formato aperto Agent Skills: un file SKILL.md con un nome e una descrizione, più eventuali script, modelli o file di riferimento di cui il modello potrebbe aver bisogno. Il modello legge le istruzioni solo quando la tua richiesta corrisponde alla skill, quindi una skill installata non comporta costi finché non viene usata.

In cosa si differenziano le skill IA dai plugin o dai server MCP?

Un plugin o un server MCP fornisce a un modello nuovi strumenti da richiamare: codice che viene eseguito da qualche parte e restituisce un risultato. Una skill IA, invece, fornisce al modello conoscenze e procedure: come affrontare un'attività, quali passaggi seguire e quali caratteristiche deve avere un buon output. Le skill sono semplici istruzioni in Markdown, quindi non richiedono server, chiavi API né ambienti di esecuzione e funzionano con qualsiasi modello.

Vedi tutti

Crea subito la tua area di lavoro IA

Iscriviti alla nostra newsletter per ricevere aggiornamenti sulle nuove funzionalità e sulle prossime iniziative a premi 👇