Claude Code Skills, Plugins und Hooks: Erst prüfen, dann vertrauen
Ein von Claude Code selbst erstelltes Skill für das Spiel Omok entsprach nicht den Erwartungen, zeigt ein Beispiel aus der Praxis. Skills sind Anweisungen, auf die Claude Code bei bestimmten Aufgaben zurückgreift, doch der Inhalt sollte immer kontrolliert werden.

In Lektion 4 bat ich Claude Code, es in einen Skill umzuwandeln, und es erstellte einen Skill zum Prüfen von Omok, auch bekannt als Gomoku (fünf in einer Reihe). Ein Skill ist eine Sammlung von Anweisungen, auf die Claude Code bei einer bestimmten Aufgabe zurückgreift. Aber nur weil es sagt, dass ein Skill erstellt wurde, kann ich davon ausgehen, dass er so funktioniert, wie ich es mir wünsche?
Als ich die Dateien öffnete, stellte ich fest, dass die Methode zur Browser-Prüfung anders war als erwartet. In diesem Artikel zeige ich, wie man einen Skill inspiziert und anpasst, ein von jemand anderem erstelltes Plugin installiert und erkundet sowie einen Hook einrichtet, der einen Befehl zu einem bestimmten Zeitpunkt ausführt.
Der Omok-Prüf-Skill aus Lektion 4 liegt in.claude/skills/check-omok/SKILL.md innerhalb des Omok-Projektordners. Ein hier gespeicherter Skill kann in diesem Projekt verwendet werden. Wenn Sie ihn projektübergreifend nutzen möchten, können Sie ihn in ~/.claude/skills/ in Ihrem Benutzerordner ablegen.
Anfangs hatte ich nur gefragt: Mach es zu einem Skill, ohne anzugeben, wo es gespeichert werden soll. Um zwischen einem Projekt-Skill und einem Benutzer-Skill zu wählen, müssen Sie wissen, dass der Speicherort bestimmt, wo der Skill gilt. Wenn Sie ihn in jedem Projekt verwenden möchten, ist es hilfreich, sowohl Ort als auch Geltungsbereich anzugeben, zum Beispiel: Mach es zu einem Benutzer-Skill. Manchmal braucht man dieses Grundwissen, um von der KI das gewünschte Ergebnis zu bekommen.
Am Anfang der Datei stehen name, der Name des Skills, und description, die erklärt, wann er verwendet werden soll. Die Beschreibung vor meinen Änderungen sah so aus:
--- name: check-omok description: "오목(index.html)을 고친 뒤 실제 브라우저(헤드리스 크롬)로 열어 돌을 두어 보고, 화면이 제대로 그려지는지 스크린샷으로 확인한다. index.html을 수정한 다음, 또는 사용자가 \"확인해 줘\", \"돌려 봐\", \"브라우저에서 되는지 봐 줘\"라고 할 때 사용." --- Enter fullscreen mode Exit fullscreen mode Die Beschreibung besagt, dass der Skill nach der Bearbeitung von index.html oder auf Aufforderung zur Prüfung verwendet werden soll, indem in einem Headless-Chrome-Browser gespielt und das Ergebnis per Screenshot überprüft wird.
In der Beschreibung wird Headless Chrome erwähnt. Das hatte Claude in die Skill-Beschreibung geschrieben. Der darunter stehende Hauptteil listete die Schritte auf: Syntax prüfen, im Browser spielen, einen Screenshot prüfen und das Ergebnis melden.
Ich hatte die Browser-Erweiterung Claude in Chrome installiert und nutzte sie. Deshalb nahm ich an, dass der Omok-Prüf-Skill diese Erweiterung zur Browsersteuerung verwenden würde. Aber in Schritt 2 des Skills, Öffne es im Browser und spiele, fand ich diesen Befehl:
Der Skill-Ordner enthielt neben SKILL.md auch check.mjs. Mit anderen Worten: Ein Skill ist nicht nur eine einzelne Anweisungsdatei. Er kann auch Programme oder Materialien enthalten, die für die Aufgabe nötig sind. In diesem Fall nutzte die Browser-Prüfung Node, um check.mjs auszuführen, nicht die Claude-in-Chrome-Erweiterung.
Beide Methoden können denselben Zweck erfüllen: Omok im Browser prüfen. Aber selbst wenn das Ergebnis gleich ist, kann die Methode unterschiedlich sein. Wenn Sie ein bestimmtes Werkzeug oder Vorgehen erwarten, geben Sie neben dem gewünschten Ergebnis auch die Methode an.
Aktualisiere den check-omok-Skill. Verwende für Browser-Prüfungen die Claude-in-Chrome-Erweiterung, um den Browser zu öffnen.
Öffnen Sie nach der Änderung SKILL.md erneut und prüfen Sie, ob die Prüfschritte nun dem entsprechen, was Sie wollten. Rufen Sie den Skill dann mit /check-omok auf und nutzen Sie ihn, um den Browser zu prüfen.
Einen Skill direkt mit einem Befehl wie /check-omok aufzurufen, ist nicht die einzige Möglichkeit, ihn zu verwenden. Sie können auch beobachten, ob Claude Code die Situation anhand der Beschreibung erkennt und den Skill von selbst aufruft. Stellen Sie die Anfrage diesmal ohne Slash-Befehl:
In meinem Fall genügte diese Anfrage, um den Omok-Prüf-Skill auszulösen. Wenn der Skill in der erwarteten Situation nicht aufgerufen wird, können Sie darum bitten, seine Beschreibung so anzupassen, dass sie klarer erklärt, wann er verwendet werden soll.
Ein Plugin ist ein Paket, das mehrere Funktionen bündeln kann, etwa Skills, Befehle und MCP-Verbindungen. Ein von jemand anderem erstelltes Plugin kann Ihnen Zugriff auf Workflows geben, die Sie nicht selbst zusammengestellt haben.
Diesmal verwende ich das Plugin frontend-design von Anthropic. Ein Marketplace ist eine Sammlung von Plugins. Dieses Plugin befindet sich im offiziellen Marketplace claude-plugins-official.
Zunächst bat ich: Mach den Omok-Bildschirm schöner, und prüfte den Bildschirm, bevor ich das Plugin installierte. Dann öffnete ich /plugin und installierte es.
/plugin install frontend-design@claude-plugins-official Enter fullscreen mode Exit fullscreen mode Ich wiederholte dieselbe Anfrage und verglich die Bildschirme. Im Video variierten die Ergebnisse: Manchmal änderte sich das Design erheblich, manchmal nur sehr wenig. In jedem Fall ist es eine gute Idee, Name und Zweck eines Plugins vor der Installation zu prüfen.
Ein Plugin-Ordner enthält Dateien mit Informationen wie Name und Beschreibung sowie Dateien, die zu seinen Funktionen gehören. plugin.json enthält Informationen wie das Namenslabel eines Plugins. skills/frontend-design/SKILL.md enthält Anweisungen zum Gestalten von Web-Oberflächen. Sie leiten Claude an, Farben, Schriftarten und Layouts auf Basis des Zwecks der Oberfläche und der Nutzer auszuwählen. Der Kern dieses Plugins ist ein Skill, der Design-Leitlinien bereitstellt.
Allerdings kann jeder Skills und Plugins erstellen und verbreiten. Je nach Inhalt können sie Claude Code Zugriff auf Dateien auf Ihrem Computer ermöglichen oder Programme ausführen. Prüfen Sie daher deren Quelle und ihre Funktionsweise. Wenn nicht erkennbar ist, was etwas ausführt, und Sie der Quelle nicht vertrauen, ist es sicherer, es nicht zu verwenden.
Skills lassen sich auch für Aufgaben jenseits der Softwareentwicklung nutzen. Anthropic stellt in document-skills Skills für die Arbeit mit PowerPoint-, Excel-, Word- und PDF-Dateien bereit. Fügen Sie zunächst das offizielle Repository zum Marketplace hinzu und installieren Sie das Plugin.
/plugin marketplace add anthropics/skills Enter fullscreen mode Exit fullscreen mode /plugin install document-skills@anthropic-agent-skills Enter fullscreen mode Exit fullscreen mode
Bitten Sie dann: Erstelle eine Präsentation, die Omok vorstellt, und prüfen Sie, ob der pptx-Skill verwendet wird. Sie können die erzeugte Datei öffnen und die Folien durchsehen. Skills können bei Präsentationen und beim Schreiben von Dokumenten helfen, nicht nur beim Programmieren.
Ein Hook ermöglicht es, eine Aktion mit einem bestimmten Punkt im Ablauf eines Programms zu verknüpfen. In Claude Code können Sie einen Hook so konfigurieren, dass er in bestimmten Situationen ausgeführt wird, etwa wenn die Arbeit abgeschlossen ist oder wenn eine Freigabe benötigt wird. Mit /hooks können Sie prüfen, welche Hooks konfiguriert sind.
Diesmal bat ich um eine Desktop-Benachrichtigung, wenn die Arbeit abgeschlossen ist oder eine Freigabe benötigt wird:
Füge einen Hook hinzu, der eine Desktop-Benachrichtigung anzeigt, wenn die Arbeit erledigt ist oder ich meine Zustimmung geben soll.
Da der Benachrichtigungsbefehl je nach Betriebssystem unterschiedlich ist, bat ich darum, statt den Befehl selbst zu schreiben. Prüfen Sie nach dem Einrichten mit /hooks, ob für beide Situationen Hooks konfiguriert sind: Abschluss der Arbeit und Freigabeanfragen.
Selbst wenn Sie Anweisungen in CLAUDE.md oder einem Skill schreiben, folgt die KI ihnen womöglich nicht. Im Gegensatz dazu führt ein Hook zur Befehlsausführung den angegebenen Befehl aus, sobald die konfigurierte Situation eintritt, unabhängig vom Urteil der KI.
Der entscheidende Punkt ist, dass Sie von der KI erstellte Funktionen inspizieren und anpassen können. SKILL.md ist in einfacher Sprache geschrieben. Auch wenn Sie nicht programmieren können, können Sie nachlesen, was es tun soll. Ein Skill kann auch Programmdateien enthalten. Prüfen Sie daher, wie er tatsächlich ausgeführt wird.
Als Sie Ihren Omok-Prüf-Skill geöffnet haben: Welche Methode verwendete er, um den Browser zu prüfen?
▶ Aktivieren Sie englische Untertitel (CC) zum Anschauen
Dieser Artikel fasst mein koreanisches YouTube-Video zusammen (englische Untertitel verfügbar) und wurde mit KI übersetzt. #ABotWroteThis
Automatisch übersetzt. Das Original auf Englisch ist unten aufklappbar.
Original (Englisch) anzeigen
In lesson 4, I asked Claude Code to “make it into a skill,” and it created a skill for checking Omok, also known as Gomoku (five in a row). A skill is a set of instructions Claude Code refers to when doing a particular task. But just because it says a skill has been created, can I assume it will work the way I want?
When I opened the files, I found that the browser-checking method was different from what I expected. In this article, I’ll show how to inspect and adjust a skill, install and explore a plugin made by someone else, and set up a hook that runs a command at a specific moment.
The Omok-checking skill from lesson 4 is in.claude/skills/check-omok/SKILL.md inside the Omok project folder. A skill saved here can be used in that project. If you want to use it across multiple projects, you can put it in ~/.claude/skills/ inside your user folder.
At first, I only asked, “Make it into a skill,” without specifying where to save it. To choose between a project skill and a user skill, you need to know that the save location affects where the skill applies. If you want to use it in every project, it’s helpful to specify both the location and scope, for example, “Make it a user skill.” Sometimes you need this basic knowledge to get the result you want from AI.
At the top of the file are name, the skill’s name, and description, which explains when to use it. The description before my changes looked like this:
--- name: check-omok description: "오목(index.html)을 고친 뒤 실제 브라우저(헤드리스 크롬)로 열어 돌을 두어 보고, 화면이 제대로 그려지는지 스크린샷으로 확인한다. index.html을 수정한 다음, 또는 사용자가 \"확인해 줘\", \"돌려 봐\", \"브라우저에서 되는지 봐 줘\"라고 할 때 사용." --- Enter fullscreen mode Exit fullscreen mode The description says to use the skill after editing index.html or when asked to check it, by playing in a headless Chrome browser and verifying the screen with a screenshot.
The description mentions “headless Chrome.” That’s what Claude put in the skill description. The body below it listed the steps: check the syntax, play in the browser, check a screenshot, and report the result.
I had installed and was using the Claude in Chrome browser extension. So I thought the Omok-checking skill would use that extension to control the browser. But in step 2 of the skill, “Open it in the browser and play,” I found this command:
The skill folder contained check.mjs as well as SKILL.md. In other words, a skill isn’t just a single instruction file. It can also include programs or materials needed for the task. In this case, the browser check used Node to run check.mjs, not the Claude in Chrome extension.
Both methods can serve the same purpose: checking Omok in a browser. But even when the result is the same, the method can differ. If you need a particular tool or procedure to be followed, specify the method as well as the desired result.
Update the check-omok skill. For browser checks, use the Claude in Chrome extension to open the browser.
After the change, open SKILL.md again and check whether the verification steps now match what you wanted. Then call the skill with /check-omok and use it to check the browser.
Calling a skill directly with a command like /check-omok isn’t the only way to use it. You can also see whether Claude Code recognizes the situation from the description and calls the skill on its own. This time, make the request without a slash command:
In my case, that request was enough to trigger the Omok-checking skill. If the skill doesn’t get called in the situation you expect, you can ask for its description to explain more clearly when it should be used.
A plugin is a package that can bundle multiple features, such as skills, commands, and MCP connections. Using a plugin made by someone else can give you access to workflows you haven’t put together yourself.
This time, I’m using Anthropic’s frontend-design plugin. A marketplace is a collection of plugins. This plugin is in the official marketplace, claude-plugins-official.
First, I asked, “Make the Omok screen look better,” and checked the screen before installing the plugin. Then I opened /plugin and installed it.
/plugin install frontend-design@claude-plugins-official Enter fullscreen mode Exit fullscreen mode I entered the same request again and compared the screens. In the video, the results varied: sometimes the design changed substantially, and sometimes it changed very little. Either way, it’s a good idea to check a plugin’s name and purpose before installing it.
A plugin folder contains files with information such as its name and description, as well as files related to its features. plugin.json contains information like a plugin’s name label. skills/frontend-design/SKILL.md contains instructions for designing web screens. It guides Claude to choose colors, fonts, and layouts based on the screen’s purpose and users. The core of this plugin is a skill that provides design guidance.
However, anyone can create and distribute skills and plugins. Depending on their contents, they may allow Claude Code to access files on your computer or run programs, so check their source and what they do. If it’s hard to tell what something will run and you don’t trust where it came from, it’s safer not to use it.
Skills can be used for tasks beyond software development. Anthropic provides skills for working with PowerPoint, Excel, Word, and PDF files in document-skills. First, add the official repository to the marketplace and install the plugin.
/plugin marketplace add anthropics/skills Enter fullscreen mode Exit fullscreen mode /plugin install document-skills@anthropic-agent-skills Enter fullscreen mode Exit fullscreen mode
Then ask, “Make a presentation introducing Omok,” and check whether the pptx skill is used. You can open the generated file and look through the slides. Skills can help with presentations and document writing, not just programming.
A hook lets you connect an action to a particular point in a program’s workflow. In Claude Code, you can configure a hook to run in specific situations, such as when work is complete or when approval is needed. You can use /hooks to check which hooks are configured.
This time, I asked for a desktop notification when work was complete or approval was needed:
Add a hook that shows a desktop notification when the work is done or you need my approval.
Since the notification command differs by operating system, I asked instead of writing the command myself. After setting it up, check /hooks to make sure hooks are configured for both situations: work completion and approval requests.
Even if you write instructions in CLAUDE.md or a skill, the AI might not follow them. By contrast, a command-execution hook runs the specified command when its configured situation occurs, regardless of the AI’s judgment.
The key point is that you can inspect and adjust features created by AI. SKILL.md is written in plain language, so even if you don’t know how to program, you can read what it’s supposed to do. A skill may also include program files, so check how it actually runs.
When you opened your Omok-checking skill, what method was it using to check the browser?
▶ Turn on English subtitles (CC) to watch
This article summarizes my Korean YouTube video (English subtitles available) and was translated with AI. #ABotWroteThis