Contributing logo

Contributing

Organization
butterbase-ai
contributing

Use when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture

Overview

Publisherbutterbase-ai
Repositorybutterbase-skills
Skill namecontributing
Stars
535
Forks
42
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by butterbase-ai on GitHub. Read the source before you install it.

Installation

Install the Contributing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/contributing
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/butterbase-ai/butterbase-skills.git /tmp/butterbase-skills
mkdir -p .claude/skills
cp -r /tmp/butterbase-skills/skills/contributing .claude/skills/contributing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Contributing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Contributing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Contributing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

1. Overview

Contributor guide for the Butterbase monorepo. Covers architecture, how to add MCP tools, API routes, database migrations, and coding conventions.


2. Monorepo Map

DirectoryPackagePurpose
packages/cli@butterbase/cli (v0.1.3)Published CLI tool (Commander.js). Commands: init, apps, schema, functions, storage, deploy, data, env, keys, realtime, status, open
packages/sdk@butterbase/sdk (v1.2.1)Published TypeScript SDK. Modules: auth, storage, functions, AI, billing, realtime, admin
packages/shared@butterbase/sharedInternal shared types, constants, schema DSL, error types
packages/plugin@butterbase/pluginClaude Code plugin (this package — skills for AI agents)
services/control-api@butterbase/control-apiFastify API server — the brain. Routes, plugins, services. Port 4000
services/mcp-server@butterbase/mcp-serverMCP server with ~28 tools (consolidated manage_* action-based tools + a few standalone ones like init_app, deploy_function, select_rows). Runs via stdio or HTTP (served by control-api at /mcp)
services/deno-runtime—Serverless function executor. Deno-based worker isolation. Port 7133
services/cron-scheduler@butterbase/cron-schedulerCron job runner using node-cron + cron-parser
services/dashboard—React management UI (Vite + Radix UI)
services/dashboard-api—Dashboard backend proxy. Port 4100
services/docs@butterbase/docsAstro/Starlight documentation site
services/storage-indexer—Cloudflare Worker for S3 event indexing
db/control-plane—SQL migrations (sequential numbering, 001_ upward). Control plane database schema
db/data-plane—Per-app database initialization scripts

3. Adding a New MCP Tool (4 Steps)

Step 1: Create tool file at services/mcp-server/src/tools/my-new-tool.ts

Decide whether the new capability is a standalone tool (single, self-contained operation like init_app) or another action on an existing umbrella tool (manage_schema, manage_function, etc). Most new operations should be added as actions on an existing manage_* tool — this keeps the surface area small for AI agents.

For a brand-new standalone tool, follow the pattern from init-app.ts:

typescript
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
import { apiPost } from '../api-client.js';

interface MyResponse {
  // response shape
}

export function registerMyNewTool(server: McpServer) {
  server.tool(
    'my_new_tool',      // snake_case name
    `Tool description.   // Multi-line description with examples

Example:
  Input: { ... }
  Output: { ... }

Common errors:
  - ERROR_CODE: Description`,
    {
      // Zod schema for parameters
      app_id: z.string().describe('The app ID'),
      param: z.string().describe('Parameter description'),
    },
    async ({ app_id, param }) => {
      const result = await apiPost<MyResponse>(`/v1/${app_id}/my-endpoint`, { param });
      return {
        content: [{
          type: 'text' as const,
          text: JSON.stringify(result, null, 2),
        }],
      };
    }
  );
}

API client functions available: apiGet, apiPost, apiPatch, apiDelete (from ../api-client.js).

Step 2: Register in services/mcp-server/src/create-server.ts

typescript
import { registerMyNewTool } from './tools/my-new-tool.js';
// ...
registerMyNewTool(server);

Step 3: Create the backing API route in services/control-api/src/routes/

  • Fastify route handler matching the endpoint your tool calls
  • Register in services/control-api/src/index.ts

Step 4: Update documentation in services/mcp-server/src/docs/user-documentation.ts

  • Add tool to the relevant section's table in the SECTIONS object

4. Adding a Database Migration

  • IMPORTANT: Use scripts/migrate.ts or scripts/backfill-migrations.ts, NEVER raw psql
  • Migration files: db/control-plane/NNN_description.sql (sequential numbering, starting at 001_initial_schema.sql)
  • Pick the next free three-digit prefix; never edit a committed migration
  • Run migrations: npx tsx scripts/migrate.ts

5. Coding Conventions

ConventionExample
MCP tool namessnake_case. Two flavours: standalone (init_app, deploy_function, select_rows) and manage_* umbrella tools that take an action enum (manage_schema, manage_rls, manage_function, manage_frontend, etc.)
App IDsapp_ prefix: app_abc123
Service keysbb_sk_ prefix: bb_sk_a1b2c3...
Environment variablesBUTTERBASE_ prefix: BUTTERBASE_API_KEY
Response metadata_meta.next_actions (suggested next tool calls), _meta.resource_info (quota/state)
Error codesUPPERCASE_WITH_UNDERSCORES: AUTH_RLS_POLICY_VIOLATION, QUOTA_TABLE_LIMIT
Domainbutterbase.ai (never "nira")

6. Running Locally

bash
docker-compose -f docker-compose.local.yml up
ServicePortURL
Control API4000http://localhost:4000
Dashboard API4100http://localhost:4100
Deno Runtime7133http://localhost:7133
Control Plane DB5433postgres://localhost:5433
Data Plane DB5435postgres://localhost:5435
PgBouncer6432postgres://localhost:6432
LocalStack (S3)4566http://localhost:4566

7. Testing

  • Framework: Vitest
  • Run tests per workspace: cd services/control-api && npm test
  • Test files: __tests__/ directory or co-located *.test.ts
  • Build all workspaces: npm run build (from repo root)
  • Type check: npx tsc --noEmit in each workspace

Frequently asked questions

What does the Contributing AI skill do?

Use when contributing to the Butterbase codebase, adding new MCP tools, creating API routes, writing migrations, or understanding the monorepo architecture

Why use Contributing on TypingMind?

Because you install it once and use it with any model. Contributing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Contributing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/butterbase-ai/butterbase-skills/tree/main/skills/contributing. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Contributing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Contributing?

As many as you like. As long as a model supports skills, you can use Contributing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Contributing AI skill free?

Yes. It is published on GitHub by butterbase-ai under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇