infographic-describer
Skill42 starsChanged 50 days agoMITView on GitHub
Generate RDF-Turtle descriptions (schema:ImageObject, schema:VideoObject, schema:WebPage) for infographic files in a WebDAV directory, using SHACL shapes as the property contract. Trigger when: user asks to describe infographics, generate metadata for a DAV directory, create RDF descriptions for image/video collections, or apply a SHACL shape to bulk-describe files. Handles content negotiation (HTML describe pages vs SPARQL DESCRIBE), filename-derived metadata, thumbnail URL detection, and category inference.
In this repository45 other files it gives its agents.
- agent-rdf-memory/AGENTS.mdAGENTS.md
- AGENTS.mdAGENTS.md
- a2a-clientSkill
- acp-clientSkill
- csv-to-rdf-det-generatorSkill
- data-twinglerSkill
- dbpedia-query-skillSkill
- document-to-kg-skillSkill
- fediverse-crudSkill
- fuxi-engineerSkill
- iodbc-dsn-managerSkill
- kg-generatorSkill
- linked-data-skillsSkill
- llm-routing-skillSkill
- monidSkill
- mpp-stripe-clientSkill
- mtls-curlSkill
- opal-agent-skill-assemblerSkill
- openlink-license-managerSkill
- openlink-license-readerSkill
- openlink-request-broker-configuratorSkill
- opml-rss-readerSkill
- osdi-inclusion-engineSkill
- pinchtabSkill
- rdf-det-variant-generatorSkill
- rdf-infographic-skillSkill
- resource-access-offers-generatorSkill
- rss-feed-generatorSkill
- s3-query-skillSkill
- screencast-recorderSkill
- set-webdav-resource-propertySkill
- sparql-faceted-browserSkill
- ucp-clientSkill
- uriburner-opal-agent-skillsSkill
- virtuoso-rdf-bulk-loaderSkill
- virtuoso-rdf-loaderSkill
- virtuoso-support-agentSkill
- wc2026-match-reportSkill
- weblog-from-webdavSkill
- website-from-webdavSkill
- wikidata-query-skillSkill
- world-cup-2026-navigatorSkill
- x402-buyerSkill
- xmla-clientSkill
- youidSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 4 are distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 30
Check which files have existing RDF data in the triplestore.
- Distinctive: line 47
Check for thumbnails using the content-explorer pattern:
- Very specific: line 59
Only files with 200 have thumbnails.
- Distinctive: line 94
Use this template structure:
- Very specific: line 112
Add schema:thumbnailUrl only if the probe returned 200.
- Distinctive: line 133
When generating or updating SHACL shapes to match describe output:
- Very specific: line 135
Use sh:minCount 0 for properties that may not exist for all files (thumbnailUrl, dateCreated, dateModified)
- Very specific: line 136
Use sh:minCount 1 for always-present properties (name, contentUrl, encodingFormat, type)
- Very specific: line 137
Use sh:hasValue for fixed values (e.g., encodingFormat = "image/png")
- Very specific: line 138
Use sh:targetClass to match the schema type
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Infographic Describer
Generate RDF-Turtle descriptions for files in a WebDAV-hosted directory using a SHACL shape as the property contract.
Workflow
Step 1: Discover Files
List the target WebDAV directory to enumerate files:
curl -sL "https://www.openlinksw.com/data/{directory}/" | python3 -c "
import sys, re
html = sys.stdin.read()
files = re.findall(r'title=\"File - ([^\"]+)\"', html)
for f in files:
print(f)
"Classify by extension: .png → schema:ImageObject, .mp4 → schema:VideoObject, .html → schema:WebPage.
Step 2: Probe Describe Endpoint
Check which files have existing RDF data in the triplestore. Use the SPARQL DESCRIBE endpoint:
import urllib.parse, urllib.request
iri = f'https://www.openlinksw.com/DAV/www2.openlinksw.com/data/{directory}/{stem}.{ext}'
query = f'DESCRIBE <{iri}>'
url = 'http://www.openlinksw.com/sparql?query=' + urllib.parse.quote(query) + '&output=text%2Fn3'
req = urllib.request.Request(url, headers={'Accept': 'text/n3, */*'})
resp = urllib.request.urlopen(req, timeout=30)
data = resp.read().decode()
has_data = 'Empty' not in data and len(data.strip()) > 50Step 3: Probe Thumbnails
Check for thumbnails using the content-explorer pattern:
https://www.openlinksw.com/data/content-explorer/thumbnails/{category}-{stem}.avifWhere {category} is the directory name (e.g., infographics). Probe with HTTP HEAD:
curl -sL -o /dev/null -w "%{http_code}" "$url"Only files with 200 have thumbnails.
Step 4: Generate Descriptions
For each file, construct RDF triples using the SHACL shape properties:
| Property | Source | Fallback |
rdf:type | File extension | schema:CreativeWork |
schema:name | Filename stem (underscores/hyphens → spaces) | — |
schema:description | Derived from name or describe page | "Infographic: {name}" |
schema:encodingFormat | Content type from listing | Map extension to MIME |
schema:contentUrl | Full DAV URL | — |
schema:thumbnailUrl | Probe result (only if 200) | Omit |
schema:category | Directory-based category IRI | Default to #Infographic |
wdrs:describedby | Constructed describe endpoint URL | — |
schema:dateCreated | Describe page (if available) | Omit |
schema:dateModified | Describe page (if available) | Omit |
Entity IRI pattern: {contentUrl}#this
Category IRIs (content-explorer-metadata.ttl):
#Infographic— default for/data/infographics/#Guide— filenames containing "guide"#Demo— filenames containing "demo"#Survey— filenames containing "survey"
Encoding format mapping:
.png→image/png.jpg/.jpeg→image/jpeg.mp4→video/mp4.html→text/html
Step 5: Generate Turtle
Use this template structure:
@prefix schema: <http://schema.org/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix wdrs: <http://www.w3.org/2007/05/powder-s#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<{contentUrl}#this>
a {schemaType} ;
schema:name "{name}" ;
schema:description "{description}" ;
schema:encodingFormat "{mimeType}" ;
schema:contentUrl <{contentUrl}> ;
schema:category <{categoryIri}> ;
wdrs:describedby <{describeUrl}> .Add schema:thumbnailUrl only if the probe returned 200.
Step 6: Validate
Validate the generated Turtle:
from rdflib import Graph
g = Graph()
g.parse('output.ttl', format='turtle')
print(f'{len(g)} triples, {len(set(g.subjects()))} entities')Step 7: Save
Save to the user-designated output path. Default:
- Shapes:
/Users/kidehen/Documents/RDF_DATA/shacl-shapes/ - Descriptions: same directory as the shapes
SHACL Shape Conventions
When generating or updating SHACL shapes to match describe output:
- Use
sh:minCount 0for properties that may not exist for all files (thumbnailUrl,dateCreated,dateModified) - Use
sh:minCount 1for always-present properties (name,contentUrl,encodingFormat,type) - Use
sh:hasValuefor fixed values (e.g.,encodingFormat = "image/png") - Use
sh:targetClassto match the schema type
Notes
- The
/describeendpoint requires a POST withh=1to bypass the confirmation dialog - Most files in a DAV directory will have sparse or no RDF data — filename-derived metadata is the norm
- Thumbnails are rare — only files processed by the content-explorer system have them
- The SPARQL DESCRIBE endpoint (without CBD mode) returns more data than CBD mode for these resources
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.

