Logo vun Skillsaw Create Plugin

Skillsaw Create Plugin

Communautéit
stbenjam
skillsaw-create-plugin

Create a skillsaw rule plugin — a pip-installable Python package that adds custom lint rules to skillsaw. Walks through scaffolding the package, writing rules against the lint tree, testing, and publishing to PyPI. Use when a user wants to share skillsaw rules across repositories or publish them for others.

Iwwersiicht

Editeurstbenjam
Repositoryskillsaw
Skill-Nummskillsaw-create-plugin
Stären
69
Forks
15
Matgeliwwert Fichieren
2
LizenzApache-2.0
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.

  • 2 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

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

Installatioun

Installéiert de KI-Skill Skillsaw Create Plugin an TypingMind, fir e mat all LLM ze benotzen, oder füügt 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 „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/stbenjam/skillsaw/tree/main/.agents/skills/skillsaw-create-plugin
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu 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 de Skill-Verzeechnes vun deem KI-Agent.

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

An TypingMind benotzen

Aktivéiert Skillsaw Create Plugin 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 Skillsaw Create Plugin automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Skillsaw Create Plugin 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-Keys.

  • 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.

skillsaw Create Plugin

Create a skillsaw rule plugin: a Python package that adds lint rules to skillsaw. Once you build and publish to PyPI, anyone can pip install it and skillsaw picks up the rules automatically — no config required. Prefer this to per-repo custom-rules: files when sharing rules across repos.

Keep the terminology straight: a skillsaw plugin adds rules to the skillsaw linter itself. Never confuse it with the Claude Code plugins that skillsaw lints.

Review this reference material while you work:

Follow each step in order, and keep the user updated on progress at each stage.

Step 1: Gather requirements

Review the following with the user:

  1. What should each rule check? Get concrete examples of content that should pass and content that should fail.
  2. Rule IDs — use kebab-case, descriptive (e.g. no-todo-instructions). Run skillsaw list-rules and confirm no ID collides with a builtin rule or another installed plugin; skillsaw never loads colliding plugin rules.
  3. Severity — set each rule to error (must fix), warning (should fix), or info (advisory).
  4. Package name — follow the convention skillsaw-<name> on PyPI with module skillsaw_<name> (e.g. skillsaw-acme-rules / skillsaw_acme_rules).
  5. Tunable settings — set anything a user could reasonably want to adjust (patterns, thresholds, allowlists) in config_schema; never hardcode it.

Step 2: Create the package layout

Create this layout:

skillsaw-<name>/
├── pyproject.toml
├── README.md
├── src/
│   └── skillsaw_<name>/
│       ├── __init__.py
│       └── rules.py
└── tests/
    ├── fixture/
    │   └── CLAUDE.md          # realistic fixture the rules run against
    └── test_rules.py

Write pyproject.toml — the entry point is what makes it a plugin:

toml
[build-system]
requires = ["setuptools>=61"]
build-backend = "setuptools.build_meta"

[project]
name = "skillsaw-<name>"
version = "0.1.0"
description = "<one line: what the rules enforce>"
readme = "README.md"
requires-python = ">=3.9"
dependencies = ["skillsaw>=0.22.0"]

[project.entry-points."skillsaw.plugins"]
<name> = "skillsaw_<name>"

[tool.setuptools.packages.find]
where = ["src"]

Set the entry point name (left of =) as the plugin's short name — it appears in skillsaw plugins output and in plugins: {disable: [...]} config. Use it to point at the module that declares the rules.

Write src/skillsaw_<name>/__init__.py:

python
from .rules import MyFirstRule

SKILLSAW_RULES = [MyFirstRule]

Declare every rule class the plugin provides in SKILLSAW_RULES — the explicit list skillsaw looks for.

Step 3: Write the rules

Read references/rule-authoring.md in this skill's directory for the full rule template, the requirements every rule must meet (lint tree discovery, line numbers, config_schema, repo_types, default_enabled, YAML and markdown parsing rules), and the deterministic-autofix template with its scoping and idempotency requirements. Follow it exactly — the requirements match what skillsaw's own review process enforces.

Implement each rule as a subclass of skillsaw.Rule in src/skillsaw_<name>/rules.py: use context.lint_tree.find(NodeType) to find files, add violations via self.violation(message, block=block, line=i), and set tunable settings through config_schema.

Add optional capabilities

Read references/extensions.md when the plugin needs any of:

  • A CLI subcommand — add a skillsaw-<name> console script, dispatched as skillsaw <name> [args...] (registered plugins only).
  • A custom repo type — declare a detector in SKILLSAW_REPO_TYPES; detected types scope rules (string entries in repo_types) and pull the type's content_paths into content linting.
  • Lint tree nodes — use SKILLSAW_TREE_CONTRIBUTORS to attach plugin-defined blocks (ContentBlock for prose, JsonConfigBlock for machine config), and let rules read them with lint_tree.find().

Step 4: Write tests

Write tests in tests/test_rules.py that cover at minimum:

  1. Verify the rule fires on the fixture with the expected message and line number.
  2. Check that clean content produces no violations.
  3. Verify config_schema settings change behavior.
  4. If the rule has autofix: check the fix removes only the flagged lines, re-checking fixed content finds nothing, and fixing twice is a no-op. Call invalidate_read_caches() (from skillsaw.rules.builtin.utils) — always call it before you re-check, since skillsaw caches file reads within a process.

Keep the fixture realistic — a CLAUDE.md that looks like a real project's, not a one-line stub. Follow the example plugin's tests for the full pattern.

Run the tests:

console
$ python -m venv .venv && .venv/bin/pip install -e . pytest
$ .venv/bin/pytest

Step 5: Verify the plugin end-to-end

Install the package with pip install -e . in the same environment as skillsaw:

  1. Run skillsaw plugins — the plugin appears with its rules and no ERROR lines.
  2. Run skillsaw lint <repo-with-violations> — the rule fires, and the violation's source is plugin:<name> in --format json output; verify it.
  3. Run skillsaw explain <rule-id> — it shows the rule's description and config.
  4. If it has autofix: run skillsaw fix --rule <rule-id> to apply it; a second run changes nothing.
  5. Run skillsaw lint --no-plugins — the rule disappears, confirming it loads via the entry point and never some other path.

Step 6: Write the README

Write the plugin's README.md, documenting:

  • Include what the rules enforce and why, with a violating and a passing example.
  • Install instructions (pip install skillsaw-<name>).
  • Include each rule's ID, default severity, and config_schema options with a .skillsaw.yaml snippet.
  • Include how to disable: plugins: {disable: [<name>]} or per-rule enabled: false.

Step 7: Build and publish to PyPI

Ask the user whether to publish now; if yes, run:

console
$ pip install build twine
$ python -m build
$ twine upload dist/*

For a GitHub-hosted plugin, offer to set up trusted publishing with a release workflow instead of long-lived API tokens; always pin action SHAs.

After publishing, verify a fresh pip install from PyPI works in a clean environment:

console
$ pip install skillsaw-<name>
$ skillsaw plugins

Step 8: Wrap up

Report to the user:

  • Package name, module, and entry point name
  • Rules created (ID, severity, autofix support, config options)
  • Test results
  • Where it was published (or how to publish later)
  • How users consume it: pip install skillsaw-<name> next to skillsaw, then rules run automatically; configure per rule ID in .skillsaw.yaml

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Skillsaw Create Plugin?

Create a skillsaw rule plugin — a pip-installable Python package that adds custom lint rules to skillsaw. Walks through scaffolding the package, writing rules against the lint tree, testing, and publishing to PyPI. Use when a user wants to share skillsaw rules across repositories or publish them for others.

Firwat Skillsaw Create Plugin op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Skillsaw Create Plugin 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 vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Skillsaw Create Plugin an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/stbenjam/skillsaw/tree/main/.agents/skills/skillsaw-create-plugin an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Skillsaw Create Plugin 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 Skillsaw Create Plugin benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Skillsaw Create Plugin domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Skillsaw Create Plugin gratis?

Jo. De Skill gëtt vum stbenjam ënner der Lizenz Apache-2.0 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 weiderverwendbaart Pak vun Instruktiounen, dat 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 en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

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