Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/sordi-ai/skill-everything/self-extension-workflowgit clone --depth 1 https://github.com/sordi-ai/skill-everythingWrote 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.
[](https://agentmods.dev/rules/sordi-ai/skill-everything/self-extension-workflow)<a href="https://agentmods.dev/rules/sordi-ai/skill-everything/self-extension-workflow"><img src="https://agentmods.dev/badge/rules/sordi-ai/skill-everything/self-extension-workflow.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00027 | $0.01849 |
| Opus 5 | $0.00014 | $0.00924 |
| Sonnet 5 | $0.00005 | $0.00370 |
| Haiku 4.5 | $0.00003 | $0.00185 |
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 4d 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.
How it starts
The opening of the file, as written. The whole thing — 181 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?
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.
- 4d ago First seen · 181 lines · 27 tokens per session scan A 4f77efe4fd8d
self-extension-workflow is a cursor rule published in the GitHub repository sordi-ai/skill-everything (20 stars, last pushed 3mo ago), licensed MIT. It adds 27 tokens to every session and 1,849 once invoked, about $0.0001 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.
Other cursor rules, from other repositories
00-stack
Stack, runtimes, and MCP servers for this repository.
20-testing
How to run tests and MCP smoke checks.
30-security
Secrets, gitleaks, age encryption, telemetry redaction.
obsidian-memory
Markdown vault memory protocol (vkm-kit).
10-style
Style conventions and contribution hygiene.
schema
Scalable and secure schema design patterns for relational databases, NoSQL, and APIs. / TR: İlişkisel veri tabanları, NoSQL ve API'ler için ölçeklenebilir ve güvenli şema tasarım kalıpları.