Get the FREE Ultimate OpenClaw Setup Guide →

Configure W3id

npx machina-cli add skill ai4curation/curation-skills/configure-w3id --openclaw
Files (1)
SKILL.md
1.7 KB

For context See https://github.com/linkml/linkml-project-copier/issues/127

First, it will be necessary to create a fork of https://github.com/perma-id/w3id.org

This might be in ~/repos/w3id.org - be sure it is up to date

make a PR with a new folder ./{{ project_name }}/

This will have two files:

.htaccess:

Options +FollowSymLinks
RewriteEngine on

# vocab/ end point
RewriteRule ^vocab$ https://github.{{ github_org }}.io/{{ project_name }}/$1
RewriteRule ^vocab\/(.*)$ https://github.{{ github_org }}.io/{{ project_name }}/$1 [R=301,L]

# schema submodules
RewriteRule ^schema\/(.*)$ https://raw.githubusercontent.com/{{ github_org }}/{{ project_name }}/main/src/{{ project_name }}/$1 [R=301,L]

# Schema artefacts use raw Github URLs
# if suffix is yaml, redirect to LinkML YAML schema
RewriteRule ^{{ project_name }}.yaml$ https://raw.githubusercontent.com/{{ github_org }}/{{ project_name }}/main/src/{{ project_name }}/merged/merged_hierarchy.yaml [R=302,L]

# if suffix is schema.json, redirect to JSON Schema
RewriteRule ^{{ project_name }}.schema.json$ https://raw.githubusercontent.com/{{ github_org }}/{{ project_name }}/main/project/jsonschema/{{ project_name }}.schema.json [R=302,L]

# if suffix is owl, redirect to OWL
RewriteRule ^{{ project_name }}.owl.ttl$ https://raw.githubusercontent.com/{{ github_org }}/{{ project_name }}/main/project/owl/{{ project_name }}.owl.ttl [R=302,L]


# Schema elements use Github Pages
# Rewrite Base URL
RewriteRule ^(.*)$ https://github.{{ github_org }}.io/{{ project_name }}/elements/$1 [R=302,L]

a README.md that contains homepages (ie github), documentation links, plus contacts

Source

git clone https://github.com/ai4curation/curation-skills/blob/main/configure-w3id/SKILL.mdView on GitHub

Overview

This skill automates registering a w3id for a new GitHub project by forking the w3id.org repo, creating a dedicated folder named after the project, and adding two files: an .htaccess with precise redirects and a README listing homepages, docs, and contacts. It ensures stable, discoverable identifiers by routing vocab, schema, and artifacts to the appropriate GitHub Pages or raw URLs.

How This Skill Works

It starts by forking the w3id.org project (often located in ~/repos/w3id.org) and creating a PR with a new folder ./{{ project_name }}/. Inside this folder you add two files: .htaccess containing RewriteRule mappings for vocab, schema, and artefacts, and a README.md that includes homepages, documentation links, and contacts. The .htaccess redirects map vocab to https://github.{{ github_org }}.io/{{ project_name }}/$1, schema and artefacts to their raw GitHub endpoints, and the base URL to the project elements on GitHub Pages.

When to Use It

  • You are launching a new GitHub project and need a stable w3id endpoint to represent it
  • You want a dedicated vocab endpoint for your project that redirects to the project page
  • You need redirects to raw schema.yaml, schema.json, and related artefacts on GitHub
  • You want to serve schema elements via GitHub Pages under the project URL
  • You are aligning a LinkML based workflow with the w3id.org approach and need a consistent mapping

Quick Start

  1. Step 1: Fork the w3id.org repo and ensure it is up to date in ~/repos/w3id.org
  2. Step 2: Create a new folder ./{{ project_name }}/ and add two files: .htaccess with the RewriteRules and a README.md listing homepages, docs, and contacts
  3. Step 3: Open a PR with the new folder to merge into w3id.org and verify redirects work as intended

Best Practices

  • Ensure the w3id.org fork is up to date before adding a new project folder
  • Use the exact placeholders {{ project_name }} and {{ github_org }} consistently in all files
  • Validate that all RewriteRule mappings point to the correct project URLs and paths
  • Include a README with homepages, documentation links, and contact information
  • Reference the related issue or context in the PR description to aid review

Example Use Cases

  • Create a folder ./myproj/ with an .htaccess and README, mapping vocab to https://github.{{ github_org }}.io/myproj/ and schema to raw GitHub URLs
  • Add a rule that redirects myproj.yaml to the merged_hierarchy.yaml in the project path
  • Redirect myproj.schema.json to the project jsonschema location on GitHub
  • Route myproj.owl.ttl requests to the raw GitHub path under project/owl
  • Serve all schema elements via the base URL https://github.{{ github_org }}.io/myproj/elements/

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers