跳到正文
Skillpedia
通用编程7.6k · #13142

build-an-app

它能做什么

这项技能把简短的请求转化为一个基于 Agent-Native 起始模板的小型、可用的领域应用。它首先专注于一个实用的工作流,并说明哪些内容被推迟。适合希望快速获得第一个可用版本的构建者。

适用场景

  • ✓当有人要求你构建一个简单的工具、跟踪器、仪表板或预订系统的时候。
  • ✓当请求比较模糊,你需要一个范围狭窄但能正常工作的第一版本的时候。
  • ✓当你希望有一项冒烟测试,证明应用的关键规则能够正常运行的时候。

技能链接

https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/build-an-app/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/BuilderIO/agent-native/blob/main/.agents/skills/build-an-app/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“你能构建一个简单的会议室预订应用吗?让人们可以预订会议室,并查看每周的日程表格。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体选择一个工作流,确定谁能看到每个表格,构建界面和操作,添加智能体上下文,然后对主要规则运行冒烟测试。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Build an App

Done means one useful domain workflow with a designed route, shared UI/agent actions, correct access, agent context, and a smoke run that proves its key rule. Finish a narrow slice before expanding it.

This skill edits source files. If this session cannot write files (a deployed app's runtime agent), say the change needs a code session and stop.

The four-area parity rule from adding-a-feature (UI, action, instructions, application state) applies to everything you add. This skill supplies the order and decisions; use the edit-point reference for the scaffold you have.

1. Orient

Read AGENTS.md, this skill, and only the files you will edit. Skip broad repo surveys, README.md, and DESIGN.md. Use the bundled docs/source commands in AGENTS.md only to answer a concrete API question; do not web-research framework APIs.

2. Decide

Choose these six things before writing code:

  1. Slice: the one workflow that proves the app. For a booking app: create a booking, reject an overlap, cancel, weekly grid per room. Name what you are deferring (recurrence, notifications, roles, integrations) unless requested.
  2. Who sees each table: pick one row of the access table in references/data-and-access.md: private, team-visible, shared on invite, or a child that inherits its parent's access. Making a team resource private per user is the usual wrong turn. Everyone then sees an empty list, and no conflict check can see anyone else's rows. Give each table owner_email and/or org_id, directly or via ownableColumns(); org_id alone passes [db-tool-scoping]. Doctor checks the schema marker, not query authorization; never denylist or opt out rooms or bookings.
  3. Invariants: rules that must hold under concurrent requests (no overlap, stock never negative, unique slug). Enforce them in a write action inside a transaction or with a database constraint; the UI alone is insufficient.
  4. Actions: list-<things>, create-<thing>, a single update-<thing> patch per resource, and the domain verbs (cancel-booking). Fewer, orthogonal tools make the agent choose better.
  5. Route: give the domain its own route (for example, /rooms). Preserve existing routes and set app.homePath so sign-in lands on the domain when that is the requested home screen.
  6. Agent context: URL ids and filters (for example roomId, week) that belong in navigation.

3. Build: write everything, then verify once

In a generated app, read package.json at ["agent-native"].scaffold.template and choose the matching reference:

  • chat: references/edit-points-chat.md
  • default: references/edit-points-default.md
  • workspace root: use adding-workspace-apps to create an app, then follow the new app's own AGENTS.md and scaffold reference.
  • another domain template: use its AGENTS.md and adding-a-feature; do not apply Chat or default shell instructions to it.

If metadata is absent, inspect the actual route, layout, plugin, and navigation files before choosing an edit point. Do not infer a shell from the app name.

Write the UI, actions, instructions, and state before running the verification steps below. Do not leave placeholder or comment-only screens.

references/rooms-example.md gives a booking slice to adapt. It was verified against the Chat starter; use the selected edit-point reference for the shell. Use frontend-design for a deliberate visual direction and finish the requested screens and interactions.

Data

  • Use PostgreSQL only, and keep migrations additive: new columns are nullable or have a default, and nothing is dropped or renamed. Never edit an applied entry; append a new named one.
  • Set ownerEmail from ctx.userEmail and orgId from ctx.orgId on inserts where those columns exist. Never rely on a development identity fallback.
  • Ids are text from crypto.randomUUID().
  • Bound every list (a time range or .limit()), select only the columns it renders, and index the columns it filters and sorts on.
  • Store normalized UTC ISO timestamps; collect/display local times in the user's timezone. Validate offsets at the action boundary before parsing.

The access table, the concurrency pattern, and the security rules are in references/data-and-access.md.

Actions

  • schema is zod, with .describe() on every field stating its units and format (for example, "ISO 8601 date-time with offset").
  • Read
常见问题

它会构建我提到的每一项功能吗?

不会。它先完成一个狭窄的切片,并说明它推迟了哪些功能。

什么是冒烟测试?

它是一次快速运行,用来检查应用的关键规则是否有效,例如拒绝重叠的预订。

已部署的应用可以使用这项技能吗?

不可以。技能说明,无法写入文件的会话必须说明该修改需要在代码会话中完成。

详情

作者的原始描述

Fast end-to-end workflow for turning this starter into a working domain app from a short or vague request. Use when asked to build, make, create, or prototype an app, tool, tracker, dashboard, booking, inventory, or CRM system with Agent-Native. Read before the first edit.

repo: BuilderIO/agent-native

热度

GitHub 星标
7.6k
排名
#13142
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能