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.
Why This Matters
- 📚 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.
One — Unlock the Hidden Directory
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
- 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).
- 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.
Two — Install a Dual Changelog System
| File | Role | Audience |
|---|---|---|
| .agent/memory/MEMORY.md | Agent's cross-session memory | The agent itself (auto-read next session) |
| CHANGELOG.md (project root) | Human-readable log | You, reviewers, git |
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.
Three — Switch to the Strongest Model
| Task Type | Used For | Recommended | What Not to Do |
|---|---|---|---|
| Fast (快速任务) | Search, retrieval | Anything cheap (MINIMAX, DeepSeek Lite) | — |
| Thinking (思考任务) | Plan review, code review | GLM 5.1 (don't downgrade) | Cheap out here = review quality collapses |
| Comprehensive (综合任务) ⭐ | End-to-end planning and coding | Claude > GLM 5.1 > Qwen | Cheap out here = business code collapses |
Daily High-Value Prompts
Free Code Review (via the 6 built-in skills)
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.
Read the Spec Before Coding
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.
Four Pitfalls Worth Knowing
1. App-internal URL schema
Text
/app/app_{appId}/{resource}/{id}?locale=zh_CN
| Wrong | What's missing | Symptom |
|---|---|---|
| /complaint/{id} | /app/app_{appId}/ prefix | Won't route to the app |
| /app/{appId}/complaint/{id} | app_ prefix on appId | Param format error |
| /app/app_{appId}/complaint/{id} | ?locale=zh_CN | UI fails to load, or loads in English |
2. Attachment fields accept URL arrays, not file_token objects
Json
{"attachment_field": ["https://dataloom...download_url"]}
3. lark-cli +table-list output is incomplete
4. Keep the logging prompt broken out into steps
The 24 Skills, Categorized
| Category | Skills | Purpose |
|---|---|---|
| Dev conventions (nested) | steering/nestjs-react-fullstack/{coding-guide, plugin-guide, ...} | Tech stack foundation |
| UI components | forms-skill, table-skill, charts-skill, file-preview, web-slide-skill, client-add-aily-web-chat | Frontend building blocks |
| Data layer | sql, database-skill, attachment, file-storage, extract-json-schema, memory | Persistence and schemas |
| Integrations | feishu, authz-cli, crawlwebpage | External systems |
| Quality assurance ⭐ | correctness-review, performance-review, security-review, testing-guide, e2e-testing, debug-investigation | The built-in QA team |
| Meta | data-analysis, skill-creator | Self-referential capabilities |
Let AI Do It
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、跨会话记忆、三档模型配置。默认全藏着。这篇告诉你怎么把盖子掀开。
为什么要做这个手术
- 📚 24 个专业 skill——开发规范、UI 组件、数据层、集成,还有(最被低估的)6 个 review/test skill,相当于内置了个 QA 团队。
- 🧠 跨会话记忆——通过 MEMORY.md 实现,写进这里的指令下次对话还生效。
- 🤖 三档独立模型配置——快速 / 思考 / 综合,每档单独配。
一、解锁隐藏目录
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/(只读技能库)两个子目录。
- 永远别 mv 或 rm .agent/——那是 agent 运行时真身,动了就跑飞。
- skills/ 是只读的(dr-xr-xr-x)。只能 dump 和拷贝,不能加新 skill。想扩展行为,只能通过 MEMORY.md 注入指令。
二、装一套双 changelog 机制
| 文件 | 角色 | 受众 |
|---|---|---|
| .agent/memory/MEMORY.md | agent 跨会话记忆 | agent 自己(下次对话自动读) |
| CHANGELOG.md(项目根) | 人类可读日志 | 你自己、评审、git |
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 顶部作为长期指令,这样下次开新会话也生效。
追加而非覆盖,保留原有内容。
三、切到最强模型
| 任务组 | 用途 | 推荐配置 | 忌讳 |
|---|---|---|---|
| 快速任务 | 搜索、信息检索 | 便宜的够用(MINIMAX / DeepSeek Lite) | 无 |
| 思考任务 | 方案评估、代码审查 | GLM 5.1(不要降级) | 省这档 = review 质量崩 |
| 综合任务 ⭐ | 端到端规划和编码 | Claude > GLM 5.1 > Qwen | 省这档 = 业务代码崩 |
日常高价值 prompt
白嫖官方代码审查(6 个 review 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。
先让它读规范再动手
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
然后按这些规范的要求给我实现方案(不要直接写代码)。方案我批准后再开工。
四个值得知道的坑
1. 应用内跳转 URL schema
Text
/app/app_{appId}/{resource}/{id}?locale=zh_CN
| 错写 | 缺什么 | 结果 |
|---|---|---|
| /complaint/{id} | 缺 /app/app_{appId}/ 前缀 | 路由不到应用 |
| /app/{appId}/complaint/{id} | appId 缺 app_ 前缀 | 参数格式错 |
| /app/app_{appId}/complaint/{id} | 缺 ?locale=zh_CN | UI 不加载或显示英文 |
2. 附件字段走 URL 数组,不是 file_token
Json
{"附件字段": ["https://dataloom...download_url"]}
3. lark-cli +table-list 返回可能不全
4. 日志 prompt 必须分点列
24 个 skill 分类速览
| 类别 | Skills | 用途 |
|---|---|---|
| 开发规范(嵌套) | steering/nestjs-react-fullstack/{coding-guide, plugin-guide, ...} | 技术栈底座 |
| UI 组件 | forms-skill、table-skill、charts-skill、file-preview、web-slide-skill、client-add-aily-web-chat | 前端构件 |
| 数据层 | sql、database-skill、attachment、file-storage、extract-json-schema、memory | 存储和 schema |
| 集成 | feishu、authz-cli、crawlwebpage | 外部系统 |
| 质量保障 ⭐ | correctness-review、performance-review、security-review、testing-guide、e2e-testing、debug-investigation | 内置 QA 团队 |
| 元能力 | data-analysis、skill-creator | 自我指涉 |
让 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。妙搭团队在盒子里塞了很多东西——你不用一下有点对不起他们。