Skip to content
MockFlow DevelopersGet an API key

A space per class with the students in it, and a term plan written by Mida from a saved skill.

Updated 14 Oct 20262 min read

A teacher, or a school's IT team, sets up the same things at the start of every term: a place for each class, the students added, and a term plan. This example does it for every class in one run. A saved skill gives Mida the school's planning format, so every class's plan has the same shape: outcomes, a heading per week with activities and a check for understanding, then an assessment idea.

Download the code (Node.js 18 or later, no packages)

What it creates

  • A Term plan skill in the workspace, made on the first run and reused after that.

  • A space for each class, such as "Year 9 Geography, Spring 2027", with co-teachers as admins and students as editors.

  • In each space, a Term plan board written by Mida with the skill, and an empty Class wall board for the students' work.

How it works

  1. Create the skill once with POST /skills: a name, an outputType, and the systemPrompt Mida follows. Its id is kept in state.json.

  2. For each class, create a space and add the people with their roles.

  3. Create the board and apply the skill with POST /boards/{boardId}/skills/{skillId}/apply and a short prompt: the class, the topic and the number of weeks.

  4. Wait for the job, then move on to the next class.

Run the example

Create an API key in the developer console with the scopes user:read, boards:write, members:write and ai:generate, then:

cp .env.example .env        # paste your key into .env
node setup-term.js classes.json

Put real classes and emails in classes.json first: everyone listed gets an invitation email.

The key code

const skill = await mf.post('/skills', {
  name: 'Term plan',
  outputType: 'markdown',
  category: 'planning',
  systemPrompt: 'Write a term plan for a school class. Start with three to five learning outcomes. ...',
});

const board = await mf.post('/boards', { title: 'Term plan', spaceId: space.id });
const job = await mf.post(`/boards/${board.id}/skills/${skill.id}/apply`, {
  prompt: `${cls.name}. Topic: ${cls.topic}. ${cls.weeks} weeks.`,
});
await mf.waitForJob(job);

Adapt it

  • Training teams: a space per cohort, with a course plan written from the same skill.

  • Clubs and coaching: a season plan per team.

  • Universities: a module space per seminar group, with a reading plan.

What you need

An API key with user:read, boards:write, members:write and ai:generate. Plus or Max: skills, generation and extra spaces are not available on Basic. Each plan uses AI credits.

Was this page helpful?

Sign in to MockFlow

The same account you use in the app and on the API.

Forgot your password?
or
Continue with GoogleContinue with MicrosoftContinue with Apple