extension-builder
Skill19 starsChanged 6 days agoMITView on GitHub
Use when the user wants to scaffold a new Pyrite extension from a description. Generates the full directory structure, plugin class, entry types, validators, preset, tests, and installs in dev mode.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- autohandai/community-skillstheir own version, first seen Nov 29, 2026
- pyrite-wiki/pyriteword for word, first seen Nov 27, 2026
Other versions2 projects use a version of this.
Word for word · 1
- pyrite-wiki/pyrite★ 19100% same
Edited · 0
None found.
Wrote their own version · 1
- autohandai/community-skills★ 14same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kb-lifecycleSkill
- kbSkill
- pyrite-devSkill
- software-kbSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Ask the user for:
- Very specific: line 126
All list/dict fields MUST handle None → default: meta.get("field", []) or []
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Extension Builder Skill
Scaffolds a complete Pyrite extension from a user description. Generates all required files, optionally generates hooks/tables/workflows/CLI, and verifies the plugin loads.
Announce at start: "I'm using the extension-builder skill to scaffold your extension."
Process
Step 1: Gather Requirements
Ask the user for:
- Extension name — kebab-case (e.g.,
recipe-manager). Python package becomespyrite_recipe_manager. - Description — one sentence describing what the extension does.
- Entry types — each with:
- Type name (snake_case, e.g.,
recipe) - Custom fields with types (str, int, list[str], bool, etc.)
- Required fields
- Type name (snake_case, e.g.,
- Optional capabilities — which of these does the extension need?
- Hooks (before_save, after_save, before_delete, after_delete)
- Custom DB tables
- Workflows (state machines)
- CLI commands
- MCP tools
- Relationship types
Step 2: Generate Files
Generate the full extension directory under extensions/<name>/:
Always generated:
pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "pyrite-<name>"
version = "0.1.0"
description = "<description>"
requires-python = ">=3.11"
dependencies = []
[project.entry-points."pyrite.plugins"]
<snake_name> = "pyrite_<snake_name>.plugin:<ClassName>Plugin"
[tool.hatch.build.targets.wheel]
packages = ["src/pyrite_<snake_name>"]src/pyrite_<snake_name>/__init__.py — empty
src/pyrite_<snake_name>/plugin.py — Plugin class implementing PyritePlugin Protocol. Wire up all entry types, validators, presets, and optional capabilities.
src/pyrite_<snake_name>/entry_types.py — One @dataclass class per entry type. Each MUST implement:
entry_typeproperty returning the type keyto_frontmatter()callingsuper().to_frontmatter()and adding custom fieldsfrom_frontmatter()classmethod with full field parsing
src/pyrite_<snake_name>/validators.py — One validate function per entry type. MUST return [] for unrelated types.
src/pyrite_<snake_name>/preset.py — KB preset dict with type definitions, policies, validation rules.
Optionally generated:
src/pyrite_<snake_name>/hooks.py — If hooks requested. Scaffold refusal-only hooks without assignments to entry fields; follow the protocol contract.
src/pyrite_<snake_name>/tables.py — If custom tables requested. Table definitions with extension-prefixed names.
src/pyrite_<snake_name>/workflows.py — If workflows requested. State machine definitions.
src/pyrite_<snake_name>/cli.py — If CLI commands requested. Typer app with subcommands.
tests/test_<snake_name>.py — ALWAYS generated. Comprehensive test file with 8-section structure:
- Entry type round-trip (to_frontmatter → from_frontmatter)
- Entry type defaults
- Validator accepts valid data
- Validator rejects invalid data
- Plugin registration
- Preset structure
- Entry type property
- Integration (if hooks/tables/workflows present)
Step 3: Install and Verify
# Install in dev mode
cd <pyrite repo root>
uv pip install --python .venv/bin/python -e extensions/<name>
# Verify plugin loads
.venv/bin/python -c "from pyrite.plugins.registry import get_registry; r = get_registry(); print(r.list_plugins())"
# Run extension tests
.venv/bin/pytest extensions/<name>/tests/ -vReference Files
For patterns and conventions, consult:
.claude/skills/pyrite-dev/extensions.md— comprehensive extension building guide.claude/skills/pyrite-dev/testing.md— test patterns and conventions
For working examples, read these existing extensions:
extensions/zettelkasten/— simplest (2 entry types, no hooks)extensions/encyclopedia/— medium (2 entry types and the article review workflow)extensions/social/— complex (2 entry types and the hooks, no workflow)extensions/software-kb/— full-featured (CLI, MCP tools, multiple types)
Key Rules
- Entry point group MUST be
"pyrite.plugins"— no other group name works entry_typeproperty MUST match the key inget_entry_types()from_frontmatter()MUST callgenerate_entry_id(title)whenmeta.get("id")is empty- Validators MUST return
[]for unrelated types - Prefix custom DB table names with extension name
before_savemay raise to refuse; do not set fields in it. Follow the protocol contract.- Declare
capabilitiesfor every method the plugin implements; the registry skips methods whose capability is missing - All list/dict fields MUST handle None → default:
meta.get("field", []) or [] - Tests MUST pass before claiming completion
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

