/ldh:packagefrom LinkedDataHub
Creates a LinkedDataHub package combining an ontology with an XSLT 3 stylesheet to customize rendering in open modes (property rows, form controls, value cells, tree nodes, navigation column). Use when a vocabulary needs UI behavior beyond declarative views.
Ships in LinkedDataHub. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A package bundles an ontology (ns.ttl: vocabulary imports, constructors, constraints, property
views) with an optional XSLT 3 stylesheet. A dataspace imports it with one triple,
<app> ldh:import <package#this>, which ldh packages add writes. From the next request the
ontology joins the dataspace's imports closure and the stylesheet is composed into the dataspace's
stylesheet. Packages are how a vocabulary gets its own UI without touching the platform.
Try ldh:app first. Most presentation needs (layout modes, charts, maps, XHTML blocks, property views) are declarative and need no XSLT.
References, read before writing a stylesheet:
client/hooks.xsl and imports/values.xsl beside itGRAPH ?g { … }.<doc#this> via foaf:primaryTopic.ldh with
export LDH_BASE='${user_config.ldh_base}' LDH_CERT_FILE='${user_config.cert_file}';, the plugin's
settings (/plugin → ldh → configure); a variable set in one Bash command is gone by the next. ldh reads
the certificate's password from LDH_CERT_PASSWORD, which the user sets in their own environment, such as
the env block of ~/.claude/settings.json. If a setting or the password is missing, ask the user for it:
never read secrets/, search the disk for a certificate or a password, or guess one.
LDH_PROXY comes from the environment.ldh that matches the instance. Build it from the same LinkedDataHub checkout or release
as the running image (ldh --version). An instance whose end-user responses carry no
https://w3id.org/atomgraph/linkeddatahub/dataspaces#admin Link (check with ldh get --head --accept text/turtle "$LDH_BASE")
predates the CLI's admin discovery. There, ldh admin commands stop with "advertises no lds:admin link".
An admin base advertises itself as its lds:admin only from 6.2.1 on. Use the image built from the same checkout as the CLI.The package stylesheet is imported directly above the platform's hooks.xsl and below everything
else. Import precedence beats template priority, so its position is the whole contract:
xsl:next-match, or hide with an empty template.ldh:Modal,
ac:FieldShell, …), the platform's own typed vocabulary rules, and the library of keys, params and
functions. A package rule there loses whatever priority you give it, and redeclaring a sealed
global loses the same way. Do not try to fight this with priorities.Open modes: ldh:TreeNode, ac:PropertyEditor, ldh:ContentColumn, the value leaves in
imports/values.xsl (ac:FormControl, ac:PropertyListValue, ac:ValueAnnotations,
ldh:TypeControl, ac:property-label, ac:object-label, ac:ResultsTableHeaderCell, the unnamed
mode's property row and value link), and client-only ldh:TreeChildrenLoad and ldh:RowHook.
Read the fallback in the platform source before overriding it. A replacement must emit the same
markup contract (element, classes, attributes) the fallback does, or the rest of the page breaks.
Match on your own vocabulary only, i.e. your properties, classes and datatypes. Never match generic shapes in a way that changes rendering for data that is not yours.
The same stylesheet is composed into the server-side tree (Saxon-HE) and the client-side tree
(Saxon-JS, compiled to SEF). Anything client-only, meaning ixsl: instructions and functions, event
handlers, ixsl:updating functions and the ldh:RowHook/ldh:TreeChildrenLoad rules, must carry
use-when="system-property('xsl:product-name') = 'SaxonJS'". A client-only construct without the
guard fails the server compile. The dataspace then silently falls back to its stylesheet
without any package rules, so the package appears to do nothing at all.
Keep first-paint rendering (property rows, tree nodes, the content column) unguarded so the server renders it. A directly loaded URL gets only the server's paint at first.
<!DOCTYPE xsl:stylesheet [
<!ENTITY ac "https://w3id.org/atomgraph/client#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY ex "https://example.org/ns#">
]>
<xsl:stylesheet version="3.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ixsl="http://saxonica.com/ns/interactiveXSLT"
xmlns:ac="∾"
xmlns:ldh="https://w3id.org/atomgraph/linkeddatahub#"
xmlns:rdf="&rdf;"
xmlns:ex="&ex;"
exclude-result-prefixes="#all">
<!-- hide a property that another widget already shows -->
<xsl:template match="ex:internalCode" mode="ac:PropertyEditor"/>
<!-- decorate the generic value cell for the package's own property -->
<xsl:template match="ex:rating/text()" mode="ac:PropertyListValue">
<span class="rating" data-value="{.}">
<xsl:next-match/>
</span>
</xsl:template>
</xsl:stylesheet>
Use the entity and namespace declarations the taxonomy package uses as the template. Labels shown to users come from the data or the platform's translations, never hardcoded English. Read the fallback's match pattern before writing yours, because the node a mode is applied to (element, attribute or text node) varies by mode.
A registry is itself a LinkedDataHub dataspace, readable anonymously: the importing dataspace
dereferences the descriptor, ontology and stylesheet without a certificate. The public one is
https://packages.linkeddatahub.com/ (contribute through the LinkedDataHub-Apps repository). For your
own, provision a dataspace (ldh:dataspace) and publish it the way packages/install.sh in
LinkedDataHub-Apps does:
registry/
├── root.ttl the catalog: each package an rdfs:member of the root, with dct:title/description
├── vendor.ttl container document for the vendor/ folder
└── vendor/
├── rating.ttl the descriptor document, PUT to vendor/rating/
└── rating/
├── ns.ttl the package ontology, PUT to vendor/rating/ns/
└── rating.xsl the stylesheet, uploaded to uploads/{sha1}
The descriptor is the foaf:primaryTopic of the package document:
<> a dh:Container ; dct:title "Rating" ; foaf:primaryTopic <#this> .
<#this> a lds:Package ;
dct:title "Rating" ;
dct:description "…" ;
lds:ontology <ns/#> . # the ontology IRI ns.ttl declares (`: a owl:Ontology` with `@prefix : <#>`), not the document URL
Leave ac:stylesheet out of the file. After the push, add it pointing at the upload, whose URI
is the SHA-1 of the stylesheet's bytes:
ldh admin make-public # once: the registry must be anonymously readable
ldh push --dir registry "$LDH_BASE"
sha=$(shasum -a 1 registry/vendor/rating/rating.xsl | cut -d' ' -f1)
echo "INSERT { <${LDH_BASE}vendor/rating/#this> <https://w3id.org/atomgraph/client#stylesheet> <${LDH_BASE}uploads/${sha}> } WHERE { }" \
| ldh patch "${LDH_BASE}vendor/rating/"
In the target dataspace:
ldh packages list --registry https://<registry>/ # the package shows as "available"
ldh packages add --package https://<registry>/vendor/rating/#this
ldh packages list --registry https://<registry>/ # now "installed"
Then load a page showing the package's vocabulary in a browser and check both paints: the
server's (view the page source, or ldh get --accept text/html) and the client's (navigate to the
page from another one). If nothing the package does appears, the composed stylesheet most likely
failed to compile and the dataspace fell back to its own. Check the platform log
(docker compose logs linkeddatahub on a self-hosted instance) for the XSLT error.
Copies are taken once. At import the ontology is materialised as an editable document under the
admin ontologies/ container, and the stylesheet is copied under
/static/com/linkeddatahub/packages/. A republished package does not reach a dataspace that already
imported it until that ontology document is deleted (the next request recreates it) and the ontology
cache is cleared (ldh admin clear ontology). A changed stylesheet gets a new
upload URI and so a new copy, once the dataspace reads the updated descriptor. Confirm on the page
that the new version is live and do not assume it.
lds:ontology naming the ontology document instead of its IRI loads the graph twice and fails
with "Another graph with name … is already in the hierarchy".ldh packages add are lost on a platform restart unless declared in
config/dataspaces.trig (ldh:dataspace).What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
linkeddatahub, xslt, ontology, package-registry, vocabulary-ui
4 skills in this plugin
/appBuild a LinkedDataHub application declaratively with the ldh CLI — the document tree (containers and items), content blocks, SPARQL views in table/grid/list/map/graph layouts, charts, federated queries, public access, and an app directory installed with ldh push. Use when the task is to present data in an existing dataspace or to package an installable app. For the domain model and data imports use ldh:dataset; for rendering that data cannot declare (custom XSLT) use ldh:package./datasetModel and load data into a LinkedDataHub dataspace with the ldh CLI — write the namespace ontology (classes, constructors, constraints, property views), import vocabulary packages, and map CSV or RDF into documents with SPARQL CONSTRUCT imports, or build a large CSV, JSON or XML dataset standalone (CSV2RDF, JSON2RDF, Saxon XSLT, then a quad CONSTRUCT) and bulk-load it. Use when the task is to define a domain model or get data into an existing dataspace. For the documents, views and charts that present it use ldh:app; for a new dataspace use ldh:dataspace./dataspaceProvision a new LinkedDataHub dataspace on a self-hosted instance — an end-user app and its admin app on their own subdomain, each backed by its own Fuseki dataset. Use when the task is to add, rename or rewire a dataspace in config/dataspaces.trig, config/system.trig and config/fuseki/config.ttl. Not for adding data or UI to an existing dataspace (use ldh:dataset and ldh:app).npx claudepluginhub atomgraph/linkeddatahub --plugin ldhOther plugins' skills for the same job