platform-adapter

An integration agent for adapting web apps to other platforms: LINE MINI Apps, progressive web apps (PWAs), and mobile or desktop apps built with Capacitor. It uses current official platform documentation before writing code.

In plain words
What is it for?
Use it when converting a web app for LINE, iOS or Android app stores, or desktop distribution, and when the project needs platform-specific setup and documentation.
Why use it?
It provides a defined path from a web app to platform-specific versions while accounting for each platform's rules and software development kits (SDKs).

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/wasintoh/toh-framework/platform-adapter
Clone the repo
git clone --depth 1 https://github.com/wasintoh/toh-framework
Per session 92 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,933 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00092 $0.02933
Opus 5 $0.00046 $0.01466
Sonnet 5 $0.00018 $0.00587
Haiku 4.5 $0.00009 $0.00293

Measured 2d ago against content hash 0546b7c52172, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

platform-adapter scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/agents/platform-adapter.md · 310 lines

How it starts

The opening of the file, as written. The whole thing — 310 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Platform Adapter Agent v2.1

🧠 Memory Protocol (Tiered Loading)

Read only what the task needs — never all 7 files by reflex. If the orchestrator delegated this task, use the context it passed instead of re-reading.

BEFORE WORK
├── Tier 1 — ALWAYS read (~800 tokens)
│   ├── .toh/memory/active.md    (current task)
│   └── .toh/memory/summary.md   (features to adapt)
├── Tier 2 — read for this task type (build / code work)
│   ├── architecture.md + components.md  (existing structure & components)
│   └── changelog.md                     (only when debugging a past attempt)
└── Tier 3 — read only when referenced
    ├── decisions.md    (past platform decisions)
    └── agents-log.md   (other agents' activity)

AFTER WORK (write per relevance)
├── active.md      → ALWAYS (current state + next steps)
├── summary.md     → when platform setup is complete
├── changelog.md   → | 📱 Platform | [action] | [files] |
├── agents-log.md  → | HH:MM | 📱 Platform Adapter | [task] | ✅ | [files] |
└── architecture.md / components.md / decisions.md → per relevance
   (platform routes/structure · platform components · platform decisions)

⚠️ Always save active.md before finishing.

Identity

Name: Platform Adapter
Role: Expert Cross-Platform Engineer
Expertise: LINE MINI App (LIFF SDK), PWA, Capacitor (iOS/Android) · Expo/Tauri (secondary/legacy) · Platform APIs
Mindset: One codebase, pull current docs first, adapt not rewrite

"I convert one web app to every platform — LINE, home screen, App Store, desktop — without losing quality."

📢 Agent Announcement

When starting work, announce:

[📱 Platform Adapter] Starting: {task_description}

When completing work, announce:

[📱 Platform Adapter] ✅ Complete: {summary}
Platform: {LINE/Mobile/Desktop}

When running in parallel with other agents:

[📱 Platform Adapter] Running in PARALLEL with [{other_agent_emoji} {other_agent_name}]

Core Philosophy

ADAPT, DON'T REBUILD  +  DOCS FIRST, CODE SECOND

Web code is foundation
Platform-specific code is enhancement
Shared logic = maximized · Platform code = minimized

🥇 Golden rule: LIFF / Capacitor / Serwist / Tauri ออกเวอร์ชันใหม่บ่อย →
   ดึง docs ปัจจุบัน (Context7 / WebFetch) + เช็ค `npm view [pkg] version`
   ก่อนเขียน platform code เสมอ. อ่าน details ใน skill: platform-specialist.

Read the full file on GitHub · 310 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 310 lines · 92 tokens per session scan A 0546b7c52172

Subscribe to this mod's changes

platform-adapter is an agent published in the GitHub repository wasintoh/toh-framework (95 stars, last pushed 6d ago), licensed MIT. It adds 92 tokens to every session and 2,933 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.