add-vocab

Add ActivityPub/JSON-LD vocabulary types via YAML definitions and codegen.

1.0k|126|Updated Mar 2, 2024
One-click install
npx skills add https://github.com/fedify-dev/fedify --skill add-vocab
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-vocab
Source: https://github.com/fedify-dev/fedify/tree/main/.agents/skills/add-vocab
Command: npx skills add https://github.com/fedify-dev/fedify --skill add-vocab

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps teams safely extend the Fedify vocabulary by adding new YAML vocabulary definitions, generating TypeScript classes, and updating vocab-related workflows in Fedify.

Core Features & Use Cases

  • Define new vocabulary types via YAML in packages/vocab/src, then run code generation to produce TypeScript classes.
  • Update existing vocabulary definitions and ensure they are reviewed according to project guidelines.
  • Integrate vocabulary changes with FEP implementations and third-party vocab extensions (e.g. Mastodon, Litepub).

Quick Start

Create a new vocabulary YAML under packages/vocab/src and run codegen to generate TS classes.

Frequently Asked Questions about add-vocab

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extend ActivityPub vocabulary with custom types in Fedify?

To extend ActivityPub vocabulary in Fedify, define new vocabulary types via YAML files in packages/vocab/src and run codegen to generate the corresponding TypeScript classes. This enforces required fields like name, uri, entity, description, and properties.

What YAML fields are required to define a new ActivityStreams vocabulary type?

Defining a new ActivityStreams vocabulary type requires a YAML file with five mandatory fields: name, uri, entity, description, and properties. These fields ensure proper codegen integration and TypeScript class generation for Fedify.

Can I add Mastodon extensions or third-party vocab types to Fedify?

Yes, you can incorporate third-party vocab types such as Mastodon extensions into Fedify. This is achieved by adding YAML vocabulary definitions and integrating them with context preloads and codegen workflows.

How do I generate TypeScript classes from JSON-LD vocabulary definitions?

You generate TypeScript classes from JSON-LD vocabulary definitions by creating a YAML file under packages/vocab/src and running the codegen process. This automatically produces the TS classes needed for Fedify.

When should I update YAML vocabulary definitions for FEP implementations?

You should update YAML vocabulary definitions when implementing FEPs or extending ActivityStreams vocabulary. This ensures new types are properly integrated with codegen, context preloads, and reviewed according to project guidelines.

Does adding new Fedify vocabulary types require manual TypeScript class creation?

No, adding new Fedify vocabulary types does not require manual TypeScript class creation. The codegen process automatically generates the TS classes from your YAML vocabulary definitions in packages/vocab/src.