self-extension-workflow

self-extension-workflow is a skill for Claude Code, Codex from sordi-ai/skill-everything. It costs 32 tokens per session (1,892 once invoked), scanned A, original, MIT.

A procedure for turning an agent's mistakes into reviewed project rules. It searches for similar errors, records the lesson, and sends the resulting change through a pull request with required approval.

In plain words
What is it for?
Use it after a failed test, correction, faulty approach, deployment problem, or explicit request to remember a mistake.
Why use it?
It helps prevent the same implementation, review, test, or deployment mistake from happening again.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is **CI GATE · four-layer gating** — Every rule that goes live has been seen by a human. The validator is best-effort, not airtight — see [SECURITY.md](../../SECUR.

Good fit Use it after a failed test, correction, faulty approach, deployment problem, or explicit request to remember a mistake.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/sordi-ai/skill-everything
agentmods
npx agentmods add skills/sordi-ai/skill-everything/self-extension-workflow

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for self-extension-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/sordi-ai/skill-everything/self-extension-workflow/github.svg)](https://agentmods.dev/skills/sordi-ai/skill-everything/self-extension-workflow)
Your own site
<a href="https://agentmods.dev/skills/sordi-ai/skill-everything/self-extension-workflow"><img src="https://agentmods.dev/badge/skills/sordi-ai/skill-everything/self-extension-workflow/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for self-extension-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/sordi-ai/skill-everything/self-extension-workflow"><img src="https://agentmods.dev/badge/skills/sordi-ai/skill-everything/self-extension-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,892 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01892
Opus 5 $0.00016 $0.00946
Sonnet 5 $0.00006 $0.00378
Haiku 4.5 $0.00003 $0.00189

Measured 9d ago against content hash 482f3d33470d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

self-extension-workflow scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/self-extension-workflow/SKILL.md · 188 lines

How it starts

The opening of the file, as written. The whole thing — 188 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Self-extension workflow

Exact prompt and procedure the agent executes after every mistake. The agent never pushes to main directly. Every self-extension is a PR.

Five agent steps plus a search-prerequisite, from mistake to merged rule. The agent never pushes to main. Every rule that lands is CODEOWNERS-approved. This page is the contract.


TRIGGER CONDITIONS

Five conditions. Any one of them starts the workflow.

The agent starts this workflow when any of these is met:

  • A test fails and the agent wrote the faulty code.
  • A code review comment corrects the agent.
  • The agent realises during implementation that its first approach was wrong.
  • A deployment problem occurs that the agent caused.
  • The user explicitly says: "That was wrong" / "Remember this".

STEP-BY-STEP PROCEDURE

Five steps after the search-prerequisite. Every step is mandatory before the next one.

Step 0 — Search before write

Mandatory. Duplicates in the error log destroy the signal.

Before creating a new error entry, search the existing error log:

1. Read skills/error-log/SKILL.md.
2. Search for similar errors (same category + similar context).
3. If a similar entry exists:
   - Increment its `count` field by 1.
   - Update `last_seen` to today.
   - Supplement the context if needed.
   - Do NOT create a new entry.
4. Only if no similar entry exists, continue with Step 1.

Step 1 — Analyse the error

The agent answers six questions before writing anything.

1. What exactly did I do? (concrete code/action)
2. What should I have done instead?
3. Why did I do it wrong? (false assumption, missing knowledge, carelessness)
4. Which category applies?
   - development: code error, wrong implementation
   - git: commit/branch mistake
   - deployment: deployment order, configuration
   - security: security vulnerability
   - performance: N+1, missing indexes, oversized datasets
   - domain: wrong understanding of business rules
5. How severe was the error? (critical/high/medium/low)
6. Which target file does the rule belong in?

Read the full file on GitHub · 188 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 188 lines · 32 tokens per session scan A 482f3d33470d

Subscribe to this mod's changes

self-extension-workflow is a skill published in the GitHub repository sordi-ai/skill-everything (20 stars, last pushed 3mo ago), licensed MIT. It adds 32 tokens to every session and 1,892 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.