一键导入
new-prefix-command
Scaffold a new text (prefix) command in app/prefixes, e.g. ".ping". Use when asked to add a message-based or prefix command.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Scaffold a new text (prefix) command in app/prefixes, e.g. ".ping". Use when asked to add a message-based or prefix command.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scaffold a new slash command in app/commands. Use when asked to add or create a slash command, a subcommand, or an autocomplete option.
Scaffold a persistent button, modal, or select-menu handler in app/components. Use when asked to handle a component interaction by customId.
Scaffold a right-click context-menu command (on a user or message) in app/context. Use when asked to add a context-menu or right-click command.
Scaffold a gateway event handler in app/events. Use when asked to react to a Discord event like GuildMemberAdd, MessageCreate, or Ready.
Scaffold an HTTP API route in app/routes on the Elysia server. Use when asked to add an HTTP endpoint, REST route, or webhook receiver.
Scaffold a scheduled task (cron or interval) in app/tasks. Use when asked to run something periodically, on a timer, or on a schedule.
| name | new-prefix-command |
| description | Scaffold a new text (prefix) command in app/prefixes, e.g. ".ping". Use when asked to add a message-based or prefix command. |
.agents/context.md (Prefix commands section) if not already loaded.app/prefixes/<name>.ts.BasePrefixCommand, decorated with @Prefix, with a PrefixCommandBuilder on data.import { User } from "discord.js";
import { Prefix, BasePrefixCommand, PrefixCommandBuilder, PrefixContext } from "engine";
@Prefix({ cooldown: 3 })
export default class Avatar extends BasePrefixCommand {
data = new PrefixCommandBuilder().setName("avatar").setDescription("Shows a user's avatar.").addAlias("av").addUser("target", "The user to inspect");
async execute(context: PrefixContext) {
const target = context.args.target instanceof User ? context.args.target : context.message.author;
await context.message.reply(target.displayAvatarURL({ size: 1024 }));
}
}
PrefixCommandBuilder deliberately mirrors SlashCommandBuilder naming (camelCase): setName, setDescription, addAlias, and typed addString / addInteger / addNumber / addBoolean / addUser / addMember / addChannel / addRole / addRest.context.args holds resolved typed arguments keyed by name; context.raw has string tokens and context.content the remainder. Also available: prefix, command, globals, permissions.@Prefix accepts cooldown and guilds like slash commands; aliases share the command's cooldown bucket.config.prefix.enabled; the per-guild prefix lives in lib/prefixes.ts.MessageCreate router; engine/prefix_dispatch.ts owns routing.Run bun run typecheck and bun run lint. No deploy step is needed; prefix commands are live on next boot.