# Extension Overview

Cowork can take on new abilities without a new version of the app. There are four kinds of addition: **Skill**, **Extension**, **Injection** and **Mini App**. All four can be packed together into one **Cowork package**, so one job's skills, code, page scripts and screen travel as one unit.

```mermaid
flowchart LR
  cowork(("Cowork"))

  subgraph pkg["Cowork package"]
    direction TB
    skill["Skill<br/>SKILL.md + scripts"]
    subgraph ext["Extension · package.json"]
      direction TB
      entry["Entry file<br/>activate()"]
      conn["Connector"]
      inj["Injection<br/>script inside a web page"]
    end
    mini["Mini App<br/>its own screen"]
  end

  gw["Gateway<br/>one way in and out<br/>for outside messages"]
  web["Websites"]
  chan["Outside channels<br/>WhatsApp …"]

  cowork -- the AI reads it --> skill
  cowork -- runs after you approve --> ext
  cowork -- opens in a tab --> mini
  entry -- puts into pages --> inj
  inj -- runs inside the page --> web
  cowork <-- messages --> gw
  gw <-- joins --> conn
  conn <-- sends and receives --> chan

  style pkg fill:#efe8dc,stroke:#d3c6b1,stroke-width:1px,color:#5c5145
  style ext fill:#e4dacb,stroke:#c4b49b,stroke-width:1px,color:#5c5145
  classDef core fill:#8a7660,stroke:#8a7660,color:#ffffff,stroke-width:1px
  classDef part fill:#fbf8f3,stroke:#c4b49b,color:#3f362b,stroke-width:1px
  classDef outer fill:#f6f2eb,stroke:#cdbfa9,color:#6b6052,stroke-dasharray:4 3
  classDef gateway fill:#6e5d4b,stroke:#6e5d4b,color:#ffffff,stroke-width:1px
  linkStyle default stroke:#a8957a,stroke-width:1.2px
  class cowork core
  class skill,entry,conn,inj,mini part
  class web,chan outer
  class gw gateway
```

## Cowork package

A Cowork package is one folder that holds what one job needs: a Mini App and its screen, the Extension it brings, the Skills the AI uses and an `INSTALL.md` with the setup steps for the AI. Injections are scripts inside the Extension.

```text
<package>/
  miniapp.json     appId, name, version, entry, extension: "extension"
  index.html …     the Mini App screen
  extension/       the Extension: package.json + index.mjs
  skills/<name>/   Skills, optional
  INSTALL.md       setup steps the AI follows
```

In 0.1.41 Cowork does not yet install a package in one step. Each part goes in its own way, as the sections below say.

## Skill

A Skill teaches the AI how to do one kind of job. It is a folder with a `SKILL.md` file, plus scripts if the job needs them.

- The AI reads it when a request matches. Its scripts run on the Bun runtime that comes with Cowork.
- To turn it on, put it in a skill folder. See [Skill](https://docs.micromeet.ai/extend/skills.md).
- Anyone can write one.

## Extension

An Extension is a code package that runs in its own background process: a `package.json` and one entry file.

- In 0.1.41 it registers **Connectors**. Messages from outside channels, such as WhatsApp, come in and go out through **Gateway**; a Connector is the part that joins one channel to Gateway.
- With the browser permission it can also put Injections into the websites it names.
- It is kept in `<Cowork home>/extensions/packages/<name>/`. It runs only after you approve it in **Settings › Extensions**. See [Extension](https://docs.micromeet.ai/extend/extensions.md).

## Injection

An Injection is a script that runs inside a web page, apart from the page's own scripts. Use it to read or act on a website's pages.

- An Extension runs it, or you add a website button in **Settings › Injections**.
- It acts only on the pages it is meant for. See [Injection](https://docs.micromeet.ai/extend/injections.md).

## Mini App

A Mini App is an app with its own screen that opens in a Cowork tab, for you to use.

- In 0.1.41 only the Mini Apps that come with Cowork exist. You cannot build your own yet. See [Mini App](https://docs.micromeet.ai/extend/mini-apps.md).

`<Cowork home>` is `~/.micromeet-cowork` for the released app and `~/.micromeet-cowork_preview` for Preview.

## Which one to build

1. To teach the AI how to do a kind of job, write a **Skill**.
2. To connect an outside message channel to Cowork, write an **Extension** with a Connector.
3. To act inside a website's pages, write an **Injection**: a script inside an Extension, or a website button.
4. An app with its own screen is a **Mini App**. In 0.1.41 only the Mini Apps that come with Cowork exist.

## Related

- [Skill](https://docs.micromeet.ai/extend/skills.md): Folders, sources and rules for skills
- [Extension](https://docs.micromeet.ai/extend/extensions.md): Package layout, Connectors and approval
- [Injection](https://docs.micromeet.ai/extend/injections.md): Scripts and buttons inside web pages
- [Mini App](https://docs.micromeet.ai/extend/mini-apps.md): Apps in a tab and what is available today
