Install any skill in seconds. Free to start, no credit card required.
Get Started Free →webiny/webiny-cli-extensions
Adding custom commands to the Webiny CLI using CliCommandFactory.
Passed 22 of 23 test cases with the skill, and 8 of 23 without it.
and 21 more in the full report
15 fixed7 passed either way0 still failing1 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 15 test cases the skill fixed. Same model, same prompt, with and without the skill.
What exact subpath import in Webiny provides the `CliCommandFactory` namespace used to construct custom CLI commands?
| Checked | Without skill | With skill |
|---|---|---|
| Imports CliCommandFactory from webiny/cli/command | Missed | Passed |
The instructions your model reads when the skill loads.
Add custom commands to the Webiny CLI using the CliCommandFactory pattern. Define a class implementing CliCommandFactory.Interface<TParams>, specify command name, description, params, and handler, then export with CliCommandFactory.createImplementation(). Register in webiny.config.tsx via <Cli.Command>.
// extensions/MyCustomCommand.ts
import { Ui } from "webiny/cli";
import { CliCommandFactory } from "webiny/cli/command";
export interface IMyCustomCommandParams {
name: string;
}
class MyCustomCommandImpl implements CliCommandFactory.Interface<IMyCustomCommandParams> {
constructor(private ui: Ui.Interface) {}
execute(): CliCommandFactory.CommandDefinition<IMyCustomCommandParams> {
return {
name: "my-custom-command",
description: "This is my custom command",
examples: ["$0 my-custom-command test1", "$0 my-custom-command test2"],
params: [
{
name: "name",
description: "Your name",
type: "string"
}
],
handler: async params => {
this.ui.info("Starting my custom command...");
this.ui.emptyLine();
this.ui.success(`Hello, ${params.name}! This is my custom command.`);
}
};
}
}
test cases passed, vs 8 / 23 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.