add-to-fedify-init

Registers a new web framework integration in the @fedify/init scaffolding package and verifies it with mise test:init.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When adding a new web framework integration to Fedify, the framework must also be registered in the @fedify/init package so users can scaffold projects with it via the fedify init command. Doing this manually involves editing multiple files consistently and running the right test combinations, which is error-prone without a guided procedure.

Core Features & Use Cases

  • Framework Registration: Guides creation of the WebFrameworkDescription object in packages/init/src/webframeworks/, plus updates to the WEB_FRAMEWORK array in const.ts and the webFrameworks object in mod.ts.
  • Template Scaffolding: Explains how to add .tpl template files under packages/init/src/templates/ and load them with the readTemplate function.
  • Test Matrix Guidance: Prescribes the minimum mise test:init combinations to run (in-memory KV, in-process queue, full framework matrix) and how to record untestable combinations in BANNED_LOOKUP_REASONS.
  • Use Case: After implementing a new @fedify/hono-style integration package, use this Skill to wire it into the init CLI, test the generated project, and pass lint/format checks with mise run fmt && mise check.

Quick Start

Register the new web framework integration in @fedify/init following the skill steps, then verify it with the recommended mise test:init combinations.

Frequently Asked Questions about add-to-fedify-init

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

FAQPage Schema
How do I add a new web framework to the fedify init command?

Create a WebFrameworkDescription object in packages/init/src/webframeworks/, add the framework name to the WEB_FRAMEWORK array in const.ts, and register it alphabetically in the webFrameworks object in mod.ts. Then verify with mise test:init.

How do I test a new @fedify/init framework integration?

Run mise test:init with scoped options, at minimum: `-w framework -m in-process -k in-memory --no-dry-run` for the basic combination, plus broader matrix runs. Running without arguments tests all combinations and takes very long.

What files must change when registering a framework in @fedify/init?

You typically edit packages/init/src/webframeworks/framework.ts (new file), const.ts (WEB_FRAMEWORK array), mod.ts (webFrameworks object), and optionally add .tpl templates under packages/init/src/templates/. Keyword lists in .hongdown.toml and cspell.json also need updating.

What if a framework and database combination cannot be tested?

Analyze the test output to identify why the combination is impossible, then add the combination and its reason as a key-value pair to the BANNED_LOOKUP_REASONS object in packages/init/src/test/lookup.ts.

Why does mise test:init fail when databases are not running?

Combinations requiring external KV stores or message queues fail if those databases are not installed or running. In that case, stick to the in-memory KV and in-process queue combination for the rest of the session.