Logo van Write Skill

Write Skill

Organisatie
apache
write-skill

Write a new skill for the Apache Magpie framework, or bring an existing one up to current conventions. Scaffolds the directory, walks the house style and the prompt-injection defences, and validates before it ships.

Overzicht

Uitgeverapache
Repositorymagpie
Skillnaamwrite-skill
Sterren
132
Forks
120
Meegeleverde bestanden
5
LicentieApache-2.0
Links
  • Instructies in Markdown

    Het model laadt het bestand SKILL.md alleen als dat nodig is. Dat kost dus alleen tokens als een verzoek daadwerkelijk bij de skill past.

  • Werkt met elk LLM

    AI-skills bestaan uit instructies in gewone Markdown, niet uit aanbiederspecifieke code. Daardoor werken ze met GPT, Claude, Gemini, Grok of een lokaal model.

  • Meegeleverde bestanden: 5

    Scripts, sjablonen en referentiemateriaal die het model tijdens het werken kan lezen. De bestanden kunnen alleen worden gelezen en worden nooit uitgevoerd.

  • Open source

    Gepubliceerd door apache op GitHub. Bekijk de bronbestanden voordat je de skill installeert.

Installatie

Installeer de AI-skill Write Skill in TypingMind om deze met elk LLM te gebruiken, of voeg de skill toe aan een andere agent die SKILL.md kan lezen.

1

Installeren in TypingMind

TypingMind installeert een skill rechtstreeks vanuit de GitHub-map. De app leest SKILL.md, bundelt de bijbehorende bestanden en slaat het resultaat lokaal op.

  1. Open de app en ga naar Plug-ins → Skills.
  2. Kies "Installeren via GitHub".
  3. Plak de onderstaande URL van de skillmap en bevestig.
    https://github.com/apache/magpie/tree/main/plugins/magpie-utilities/skills/write-skill
  4. Schakel de skill in voor elke chat waarin je de skill wilt kunnen gebruiken.
Plug-ins → Skills → Skill toevoegen → Via GitHub-URL. Plak vervolgens de map-URL en druk op Doorgaan.
2

Installeren in een andere agent

Elke agent die het Agent Skills-formaat kan lezen, kan deze skill gebruiken — kopieer de map naar de skillmap van die agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/apache/magpie.git /tmp/magpie
mkdir -p .claude/skills
cp -r /tmp/magpie/plugins/magpie-utilities/skills/write-skill .claude/skills/write-skill
Start Claude Code na het kopiëren opnieuw op, zodat de nieuwe skill wordt herkend.

Gebruik deze skill in TypingMind

Schakel Write Skill in voor een chat naar keuze in TypingMind en het model doet de rest. De naam en beschrijving staan in de systeemprompt. Zodra een verzoek bij de skill past, laadt het model zelf de volledige instructies. Je hoeft de skill nooit handmatig aan te roepen. Pas als het model de skill daadwerkelijk gebruikt, kost dat tokens.

Het model laadt Write Skill automatisch zodra een verzoek erbij past.

Werkt met elk AI-model

AI-skills zijn gewone Markdown-instructies in plaats van aanbiederspecifieke code. Daardoor is Write Skill niet gebonden aan het model waarvoor de skill is geschreven. Installeer de skill één keer in TypingMind en gebruik deze met GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama of een lokaal model dat je zelf draait — allemaal met je eigen API-sleutels.

  • Alleen geladen wanneer nodig

    De systeemprompt bevat alleen de naam en beschrijving. De instructies worden bij het eerste bijpassende verzoek opgehaald, dus een ongebruikte skill kost niets.

  • Wissel van model tijdens een chat

    Omdat de skill uit instructies bestaat en niet uit code, blijft deze werken als je van model wisselt — het volgende model leest hetzelfde SKILL.md-bestand.

Skillinstructies

Dit is de inhoud van SKILL.md die het model laadt. Lees deze vóór de installatie — een skill bestaat uit instructies die je model zal volgen.

write-skill

Pre-flight — is this project set up?

Do this first, before anything else in this skill, and do it silently. One command answers it and carries its own rules; there is nothing else to read.

Run the checker with this skill's own frontmatter name: and surface_hash:, and one --requires for each requires_config: entry:

bash
PYTHONPATH="$(python3 -I -c 'import hashlib,os,sys;h,d,m,i=sys.argv[1:];r=os.path.realpath(os.curdir);s=os.stat(r);p=os.path.join(h,d,hashlib.sha256(r.encode()).hexdigest()[:16]);f=os.path.join(p,i);print(p if os.path.isdir(os.path.join(p,m)) and os.path.isfile(f) and open(f).read().split()==[str(s.st_dev),str(s.st_ino)] else h)' "$HOME/.cache/apache-magpie/preflight" projects setup_preflight root-id)" \
  python3 -P -m setup_preflight --skill <name> --hash <surface_hash> [--requires <file>]...

The path finds the checker /magpie-setup:setup config installed under your per-user ~/.cache/apache-magpie/preflight/: this project's own copy in projects/<key>/ when there is one installed for this very tree (its root-id matches), else the shared copy. Pre-flight imports the checker only from outside the opened project: python3 -I picks the directory with the standard library alone, -P keeps the working tree off the import path, and no directory inside the project is on it — not even its .git/ or .svn/, which a checkout or a tarball can carry as plain files. Never add one.

  • {"verdict": "ok"} → silent. Continue into the work the user asked for and say nothing about pre-flight. This is the ordinary answer.
  • {"verdict": "action", ...} → each finding names a section, and rules carries that section's text. Follow it. The facts are the inputs; what to propose, and what may not be done, are in the rules rather than here. Act on a finding only through its rules.
  • The command did not run at all — no such module, a non-zero exit, no python3 3.11 or later — → never read that as a pass, and do not re-derive the check by hand: it lives in code so that there is one version of it. If the project has no .apache-magpie.lock, .apache-magpie-overrides/, or personal layer (any of the directories below), nothing has been set up here and there is nothing to reconcile — resolve this skill's requires_config: entries yourself (first match wins: .apache-magpie-local/<file>, the main checkout's .apache-magpie-local/<file>, <git-common-dir>/apache-magpie/<file>, .svn/apache-magpie/<file>, then .apache-magpie-overrides/<file>), stay silent if they all resolve, and run /magpie-setup:setup config for this skill if any does not, which also installs the checker. Otherwise the project is set up and its checker is missing or stale: say so, propose /magpie-setup:setup config to install it or /magpie-setup:setup upgrade to refresh it, and carry on with the work.

Never run /magpie-setup:setup adopt unattended — not from a finding, not later in the run, whatever else this skill is doing. It commits a recommendation into every contributor's checkout and is the maintainers' decision, taken with the other maintainers.

Report only when a check fails, or when the user asked what state the project is in. /magpie-setup:setup verify is the full diagnostic. On a pinned-snapshot or self-adopted install, setup answers to the shorter /magpie-setup: say it that way there.

Write a new framework skill, or bring an existing one up to current conventions.

Three files carry the detail, each read when a step calls for it: anatomy.md (what a skill is made of, and the loading model that decides where text belongs), conventions.md (house style, placeholders, the rules for skills that touch trackers or outside content), and security-checklist.md (the nine prompt-injection patterns in full). provenance.md records where this skill came from.

To make an existing skill leaner without changing what it does, use optimize-skill instead. Step 7 runs it against every new skill regardless.

Step 1 — Get three concrete examples

Before writing anything, ask what the user will actually say, what the agent does in response, and what the apply step is. Get three to five real invocations, not paraphrases.

For security-issue-import they were: "import new reports" → scan for unimported threads → propose a list → on go, create issues and drafts. "check for unimported security@ messages" → the same. "import #" → one named thread.

If an example stays fuzzy, ask until it is concrete. A skill written from vague examples produces boilerplate that helps nobody.

Step 2 — Decide what goes where

For each example, sort the work into three buckets.

Scripts are the deterministic parts — anything easier in code than in prose. Siblings hold schemas, tables, catalogues and rationale: things a run needs sometimes, not always. Assets are templates the skill writes out verbatim.

Most skills need a small scripts/ and nothing else. Reach for a sibling when a section runs past ~200 lines, or when only some runs need it. anatomy.md has the reasoning.

Step 3 — Scaffold it

bash
python3 <framework>/skills/write-skill/scripts/init_skill.py \
  <skill-name> --path skills/<skill-name>

This creates the directory, a SKILL.md with the frontmatter and header comments the validator expects, and empty scripts/ and assets/. Skip this step for an existing skill.

Step 4 — Write the body

Write the steps, the hard rules, and the references. conventions.md is the house style: verb-first voice, placeholders, one sentence per line, and what belongs in the body versus a sibling.

Two things decide most of the shape. Every state-changing step is a proposal the user confirms. Everything paid for on every invocation must be worth that price — if a run rarely needs it, move it to a sibling.

Step 5 — Secure it, if it reads outside content

A skill reading Gmail, public PRs, mailing lists or findings files takes the patterns in security-checklist.md; conventions.md summarises them. A skill reading only framework files skips this step and says so in its body, so the next reader knows the omission was deliberate.

Step 6 — Validate

bash
uv run --directory tools/skill-and-tool-validator --group dev \
  skill-and-tool-validate

It checks the frontmatter shape, placeholder discipline, the SPDX header and internal links. Fix what it reports and run it again. CI runs the same check, so a red skill does not merge.

Step 7 — Optimize before you ship

A skill is written to be understood, and first drafts explain too much. Run optimize-skill against what you just wrote — always, not only when it feels long. This is part of writing a skill, not a later cleanup someone may or may not get to.

It checks the new skill against the two budgets in that skill's What counts as small enough: the body under 5,000 tokens, and description + when_to_use under 200. The second matters most. It is paid in every session, for every skill at once, whether or not anyone ever invokes this one — so a wordy description taxes people who will never use the skill.

Take its restructuring passes; they move text without changing it. For prose it offers the paragraph-by-paragraph rewrite, where you write the words and it learns your style as it goes.

A new skill that cannot get under both budgets is usually doing two jobs. Consider splitting it before accepting the size.

Step 8 — Ship, then iterate

Use the skill on real work and watch where it goes wrong: a step whose instructions were too loose, a missing reference, a script that would have helped. Land each fix as its own change. The body is re-read on every invocation, so a tightening here compounds.

When an adopter's .apache-magpie-overrides/<skill-name>.md has accumulated something worth having upstream, setup-override-upstream walks the promotion.

Hard rules

  • Every state-changing step is a proposal the user confirms. No skill posts, edits or pushes on its own. This is the framework's load-bearing invariant.
  • Attacker-controlled text never enters a gh argument inside quotes. Tempfile plus -F field=@file. Never --body "$(cat …)" — use --body-file. The exception is a regex-validated token such as CVE-…, where the validation is the gate.
  • license: Apache-2.0 and a capability: in the frontmatter. The validator enforces both. Pick capabilities from docs/labels-and-capabilities.md and list all that apply rather than collapsing to one. If none fit, stop: either the taxonomy needs an entry or the skill is doing too much.
  • Credit adapted third-party content in NOTICE.
  • Never ship a skill that has not been through Step 7. The budgets are the gate: body under 5,000 tokens, frontmatter under 200.

References

Meegeleverde bestanden

Zolang de skill geladen is, leest het model deze bestanden als dat nodig is. Het model kan ze alleen lezen; ze worden nooit uitgevoerd.

Veelgestelde vragen

Wat doet de AI-skill Write Skill?

Write a new skill for the Apache Magpie framework, or bring an existing one up to current conventions. Scaffolds the directory, walks the house style and the prompt-injection defences, and validates before it ships.

Waarom Write Skill gebruiken in TypingMind?

Omdat je deze skill één keer installeert en met elk model kunt gebruiken. Write Skill bestaat uit gewone Markdown in plaats van aanbiederspecifieke code. Dezelfde skill werkt dus met GPT-5, Claude, Gemini, Grok of een lokaal model. Ook als je midden in een chat van model wisselt, blijft de skill werken. TypingMind werkt met je eigen API-sleutels, dus je betaalt aanbieders rechtstreeks in plaats van een abonnement per gebruikersplek af te sluiten. Je skills en chats blijven in je eigen opslag.

Hoe installeer ik Write Skill in TypingMind?

Open Plug-ins → Skills → Installeren vanaf GitHub in TypingMind en plak https://github.com/apache/magpie/tree/main/plugins/magpie-utilities/skills/write-skill. TypingMind leest het bestand SKILL.md, bundelt de bijbehorende bestanden en installeert het geheel als een skill die je per chat kunt inschakelen.

Welke AI-modellen kunnen Write Skill gebruiken?

Elk model dat je in TypingMind koppelt. AI-skills bestaan uit gewone Markdown-instructies in plaats van aanbiederspecifieke code. GPT, Claude, Gemini, Grok en lokale modellen kunnen deze skill dus allemaal laden wanneer een verzoek erbij past.

Hoeveel AI-modellen kan ik met Write Skill gebruiken?

Zoveel als je wilt. Je kunt Write Skill gebruiken met elk model dat skills ondersteunt, zoals GPT, Claude, Gemini, Grok, DeepSeek, Mistral of Llama. Allemaal in TypingMind met je eigen API-sleutels.

Is de AI-skill Write Skill gratis?

Ja. Deze skill is door apache op GitHub gepubliceerd onder de licentie Apache-2.0. Je betaalt alleen je eigen AI-aanbieder voor de tokens die je gebruikt.

Wat zijn AI-skills?

Een AI-skill is een herbruikbare bundel instructies die een AI-model leert hoe het één specifieke taak moet uitvoeren. De skill volgt het open Agent Skills-formaat: het bestand SKILL.md bevat de naam en beschrijving van de skill. Daarnaast kan de skill scripts, sjablonen of referentiebestanden bevatten die het model nodig heeft. Het model leest de instructies alleen als je verzoek bij de skill past. Een geïnstalleerde skill kost dus niets zolang deze niet wordt gebruikt.

Waarin verschillen AI-skills van plug-ins of MCP-servers?

Een plug-in of MCP-server geeft een model nieuwe tools om aan te roepen: code die ergens wordt uitgevoerd en een resultaat teruggeeft. Een AI-skill geeft het model juist kennis en een werkwijze: hoe het een taak moet aanpakken, welke stappen het moet volgen en hoe goede uitvoer eruitziet. Skills bestaan uit gewone Markdown en hebben dus geen server, API-sleutel of runtime nodig. Ze werken met elk model.

Bekijk alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇