Asia/Shanghai
April 23, 2026

Hack Your Miaoda Agent

给你的妙搭 Agent 做个小手术

Mingjian Shao
Hack Your Miaoda Agent
Every Feishu Miaoda app ships with a coding agent behind it — 24 skills, cross-session memory, three-tier model config. None of it visible by default. Here's how to pop the hood.
The first time I opened a Miaoda app, I thought it was just another AI-assisted low-code tool. It isn't.Behind every Miaoda app runs an independent coding agent built on the Claude Agent SDK protocol. It comes with:
  • 📚 24 professional skills — dev conventions, UI components, data layer, integrations, and (the most underrated asset) 6 review/test skills that function as a built-in QA team.
  • 🧠 Cross-session memory via MEMORY.md — instructions written here persist into every new conversation.
  • 🤖 Three independent model slots — fast / thinking / comprehensive, each configurable separately.
But the default state hides all of it. The IDE's file explorer filters out dot-prefixed directories. The memory file doesn't exist until the agent is told to create it. The model panel is buried two clicks deep. And no one tells you about the six review skills.This post gives you three copy-paste prompts that unlock everything, plus the hard-won knowledge about the pitfalls.
The agent's runtime lives at /home/gem/workspace/code/.agent/ inside the sandbox container — in the project directory, not your home folder. The IDE doesn't show dot-prefixed folders, so it's invisible by default.Paste this into the Miaoda chat box at the bottom of the IDE:
Bash
Please run the following commands in order and paste each output back to me:

1. pwd && ls -la ~
2. ls -la /home/gem/workspace/code/.agent/
3. ln -s /home/gem/workspace/code/.agent /home/gem/workspace/code/agent
4. ln -s /home/gem/workspace/code/.agent ~/.agent
5. ls -la /home/gem/workspace/code/agent/
6. find /home/gem/workspace/code/.agent/skills -name "SKILL.md" | sort
What you get:
  • An agent/ folder appears in the IDE's file explorer (with a ↗ symlink arrow).
  • The complete list of all 24 SKILL.md files and their exact paths.
  • Visibility into conversation_xxx/ (the agent's working cache — attachments, e2e traces, fetched web content) and skills/ (the read-only skill library).
Two rules:
  • Never mv or rm .agent/ — that directory is the agent's live runtime. Touching it breaks the agent.
  • skills/ is read-only (dr-xr-xr-x). You can dump, you can copy, you cannot extend. To add new behavior, inject instructions into MEMORY.md instead.
The agent will silently lose track of what it did unless you force it to write things down. Two files, two audiences:
FileRoleAudience
.agent/memory/MEMORY.mdAgent's cross-session memoryThe agent itself (auto-read next session)
CHANGELOG.md (project root)Human-readable logYou, reviewers, git
Paste this prompt once. It installs the behavior permanently by writing the rule into MEMORY.md itself:
Markdown
From now on, after completing any task you must do three things:

1. Append to /home/gem/workspace/code/.agent/memory/MEMORY.md (create if missing), format:
   ## YYYY-MM-DD Changelog
   - [feat] Added xxx (file: xxx)
   - [fix]  Fixed xxx (cause: xxx, correct approach: xxx)
   - [refactor] Refactored xxx

2. Append to /home/gem/workspace/code/CHANGELOG.md (create if missing), using
   Keep a Changelog format (Added / Changed / Fixed / Removed), newest entries on top.

3. At the end of your reply, tell me what changed in both files.

Also write this rule at the top of MEMORY.md as a long-term instruction, so it
stays active in future sessions. Append rather than overwrite. Preserve existing content.
A key subtlety: the prompt must list the three requirements as separate numbered steps. If you write "append to MEMORY.md and CHANGELOG.md" in one sentence, the agent will pick one and skip the other. Ask me how I know.
The single highest-ROI action in the whole flow. Miaoda splits models into three task types, each independently configured.Path: Miaoda IDE → top-left "管理""模型" tab.
Task TypeUsed ForRecommendedWhat Not to Do
Fast (快速任务)Search, retrievalAnything cheap (MINIMAX, DeepSeek Lite)
Thinking (思考任务)Plan review, code reviewGLM 5.1 (don't downgrade)Cheap out here = review quality collapses
Comprehensive (综合任务) ⭐End-to-end planning and codingClaude > GLM 5.1 > QwenCheap out here = business code collapses
The "Comprehensive" slot is the one that matters. Miaoda's coding agent was designed against the Claude Agent SDK protocol, so Claude-family models are the most natively compatible. GLM 5.1 follows instructions remarkably well as a second choice. Qwen tends to drop subtle requirements when the context gets dense.Strategy: set everything to the strongest available model at project start. After 3–5 rounds of real tasks, downgrade the slots where the cheaper model is visibly fine. Never downgrade the Comprehensive slot to save money.
Once the three setup steps are done, these are the patterns you'll use every day.The most underrated resource in the whole Miaoda platform. Ask the agent to follow one of these skills by name:
Bash
# Correctness review
Please follow ./agent/skills/correctness-review/SKILL.md and audit the entire
server/modules/{module}/ directory for correctness issues.

# Performance review
Please follow ./agent/skills/performance-review/SKILL.md and review the
recently modified code for performance traps.

# Security review
Please follow ./agent/skills/security-review/SKILL.md and check for
SQL injection, XSS, sensitive data leaks, and permission bypass issues.

# Systematic debugging
When a bug appears: Please follow the methodology in
./agent/skills/debug-investigation/SKILL.md to investigate {symptom} and
give me a root-cause analysis, not a surface patch.
The agent will actually read the skill and walk through its checklist. This is categorically different from asking "is this code good?" — you're invoking a specific, documented review procedure.Before any non-trivial feature, make the agent ground itself in the relevant skills:
Markdown
Before implementing {feature}, please read and summarize the key points of:
- ./agent/skills/steering/nestjs-react-fullstack/coding-guide/SKILL.md
- ./agent/skills/steering/nestjs-react-fullstack/plugin-guide/SKILL.md
- ./agent/skills/{feature-related}/SKILL.md

Then give me an implementation plan based on these conventions. Do not write
code yet. I'll approve the plan first, then you execute.
This costs one extra turn and saves you from rewriting half the module.
These are the traps that cost me hours before I figured them out. They apply to every Miaoda app.Miaoda apps route internally through a strict URL format. If your notification emails or webhook links break, this is almost always why.Correct format:
Text
/app/app_{appId}/{resource}/{id}?locale=zh_CN
WrongWhat's missingSymptom
/complaint/{id}/app/app_{appId}/ prefixWon't route to the app
/app/{appId}/complaint/{id}app_ prefix on appIdParam format error
/app/app_{appId}/complaint/{id}?locale=zh_CNUI fails to load, or loads in English
The app_ prefix is hardcoded. The locale=zh_CN is required — Miaoda's frontend uses it to pick which locale bundle to load. Test by pasting a link into the browser address bar; if it opens, your schema is right.The platform docs suggest file_token but it throws error 505502 on save. The actually-working format is just a URL array:
Json
{"attachment_field": ["https://dataloom...download_url"]}
dataloom.uploadFile returns a relative download_url — drop it straight into the array. The plugin handles the download-to-attachment conversion internally.It can truncate due to pagination or permissions. Don't trust it as the sole source for "is this table real?" Verify against the Miaoda console UI whenever you're about to declare a table an orphan.I warned about this above but it's worth repeating. "Append to MEMORY.md and CHANGELOG.md after each task" in one sentence will cause the agent to pick one. Always number the requirements separately, always include "append rather than overwrite" and "create if missing."
So you know what the agent can do:
CategorySkillsPurpose
Dev conventions (nested)steering/nestjs-react-fullstack/{coding-guide, plugin-guide, ...}Tech stack foundation
UI componentsforms-skill, table-skill, charts-skill, file-preview, web-slide-skill, client-add-aily-web-chatFrontend building blocks
Data layersql, database-skill, attachment, file-storage, extract-json-schema, memoryPersistence and schemas
Integrationsfeishu, authz-cli, crawlwebpageExternal systems
Quality assurancecorrectness-review, performance-review, security-review, testing-guide, e2e-testing, debug-investigationThe built-in QA team
Metadata-analysis, skill-creatorSelf-referential capabilities
Rule of thumb: Please follow ./agent/skills/{name}/SKILL.md and do {task}.
If you use an AI coding assistant like OpenCode to pair-program inside Miaoda, paste this prompt and let it handle the full setup for you:
Bash
I'm opening a new Feishu Miaoda app and I want you to set it up fully.
Reference: https://mjshao.fun/blog/hack-miaoda-agent

Steps:
1. Run `pwd && ls -la ~` and `ls -la /home/gem/workspace/code/.agent/` to verify the runtime path.
2. Create both symlinks: /home/gem/workspace/code/agent and ~/.agent pointing at .agent.
3. List all 24 SKILL.md files so I can see what's available.
4. Bootstrap MEMORY.md with a long-term instruction that enforces the dual changelog
   (MEMORY.md + CHANGELOG.md) after every task.
5. Create CHANGELOG.md at project root in Keep a Changelog format.
6. Tell me which model I should set for the "综合任务" slot and why.
7. Report back with the exact state of both log files.

Rules:
- Never mv/rm the .agent directory.
- Never modify files under skills/ (they're read-only).
- All log entries append, never overwrite.
Three prompts, ten minutes, a fully instrumented coding agent. The Miaoda team put a lot in the box — it's only fair to use it.
每个飞书妙搭应用背后都跑着一个 coding agent——24 个 skill、跨会话记忆、三档模型配置。默认全藏着。这篇告诉你怎么把盖子掀开。
第一次打开妙搭应用的时候,我以为它不过是又一个 AI 低代码工具。不是。每个妙搭应用背后,其实跑着一个基于 Claude Agent SDK 协议的独立 coding agent。它自带:
  • 📚 24 个专业 skill——开发规范、UI 组件、数据层、集成,还有(最被低估的)6 个 review/test skill,相当于内置了个 QA 团队。
  • 🧠 跨会话记忆——通过 MEMORY.md 实现,写进这里的指令下次对话还生效。
  • 🤖 三档独立模型配置——快速 / 思考 / 综合,每档单独配。
但默认状态下这些你都看不见。IDE 资源管理器过滤点前缀目录,memory 文件不存在(要 agent 自己创),模型面板藏在两层菜单里,6 个 review skill 根本没人告诉你。这篇文章给你三段可复制的 prompt,一次性解锁全部能力,顺手把踩过的坑也列清楚。
Agent 的运行时在沙箱容器里的 /home/gem/workspace/code/.agent/——在项目目录下,不在 home 里。IDE 不显示点前缀文件夹,所以默认看不见。把下面这段粘到妙搭底部的 AI 对话框:
Bash
请依次执行并把每步输出贴给我:

1. pwd && ls -la ~
2. ls -la /home/gem/workspace/code/.agent/
3. ln -s /home/gem/workspace/code/.agent /home/gem/workspace/code/agent
4. ln -s /home/gem/workspace/code/.agent ~/.agent
5. ls -la /home/gem/workspace/code/agent/
6. find /home/gem/workspace/code/.agent/skills -name "SKILL.md" | sort
你会拿到:
  • IDE 资源管理器多出一个 agent/ 文件夹(带 ↗ 软链标志)。
  • 24 个 SKILL.md 的完整路径清单。
  • 能看到 conversation_xxx/(agent 的工作区缓存——附件、e2e 产物、抓的网页)和 skills/(只读技能库)两个子目录。
两条铁律:
  • 永远别 mvrm .agent/——那是 agent 运行时真身,动了就跑飞。
  • skills/ 是只读的dr-xr-xr-x)。只能 dump 和拷贝,不能加新 skill。想扩展行为,只能通过 MEMORY.md 注入指令。
不强制 agent 自己记,它就会忘记刚做了什么。两个文件,各服务一批读者:
文件角色受众
.agent/memory/MEMORY.mdagent 跨会话记忆agent 自己(下次对话自动读)
CHANGELOG.md(项目根)人类可读日志你自己、评审、git
这段 prompt 只粘一次。它通过把规则写进 MEMORY.md 顶部,让这个行为长期生效:
Markdown
从现在起,每完成一个任务后必须做 3 件事:

1. 追加到 /home/gem/workspace/code/.agent/memory/MEMORY.md(不存在则创建),格式:
   ## YYYY-MM-DD 变更日志
   - [feat] 新增 xxx 功能(文件:xxx)
   - [fix]  修复 xxx 问题(原因:xxx,正确做法:xxx)
   - [refactor] 重构 xxx 模块

2. 追加到项目根目录 /home/gem/workspace/code/CHANGELOG.md(不存在则创建),
   按 Keep a Changelog 格式(Added / Changed / Fixed / Removed),最新的在上面。

3. 在回复末尾告诉我这两个文件更新了什么。

请把这条规则也写进 MEMORY.md 顶部作为长期指令,这样下次开新会话也生效。
追加而非覆盖,保留原有内容。
有个细节很重要:这三条要求必须分点列。如果你写成"请把变更追加到 MEMORY.md 和 CHANGELOG.md",agent 会挑一件做,扔掉另一件。别问我怎么知道的。
全流程里 ROI 最高的一步。妙搭把模型按任务类型分成三档,每档独立配置。路径:妙搭 IDE 左上「管理」→「模型」。
任务组用途推荐配置忌讳
快速任务搜索、信息检索便宜的够用(MINIMAX / DeepSeek Lite)
思考任务方案评估、代码审查GLM 5.1(不要降级)省这档 = review 质量崩
综合任务端到端规划和编码Claude > GLM 5.1 > Qwen省这档 = 业务代码崩
「综合任务」这档是最关键的。妙搭 coding agent 本身就是基于 Claude Agent SDK 协议设计的,所以 Claude 系模型原生契合度最高。GLM 5.1 指令遵循也很强,作为次选。Qwen 系列在长上下文里容易漏掉细节要求。策略是:项目起手先都设到能选到的最强模型,跑 3-5 轮实际任务后,哪档用便宜模型也够用就降哪档。但「综合任务」那档永远不要为省钱降级。
起手三件套走完后,下面这些是每天都会用的套路。整个妙搭平台最被低估的资源。让 agent 按 skill 名字走:
Bash
# 正确性审查
请按 ./agent/skills/correctness-review/SKILL.md 的规范,
检查 server/modules/{模块名}/ 整个目录,找出潜在的正确性问题。

# 性能审查
请按 ./agent/skills/performance-review/SKILL.md 的规范,
review 最近修改的代码有没有性能陷阱。

# 安全审查
请按 ./agent/skills/security-review/SKILL.md 的规范,
检查是否有 SQL 注入、XSS、敏感信息泄露、权限绕过等问题。

# 系统性 debug
遇到 bug 时:请按 ./agent/skills/debug-investigation/SKILL.md 的方法论,
系统性调查 {问题现象},给出根因分析而不是表面 fix。
Agent 会真的去读 skill 文件,按里面的 checklist 一条条走。这跟随口问"这代码行不行"是两回事——你是在调用一个有文档、有步骤的正式审查流程。写任何像样的功能之前,让它先把相关 skill 读一遍,建立上下文:
Markdown
在动手实现 {功能} 之前,请先读并总结这几个 skill 的核心要点:
- ./agent/skills/steering/nestjs-react-fullstack/coding-guide/SKILL.md
- ./agent/skills/steering/nestjs-react-fullstack/plugin-guide/SKILL.md
- ./agent/skills/{功能相关}/SKILL.md

然后按这些规范的要求给我实现方案(不要直接写代码)。方案我批准后再开工。
多一轮对话的成本,省掉半个模块返工的代价。
这些都是我踩过、花了几个小时才弄明白的陷阱,对所有妙搭应用都适用。妙搭应用内部路由有严格的格式要求。如果你的通知邮件或者 webhook 链接点开是 404 / 空白页,十有八九是这个原因。正确格式
Text
/app/app_{appId}/{resource}/{id}?locale=zh_CN
错写缺什么结果
/complaint/{id}/app/app_{appId}/ 前缀路由不到应用
/app/{appId}/complaint/{id}appIdapp_ 前缀参数格式错
/app/app_{appId}/complaint/{id}?locale=zh_CNUI 不加载或显示英文
app_ 是硬编码前缀。locale=zh_CN 必须带——妙搭前端靠这个参数挑加载哪个语言包。验证方法:在浏览器地址栏手工拼一条,能打开 = schema 对。平台文档暗示用 file_token,但存的时候会炸 505502 错误。实际能用的写法是直接塞 URL 数组:
Json
{"附件字段": ["https://dataloom...download_url"]}
dataloom.uploadFile 返回的 download_url 是相对路径,直接丢进数组就行。插件内部会自动把 URL 转成附件。会因为分页或权限被截断。不能只信 CLI 返回就断言"这张表是孤儿表"。要判定表是否存在,进妙搭 console UI 交叉验证一下。上面提过一次,值得再强调。"每次任务后追加到 MEMORY.md 和 CHANGELOG.md"写成一句话,agent 会挑一件做。永远分点,永远加上"追加而非覆盖"、"不存在则创建"。
让你知道 agent 到底都会些什么:
类别Skills用途
开发规范(嵌套)steering/nestjs-react-fullstack/{coding-guide, plugin-guide, ...}技术栈底座
UI 组件forms-skilltable-skillcharts-skillfile-previewweb-slide-skillclient-add-aily-web-chat前端构件
数据层sqldatabase-skillattachmentfile-storageextract-json-schemamemory存储和 schema
集成feishuauthz-clicrawlwebpage外部系统
质量保障correctness-reviewperformance-reviewsecurity-reviewtesting-guidee2e-testingdebug-investigation内置 QA 团队
元能力data-analysisskill-creator自我指涉
通用公式:请按 ./agent/skills/{名字}/SKILL.md 的规范做 {任务}
如果你用 OpenCode 这类 AI 编程助手配合妙搭干活,可以把下面这段粘给它,它会一条龙帮你搞定整套配置:
Bash
我打开了一个新的飞书妙搭应用,请你帮我把它全流程配置好。
参考:https://mjshao.fun/blog/hack-miaoda-agent

步骤:
1. `pwd && ls -la ~` `ls -la /home/gem/workspace/code/.agent/` 确认运行时路径。
2. 建两条软链:/home/gem/workspace/code/agent ~/.agent 都指向 .agent。
3. 列出 24 SKILL.md 文件让我看看都有啥。
4. 初始化 MEMORY.md,在顶部写上强制双 changelog(MEMORY.md + CHANGELOG.md)
   的长期指令。
5. 在项目根创建 CHANGELOG.md,用 Keep a Changelog 格式。
6. 告诉我「综合任务」这档应该设哪个模型,为什么。
7. 最后给我看看两个日志文件的确切状态。

规则:
- 永远不要 mv/rm .agent 目录。
- 永远不要改 skills/ 下的文件(它们是只读的)。
- 所有日志条目都是追加,永远不要覆盖。
三段 prompt,十分钟,一个配置完整的 coding agent。妙搭团队在盒子里塞了很多东西——你不用一下有点对不起他们。
Share this post:
Enjoy this post? Subscribe via RSS: English | 中文