.agents/skills/add-to-fedify-init/SKILL.md
This skill is used to add an integration package to the @fedify/init package so that users can select the new framework via the `fedify init` command, and to test it with `mise test:init`.
npx skillsauth add fedify-dev/fedify add-to-fedify-initInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
@fedify/initFollow these steps in order to register the integration package in
@fedify/init and verify it works.
@fedify/initmise test:init@fedify/initAdd the new package to the @fedify/init package so users can select the
new framework via the fedify init command. Follow these steps.
Steps may require code modifications not explicitly listed. For example,
if the new package needs specific configuration, utility functions in
packages/init/src/webframeworks/utils.ts may need updating. Make
modifications consistent with the existing code style and context.
WebFrameworkDescription objectCreate a packages/init/src/webframeworks/framework.ts file and write the
WebFrameworkDescription object, referring to
init/framework.ts. Check the specifications in the
comments in packages/init/src/types.ts for details.
WEB_FRAMEWORK arrayAdd the new framework name to the end of the WEB_FRAMEWORK array in
packages/init/src/const.ts.
export const WEB_FRAMEWORK = [
// ... other frameworks
"framework", // Fill with the framework name
];
webFrameworks objectAdd the new WebFrameworkDescription object in alphabetical order to the
webFrameworks object in packages/init/src/webframeworks/mod.ts.
// packages/init/src/webframeworks/mod.ts
// ... other imports
import framework from "./framework.ts"; // Fill with the framework name
const webFrameworks: Record<string, WebFrameworkDescription> = {
// ... other frameworks
framework, // Fill with the framework name
};
packages/init/src/templates/framework/If additional files need to be generated, add template files under the
packages/init/src/templates/framework/ directory. Template files must
end with the .tpl extension appended to their base name. Then, in
packages/init/src/webframeworks/framework.ts, load the templates using
the readTemplate function defined in packages/init/src/lib.ts and add
them to the WebFrameworkDescription.init().files object.
mise test:initRun mise test:init to verify that the new package is generated and runs
correctly. If a test fails, the output and error file paths are printed;
read them to diagnose the issue.
Running mise test:init without arguments tests all option combinations
and can take a very long time. Use appropriate options to narrow the test
scope.
Immediately remove test paths after completing the tests and analyzing any resulting errors.
At a minimum, test the following three combinations.
mise test:init -w framework -m in-process -k in-memory --no-dry-run:
Tests the new framework with the in-memory KV store and in-process message
queue, which are the most basic options. This combination verify that the
newly created package can be used without issues by minimizing dependencies
on other environments.mise test:init -w framework: Tests all package manager, KV store,
and message queue combinations with the framework selected. If a
required database is not installed or running, this combinations are
useless. Therefore, if the test output indicates that the databases are
not running, don't use this combination ever again for the session.mise test:init -m in-process -k in-memory --no-dry-run: Fixes the
KV store and message queue and tests all web framework and package
manager combinations. This test is mandatory if you modified logic
beyond just writing the WebFrameworkDescription object.For details on options, run mise test:init --help.
Some frameworks or combinations may be untestable. Analyze the test
results; if there are impossible combinations, identify the reason and add
the combination and reason as a key-value pair to the
BANNED_LOOKUP_REASONS object in
packages/init/src/test/lookup.ts.
Add keywords related to the framework in .hongdown.toml and cspell.json in
root path.
After implementation, run mise run fmt && mise check.
If there are lint or format errors, fix them and run the command again until
there are no errors.
development
Help the user migrate Fedify code between versions. Use when the user needs to upgrade their Fedify version, fix breaking-change errors, or update deprecated API usage.
tools
Help the user set up Fedify inbox listeners for handling incoming ActivityPub activities. Use when the user needs to handle Follow, Like, Announce, Create, Undo, or other activity types delivered to their inbox.
testing
Look up a Fediverse Enhancement Proposal (FEP) and explain how to implement it with Fedify. Use when the user asks about a specific FEP by ID (e.g., FEP-8fcf, FEP-1b12) or wants to implement a fediverse standard in their Fedify application.
tools
Use this skill whenever writing JavaScript or TypeScript code that uses Fedify to build an ActivityPub server, handle federation activities, implement fediverse features, or integrate Fedify with a web framework such as Hono, Express, Next.js, Nuxt, Fastify, Koa, NestJS, Astro, SvelteKit, Fresh, h3, Elysia, or Cloudflare Workers. Covers the `Federation` builder pattern, actor/inbox/outbox/collection dispatchers, inbox listeners, vocabulary objects from `@fedify/vocab`, key pair management, HTTP Signatures, Object Integrity Proofs, the `KvStore` and `MessageQueue` interfaces, database adapter packages, structured logging with LogTape, OpenTelemetry tracing, the `fedify` CLI toolchain, and common mistakes. Also apply when the user mentions ActivityPub, federation, fediverse, WebFinger, NodeInfo, FEPs, or Mastodon interoperability, even if they do not name Fedify explicitly.