Get Started
Docs/Integration & Extensibility/Plugins
Extensibility

Plugin & Skill Authoring

Author domain skills using BaseSkill.js, and register schemas in CommandSchemas.js.

Creating a Custom Fishing Skill

const BaseSkill = require('../BaseSkill');

class FishSkill extends BaseSkill {
  constructor(ctx) {
    super(ctx, 'fish');
  }

  async run(params = {}) {
    this.startSkill();
    const duration = params.durationMinutes || 10;
    this.ctx.messageRouter.send(2, `Starting fishing routine for ${duration} minutes.`);

    try {
      while (!this.shouldAbort()) {
        await this.checkSafetyPreemption();
        // Custom fishing logic wrapping bot.fish()
        await new Promise(res => setTimeout(res, 5000));
      }
    } finally {
      this.finishSkill();
    }
  }
}

module.exports = FishSkill;

Registering Skill & Schema

// 1. Register in SkillRegistry.js:
this.register('fish', require('../skills/fishing/FishSkill'));

// 2. Define schema in CommandSchemas.js:
fish: {
  minRole: 'trusted',
  locks: ['movement', 'inventory'],
  priority: 75,
  params: { durationMinutes: { type: 'number', default: 10 } }
}