Skip to content
Taku Docs

Version 1.4.0 (current)

Build your first plugin

Create a Skill/MCP greeting plugin, install it, call it through the Agent, and remove it.

This tutorial uses the community Skill/MCP format, separate from God Mode's manifest.json. You need a Taku development version that provides taku-plugin, plus a connected model for the Agent call.

All files are public: source, ZIP, and SHA-256. You can also copy the four files below.

Validation scope

The example passes host MCP protocol and package checks. The existing create/package/install and host-assisted PR flow was verified on a dedicated development emulator. Check this example's Agent/UI behavior on your release ROM using the steps below.

Create the files

Create taku-hello-world/ and add the following files. Keep credentials and personal data outside the plugin.

.codex-plugin/plugin.json

{
  "name": "taku-hello-world",
  "version": "1.0.1",
  "description": "Return a local greeting through the Agent. No network or personal data.",
  "author": {
    "name": "Taku OS"
  },
  "license": "Apache-2.0",
  "skills": "./skills/",
  "mcpServers": "./.mcp.json",
  "taku": {
    "capabilities": [
      "return a local greeting"
    ],
    "permissions": []
  }
}

.mcp.json

{
  "mcpServers": {
    "hello-world": {
      "command": "/system/bin/sh",
      "args": [
        "./server.sh"
      ],
      "cwd": "."
    }
  }
}

server.sh

#!/system/bin/sh

while IFS= read -r line; do
  id=$(printf '%s' "$line" | sed -n 's/.*"id"[[:space:]]*:[[:space:]]*\([0-9][0-9]*\).*/\1/p')
  [ -n "$id" ] || continue

  case "$line" in
    *'"initialize"'*)
      printf '{"jsonrpc":"2.0","id":%s,"result":{"protocolVersion":"2024-11-05","capabilities":{"tools":{}},"serverInfo":{"name":"taku-hello-world","version":"1.0.1"}}}\n' "$id"
      ;;
    *'"tools/list"'*)
      printf '{"jsonrpc":"2.0","id":%s,"result":{"tools":[{"name":"hello_world","description":"Return the first Taku OS plugin greeting","inputSchema":{"type":"object","properties":{},"additionalProperties":false}}]}}\n' "$id"
      ;;
    *'"tools/call"'*)
      printf '{"jsonrpc":"2.0","id":%s,"result":{"content":[{"type":"text","text":"Hello from Taku!"}],"structuredContent":{"message":"Hello from Taku!","runtime":"on-device","plugin":"taku-hello-world"}}}\n' "$id"
      ;;
    *)
      printf '{"jsonrpc":"2.0","id":%s,"error":{"code":-32601,"message":"Method not found"}}\n' "$id"
      ;;
  esac
done

skills/hello-world/SKILL.md

---
name: hello-world
description: Call the local hello_world tool when the user asks for the Taku plugin greeting.
---

Call `hello_world` and relay its actual result. Do not invent a successful call. The expected result is `Hello from Taku!`.

Validate, install and call

Copy the folder from your computer to your own device. Replace SERIAL with the serial from adb devices -l:

This computer-assisted route requires a Taku userdebug development image with root ADB; the work directory is root-owned. Stop if adb root is refused. Do not use this route on a stock production image. The id output must show uid=0(root).

adb -s SERIAL root
adb -s SERIAL wait-for-device
adb -s SERIAL shell id
adb -s SERIAL push taku-hello-world /data/local/agentos/work/
adb -s SERIAL shell

Then run in the device shell:

taku-plugin validate /data/local/agentos/work/taku-hello-world
taku-plugin pack /data/local/agentos/work/taku-hello-world /data/local/agentos/work/hello-world-package
taku-plugin catalog-add /data/local/agentos/work/hello-world-package

Use the returned marketplace path for installation:

taku-plugin install MARKETPLACE_PATH taku-hello-world
taku-plugin list
taku-plugin status

Ask the connected Agent: Call the Hello World plugin and show its actual greeting.

Success means the execution record contains a hello_world call returning Hello from Taku!. Chat text alone does not prove a call. If no call occurs, check the model connection, taku-plugin status and MCP loading.

Remove the test installation

Use the exact plugin ID returned by taku-plugin list:

taku-plugin uninstall PLUGIN_ID

Exit code 2 means installation or removal completed but MCP reload failed. Read the actual status before retrying.

Share a plugin

Ask the Agent to package a working task, or run taku-plugin publish DIR OUTPUT_DIR. Opening a community PR needs authenticated gh and git; when Android lacks them, use the publishing helper on an authorized computer. A PR URL confirms submission. A local package path does not. Get the host publishing helper from the public community repository. On a computer connected to your device and signed in to your own GitHub account, run:

This block uses Bash (macOS/Linux; WSL on Windows) and Python 3. Inspect the pinned helper above first; it imports only Python standard-library modules. Verification and execution use the same bytes in one process. A failed download, hash mismatch or oversized file stops execution; -I prevents current-directory modules from affecting verification.

python3 -I - SERIAL OUTPUT_DIR <<'PY_HELPER'
import hashlib
import sys
import urllib.request

if len(sys.argv) != 3:
    raise SystemExit("Provide your device serial and packed output directory")
url = "https://raw.githubusercontent.com/Taku-OS/taku-os-plugins/b783b226424217ceca700f3444e64a26ef8149d3/scripts/publish-from-device.py"
expected = "a566dcca0fa39f7fc5f851d0e1b47a7980b8b06abd737c451d37a3ff881a120f"
with urllib.request.urlopen(url, timeout=30) as response:
    source = response.read(65537)
if len(source) > 65536 or hashlib.sha256(source).hexdigest() != expected:
    raise SystemExit("Helper verification failed; nothing was executed")
sys.argv = ["publish-from-device.py", "--serial", sys.argv[1], "--packed", sys.argv[2]]
exec(compile(source, "<verified Taku publishing helper>", "exec"), {"__name__": "__main__"})
PY_HELPER

It transfers only the plugin package, not your computer credentials. See the community contract and publishing flow.

Plugins run with the Agent's privileges. capabilities and permissions are declarations, not a sandbox. This example does not use the network or read user data; review other plugins' actual behavior and source before installing them.

Research preview · Current availability

Documentation retrieval

Search the published documentation for excerpts and citations. This uses full-text retrieval, not LLM-generated answers.

Every result links to the original article. Read research ideas separately from verified capabilities.

Help and troubleshooting →
Was this article helpful?
Report an issue or give feedback

Delivery to the maintenance queue does not mean it has been handled. Feedback is retained for 90 days.

Built with Fumadocs

On this page