Logo: Sw Doctor

Sw Doctor

Communautéit
mhmtsrfglu
sw-doctor

Use when the user wants to make agent sessions lighter or cheaper to start, asks what fills the context window before any work (rules, memory, skills, plugins, MCP tools), why a session starts with so many tokens, or invokes sw-doctor.

Iwwersiicht

Editeurmhmtsrfglu
Repositorysuperwiki
Skill-Nummsw-doctor
Stären
31
Forks
3
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    mhmtsrfglu huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Sw Doctor an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/mhmtsrfglu/superwiki/tree/main/skills/sw-doctor
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mhmtsrfglu/superwiki.git /tmp/superwiki
mkdir -p .claude/skills
cp -r /tmp/superwiki/skills/sw-doctor .claude/skills/sw-doctor
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Sw Doctor an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Sw Doctor automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Sw Doctor net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

sw-doctor

Shows what a session carries before it has read anything, and proposes what to remove. Rule and memory files, the lists of skills, agents and tools, and what plugins and hooks add are sent again with every step of every agent, subagents included, so a smaller start makes every step cheaper.

You cannot run the tool's own context command: it is typed by the user. A script reads the same blocks from the record the tool keeps of this session. You read nothing yourself and write no report.

Run from the project root:

bash
node docs/.sw/sw.mjs doctor

It reports the session it runs in. --session <id or its first characters> picks another session of this project, --tool claude|codex|copilot looks only at one tool's sessions.

Steps

  1. Show the table as printed, in a code block. Sizes are characters of text, not tokens.
  2. Propose changes, largest saving first, at most five. For each: the part and its size from the table, what to change, and where. Use the table under "What to propose". Propose only what the output supports, and say plainly when a part cannot be made smaller.
  3. Ask before changing anything, one proposal at a time. Which plugin or server a project needs is the user's call: say what a group appears to be for and let them decide.
  4. Apply what the user approved, within the limits under "Limits".
  5. Have it measured. A change takes effect in a new session. Ask the user to open one and run the tool's own command there: /context in Claude Code and Copilot CLI, /status in Codex. On Claude Code, beside /context, /insights: it reads the recent session transcripts on this machine (up to 200 it has not analyzed before, very short ones skipped) and writes an HTML report to ~/.claude/usage-data/report.html on what the user works on, friction points and suggestions for using Claude Code more effectively; the user types it, the skill cannot run it. It measures no context, so it does not replace this step; and a suggestion of its that adds a line to CLAUDE.md is weighed against the file's size, since the first row under "What to propose" removes lines there. On Copilot, beside /context, /chronicle cost-tips (Copilot CLI) or /chronicle:cost-tips (VS Code Copilot Chat): it reads the token use of recent sessions from Copilot's session store, prompt length, tool calls and continuation steps, and proposes savings; the user types it, the skill cannot run it. Compare its figures with the ones from before; a setting that changed nothing is reported as such and taken out again.

If the user pastes the output of that command, use its token figures in place of the character sizes; the parts are the same.

What to propose

In the tableProposeWhat it saves
rule and memory files: one file is most of the partname the file. A rules file (AGENTS.md, CLAUDE.md): move sections that are needed only for some work into a document the agent opens on demand, and leave a one-line pointer. A memory index: one line per entry holding one lesson; dates, counts and status belong in the entry's own fileits full size
agent list: groups that have nothing to do with this projectswitch those plugins off for this project (how: "Limits"). The group label is the plugin's name; (none) is the user's own and built-in entriesthe lines of those agents
skill list: groups that have nothing to do with this projectthe same switch. Say what to expect: the tool gives the list a fixed budget and shortens descriptions to fit, so fewer skills usually means fuller descriptions for the rest, not a smaller list. Worth doing so the agent picks skills better; not a token savinglittle or nothing
tool names (loaded on demand): servers the project does not usethe user disables those MCP servers for this project. Only names are loaded, so the saving is the size shown, not the size of the tool definitionsthe names of those tools
MCP server instructionsgoes away with the server; no separate changewith the server
session-start hooksname the hook and the plugin it belongs to, if the user can say; it goes away with that pluginits full size
Codex: skills instructions is largeskills are listed from ~/.agents/skills and from plugins; remove or move the ones this user does not usenot measured
Copilot CLI: custom instruction is largethe project's instruction files; same advice as for a rules file. Also name /chronicle improve: it reads this repository's sessions from Copilot's session store for places where Copilot struggled or was corrected, proposes three to five instructions, and writes .github/copilot-instructions.md only after the user picks from its recommendations. The user types it; the skill cannot run itits full size
first request is far above what the parts add up tothe rest is the tool's own system prompt and built-in tool definitions. Say so; it cannot be changed from herenothing

Give a saving as the size in the table. Do not turn it into a token or money figure unless the user pasted token numbers.

Limits

  • Project-local settings only. Never edit the user's global settings, and never uninstall a plugin or remove a server: switching it off for this project is enough and is undone by deleting a line.
  • Claude Code:
    • a plugin off: in .claude/settings.local.json (personal, normally git-ignored; keep what is already there), "enabledPlugins": { "<plugin>@<marketplace>": false }. The full key is in ~/.claude/settings.json under enabledPlugins; read only that key.
    • an MCP server or a claude.ai connector off: the user does it with /mcp in the session. Do not edit ~/.claude.json, and do not set environment variables for it in the project's settings: that was tried and changed nothing.
    • plugins synced from the user's claude.ai account are not in that settings file; they are removed in the account's settings.
  • Codex and Copilot CLI: propose, and let the user change their configuration; this skill does not edit it.
  • Memory and rule files are the user's. Shorten an index or move a section only when asked, keep a copy of the previous version next to the file, and never delete an entry.
  • If the project's own rules forbid a change, they win.

If it fails

OutputDo
unknown command doctorthe project's docs/.sw/sw.mjs is older than this skill; offer to run sw-init, which updates it
no agent session record foundsay so and ask the user to run the tool's context command and paste the output; work from that
a note that the session has not made a request yetanother session of this project is newer than yours; run again with --session and the id of the one you mean
a note that Copilot has not counted its tool definitionspass it on; the other parts are valid

Heefeg gestallte Froen

Wat mécht de KI-Skill Sw Doctor?

Use when the user wants to make agent sessions lighter or cheaper to start, asks what fills the context window before any work (rules, memory, skills, plugins, MCP tools), why a session starts with so many tokens, or invokes sw-doctor.

Firwat Sw Doctor op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Sw Doctor besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Sw Doctor an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/mhmtsrfglu/superwiki/tree/main/skills/sw-doctor an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Sw Doctor benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Sw Doctor benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Sw Doctor domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Sw Doctor gratis?

Jo. mhmtsrfglu huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇