Terug naar podcastsClaude
Claude Code skills
Je eerste skill aanmaken
So, let's create a skill.
Laten we een skill maken.
This skill will teach Claude how we would like it to explain code using visual diagrams and analogies.
Deze skill leert Claude hoe wij willen dat het code uitlegt met behulp van visuele diagrammen en analogieën.
[music]
[muziek]
Then, we'll look at what happens under the hood when Claude uses it.
Daarna kijken we wat er achter de schermen gebeurt als Claude het gebruikt.
First, [music] let's create a directory for your skill.
Eerst, [muziek] maken we een map voor je skill.
We're going to be making a personal skill, so it'll live in many projects, so it will go in your home directory.
We maken een persoonlijke skill, dus die komt beschikbaar in veel projecten en wordt opgeslagen in je home-directory.
Take into consideration that we're creating a directory with the skill name inside of the skills directory.
Houd er rekening mee dat we een map maken met de naam van de skill binnen de skills-map.
Now create the skill.
Maak nu de skill aan.
The name identifies your skill.
De naam identificeert je skill.
The description tells Claude when to use it.
De beschrijving vertelt Claude wanneer het te gebruiken.
This is the matching criteria.
Dit is het matchingcriterium.
And then everything after the second dashes is the instructions that Claude follows.
En alles na de tweede streepjes zijn de instructies die Claude volgt.
Cloud code loads skills at startup.
Claude Code laadt skills bij het opstarten.
So restart your session.
Start je sessie dus opnieuw op.
Then verify it's available.
Controleer dan of het beschikbaar is.
You should see PR description in the list.
Je zou PR description in de lijst moeten zien.
Now test it.
Test het nu.
Make some changes on a branch and say, "Write a PR description for my changes."
Maak enkele wijzigingen op een branch en zeg: "Schrijf een PR description voor mijn wijzigingen."
Claude will then show you that it's using the PR description skill.
Claude laat je dan zien dat het de PR description skill gebruikt.
After that, it'll check your diff and write a description following your template.
Daarna controleert het je diff en schrijft het een beschrijving op basis van je template.
Same format every single time.
Hetzelfde format elke keer.
When Cloud Code starts, it scans four locations for skills.
Wanneer Claude Code start, scant het vier locaties op skills.
Enterprise paths, your personal Claude skills, the project's Claude skills, and installed plugins.
Enterprise-paden, je persoonlijke Claude skills, de Claude skills van het project en geïnstalleerde plugins.
It loads only the name and description of each skill, not the full content.
Het laadt alleen de naam en beschrijving van elke skill, niet de volledige inhoud.
This is important later.
Dit is later belangrijk.
When you send a request, Claude compares it to the descriptions of your skills.
Wanneer je een verzoek stuurt, vergelijkt Claude dat met de beschrijvingen van je skills.
Explain what this function does matches a skill described as explain code with visual diagrams because the intent overlaps.
"Leg uit wat deze functie doet" komt overeen met een skill die omschreven is als "code uitleggen met visuele diagrammen" omdat de intentie overeenkomt.
It will then ask you to confirm loading up the skill.
Het vraagt je dan te bevestigen dat de skill geladen wordt.
This confirmation step keeps you aware of what context Claude is using.
Deze bevestigingsstap houdt je op de hoogte van welke context Claude gebruikt.
After you confirm, Claude reads the complete file and follows its instructions.
Na bevestiging leest Claude het volledige bestand en volgt de instructies.
Now, let's say you clone a Git repository and have an overlapping skill name.
Stel nu dat je een Git-repository kloont en een overlappende skillnaam hebt.
Well, which one wins?
Welke wint er dan?
Here's the priority list.
Dit is de prioriteitslijst.
The highest is enterprise, which lives in the manage settings.
De hoogste is enterprise, die in de beheerinstellingen staat.
Two is the personal, which lives in your root directory configuration like we're doing right now.
Tweede is persoonlijk, die in de configuratie van je root-directory staat, zoals we nu doen.
Three is the project which is the claw directory inside of your repository.
Derde is het project, dat in de .claude-directory binnen je repository staat.
And the lowest is the plugins where you store your plugins that you got online.
En de laagste zijn de plugins, waar je plugins bewaart die je online hebt verkregen.
This lets organizations enforce standards while allowing individual customization through differently named skills.
Dit stelt organisaties in staat standaarden af te dwingen en tegelijk individuele aanpassing toe te staan via skills met verschillende namen.
If your company has an enterprise code review skill and you create a personal code review skill, the enterprise version of that takes precedence.
Als je bedrijf een enterprise code review skill heeft en je maakt een persoonlijke code review skill, dan heeft de enterprise-versie voorrang.
To avoid conflicts, use descriptive names.
Gebruik beschrijvende namen om conflicten te vermijden.
Instead of review, use front-end PR review or security review.
Gebruik in plaats van review liever front-end PR review of security review.
To update a skill, edit it skill.md file.
Om een skill bij te werken, bewerk je het skill.md-bestand.
Simple.
Eenvoudig.
To remove one, delete its directory.
Om er een te verwijderen, verwijder je de map.
Restart clock code after changes for them to take effect.
Start Claude Code opnieuw op na wijzigingen om ze van kracht te laten gaan.
Creating a skill means making a directory with a skill.md file containing metadata and instructions.
Een skill maken betekent een map aanmaken met een skill.md-bestand dat metadata en instructies bevat.
Claude loads skill names and descriptions at startup.
Claude laadt skillnamen en -beschrijvingen bij het opstarten.
matches incoming requests against those descriptions and asks for confirmation before loading the full content.
Vergelijkt inkomende verzoeken met die beschrijvingen en vraagt om bevestiging voordat de volledige inhoud wordt geladen.
Priority rules handling name conflicts.
Prioriteitsregels behandelen naamconflicten.
Enterprise overrides personal personal overrides project overrides plugins.
Enterprise overschrijft persoonlijk, persoonlijk overschrijft project, project overschrijft plugins.
[music]
[muziek]
Edit the skill.md file to update a skill and restart cloud code for changes to take effect.
Bewerk het skill.md-bestand om een skill bij te werken en start Claude Code opnieuw op om de wijzigingen door te voeren.