@agent-native/core 0.101.13 → 0.101.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (266) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/core/CHANGELOG.md +7 -0
  3. package/corpus/core/package.json +4 -2
  4. package/corpus/core/src/cli/create.ts +32 -10
  5. package/corpus/core/src/client/AgentPanel.tsx +61 -48
  6. package/corpus/core/src/client/chat/message-components.tsx +1 -0
  7. package/corpus/core/src/client/chat/tool-call-display.tsx +12 -2
  8. package/corpus/templates/clips/app/components/player/share-dialog.tsx +1 -1
  9. package/corpus/templates/clips/app/i18n/ar-SA.ts +1 -0
  10. package/corpus/templates/clips/app/i18n/de-DE.ts +1 -0
  11. package/corpus/templates/clips/app/i18n/en-US.ts +1 -0
  12. package/corpus/templates/clips/app/i18n/es-ES.ts +1 -0
  13. package/corpus/templates/clips/app/i18n/fr-FR.ts +1 -0
  14. package/corpus/templates/clips/app/i18n/hi-IN.ts +1 -0
  15. package/corpus/templates/clips/app/i18n/ja-JP.ts +1 -0
  16. package/corpus/templates/clips/app/i18n/ko-KR.ts +1 -0
  17. package/corpus/templates/clips/app/i18n/pt-BR.ts +1 -0
  18. package/corpus/templates/clips/app/i18n/zh-CN.ts +1 -0
  19. package/corpus/templates/clips/app/i18n/zh-TW.ts +1 -0
  20. package/corpus/templates/clips/changelog/2026-07-15-public-clip-links-are-labeled-share-with-humans-for-clarity.md +6 -0
  21. package/corpus/templates/forms/actions/delete-form.ts +4 -0
  22. package/corpus/templates/forms/actions/patch-form-fields.ts +3 -0
  23. package/corpus/templates/forms/actions/restore-form.ts +3 -0
  24. package/corpus/templates/forms/actions/update-form.ts +3 -0
  25. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +2 -2
  26. package/corpus/templates/forms/app/pages/ResponsesPage.tsx +2 -2
  27. package/corpus/templates/forms/changelog/2026-07-15-published-forms-now-reflect-field-updates-immediately-at-the.md +6 -0
  28. package/corpus/templates/forms/changelog/2026-07-15-response-rows-now-keep-every-column-aligned-to-the-top-for-c.md +6 -0
  29. package/corpus/templates/forms/server/handlers/forms.ts +1 -0
  30. package/corpus/templates/forms/server/lib/public-form-ssr.ts +47 -4
  31. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +189 -82
  32. package/corpus/templates/slides/app/pages/DeckEditor.tsx +1 -1
  33. package/dist/cli/create.d.ts +5 -2
  34. package/dist/cli/create.d.ts.map +1 -1
  35. package/dist/cli/create.js +22 -11
  36. package/dist/cli/create.js.map +1 -1
  37. package/dist/client/AgentPanel.d.ts +2 -0
  38. package/dist/client/AgentPanel.d.ts.map +1 -1
  39. package/dist/client/AgentPanel.js +24 -13
  40. package/dist/client/AgentPanel.js.map +1 -1
  41. package/dist/client/chat/message-components.d.ts.map +1 -1
  42. package/dist/client/chat/message-components.js +1 -1
  43. package/dist/client/chat/message-components.js.map +1 -1
  44. package/dist/client/chat/tool-call-display.d.ts +3 -1
  45. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  46. package/dist/client/chat/tool-call-display.js +6 -5
  47. package/dist/client/chat/tool-call-display.js.map +1 -1
  48. package/dist/notifications/routes.d.ts +2 -2
  49. package/dist/resources/handlers.d.ts +1 -1
  50. package/dist/templates/chat/.agents/skills/actions/SKILL.md +492 -0
  51. package/dist/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
  52. package/dist/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
  53. package/dist/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
  54. package/dist/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
  55. package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
  56. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
  57. package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
  58. package/dist/templates/chat/.agents/skills/security/SKILL.md +280 -0
  59. package/dist/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
  60. package/dist/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
  61. package/dist/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  62. package/dist/templates/chat/.env.example +5 -0
  63. package/dist/templates/chat/.ignore +0 -0
  64. package/dist/templates/chat/.oxfmtrc.json +8 -0
  65. package/dist/templates/chat/.react-router/types/+server-build.d.ts +18 -0
  66. package/dist/templates/chat/.react-router/types/app/+types/root.ts +68 -0
  67. package/dist/templates/chat/AGENTS.md +62 -0
  68. package/dist/templates/chat/CHANGELOG.md +10 -0
  69. package/dist/templates/chat/DEVELOPING.md +185 -0
  70. package/dist/templates/chat/README.md +32 -0
  71. package/dist/templates/chat/_gitignore +43 -0
  72. package/dist/templates/chat/actions/hello.ts +13 -0
  73. package/dist/templates/chat/actions/navigate.ts +41 -0
  74. package/dist/templates/chat/actions/run.ts +2 -0
  75. package/dist/templates/chat/actions/view-screen.ts +31 -0
  76. package/dist/templates/chat/app/components/layout/Header.tsx +59 -0
  77. package/dist/templates/chat/app/components/layout/Layout.tsx +184 -0
  78. package/dist/templates/chat/app/components/layout/Sidebar.tsx +580 -0
  79. package/dist/templates/chat/app/components/ui/button.tsx +1 -0
  80. package/dist/templates/chat/app/components/ui/card.tsx +1 -0
  81. package/dist/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
  82. package/dist/templates/chat/app/components/ui/input.tsx +1 -0
  83. package/dist/templates/chat/app/components/ui/label.tsx +1 -0
  84. package/dist/templates/chat/app/components/ui/sheet.tsx +1 -0
  85. package/dist/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
  86. package/dist/templates/chat/app/components/ui/tooltip.tsx +1 -0
  87. package/dist/templates/chat/app/entry.client.tsx +19 -0
  88. package/dist/templates/chat/app/entry.server.tsx +10 -0
  89. package/dist/templates/chat/app/global.css +93 -0
  90. package/dist/templates/chat/app/hooks/use-navigation-state.ts +111 -0
  91. package/dist/templates/chat/app/i18n/ar-SA.ts +68 -0
  92. package/dist/templates/chat/app/i18n/de-DE.ts +71 -0
  93. package/dist/templates/chat/app/i18n/en-US.ts +70 -0
  94. package/dist/templates/chat/app/i18n/es-ES.ts +71 -0
  95. package/dist/templates/chat/app/i18n/fr-FR.ts +71 -0
  96. package/dist/templates/chat/app/i18n/hi-IN.ts +69 -0
  97. package/dist/templates/chat/app/i18n/index.ts +34 -0
  98. package/dist/templates/chat/app/i18n/ja-JP.ts +70 -0
  99. package/dist/templates/chat/app/i18n/ko-KR.ts +70 -0
  100. package/dist/templates/chat/app/i18n/pt-BR.ts +71 -0
  101. package/dist/templates/chat/app/i18n/zh-CN.ts +67 -0
  102. package/dist/templates/chat/app/i18n/zh-TW.ts +67 -0
  103. package/dist/templates/chat/app/i18n-data.ts +556 -0
  104. package/dist/templates/chat/app/lib/agent-page.tsx +40 -0
  105. package/dist/templates/chat/app/lib/app-config.ts +11 -0
  106. package/dist/templates/chat/app/lib/tab-id.ts +1 -0
  107. package/dist/templates/chat/app/lib/utils.ts +1 -0
  108. package/dist/templates/chat/app/root.tsx +172 -0
  109. package/dist/templates/chat/app/routes/_index.tsx +91 -0
  110. package/dist/templates/chat/app/routes/agent.tsx +17 -0
  111. package/dist/templates/chat/app/routes/chat.$threadId.tsx +1 -0
  112. package/dist/templates/chat/app/routes/database.tsx +17 -0
  113. package/dist/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
  114. package/dist/templates/chat/app/routes/extensions.$id.tsx +11 -0
  115. package/dist/templates/chat/app/routes/extensions._index.tsx +11 -0
  116. package/dist/templates/chat/app/routes/extensions.tsx +5 -0
  117. package/dist/templates/chat/app/routes/observability.tsx +18 -0
  118. package/dist/templates/chat/app/routes/settings.tsx +88 -0
  119. package/dist/templates/chat/app/routes/team.tsx +11 -0
  120. package/dist/templates/chat/app/routes.ts +4 -0
  121. package/dist/templates/chat/app/vite-env.d.ts +6 -0
  122. package/dist/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
  123. package/dist/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
  124. package/dist/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
  125. package/dist/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  126. package/dist/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  127. package/dist/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  128. package/dist/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
  129. package/dist/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  130. package/dist/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
  131. package/dist/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
  132. package/dist/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
  133. package/dist/templates/chat/components.json +20 -0
  134. package/dist/templates/chat/data/.gitkeep +0 -0
  135. package/dist/templates/chat/data/sync-config.json +1 -0
  136. package/dist/templates/chat/learnings.defaults.md +5 -0
  137. package/dist/templates/chat/netlify.toml +10 -0
  138. package/dist/templates/chat/package.json +92 -0
  139. package/dist/templates/chat/public/agent-native-icon-dark.svg +10 -0
  140. package/dist/templates/chat/public/agent-native-icon-light.svg +10 -0
  141. package/dist/templates/chat/public/agent-native-logo-dark.svg +21 -0
  142. package/dist/templates/chat/public/agent-native-logo-light.svg +21 -0
  143. package/dist/templates/chat/public/favicon.svg +1 -0
  144. package/dist/templates/chat/public/icon-180.svg +1 -0
  145. package/dist/templates/chat/public/icon-192.svg +1 -0
  146. package/dist/templates/chat/public/icon-512.svg +1 -0
  147. package/dist/templates/chat/public/manifest.json +21 -0
  148. package/dist/templates/chat/react-router.config.ts +7 -0
  149. package/dist/templates/chat/server/middleware/auth.ts +15 -0
  150. package/dist/templates/chat/server/plugins/agent-chat.ts +21 -0
  151. package/dist/templates/chat/server/plugins/auth.ts +17 -0
  152. package/dist/templates/chat/server/routes/[...page].get.ts +5 -0
  153. package/dist/templates/chat/ssr-entry.ts +15 -0
  154. package/dist/templates/chat/tsconfig.json +21 -0
  155. package/dist/templates/chat/vite.config.ts +19 -0
  156. package/package.json +2 -1
  157. package/src/templates/chat/.agents/skills/actions/SKILL.md +492 -0
  158. package/src/templates/chat/.agents/skills/adding-a-feature/SKILL.md +189 -0
  159. package/src/templates/chat/.agents/skills/agent-native-docs/SKILL.md +76 -0
  160. package/src/templates/chat/.agents/skills/capture-learnings/SKILL.md +89 -0
  161. package/src/templates/chat/.agents/skills/create-skill/SKILL.md +221 -0
  162. package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +263 -0
  163. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +112 -0
  164. package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +232 -0
  165. package/src/templates/chat/.agents/skills/security/SKILL.md +280 -0
  166. package/src/templates/chat/.agents/skills/self-modifying-code/SKILL.md +106 -0
  167. package/src/templates/chat/.agents/skills/shadcn-ui/SKILL.md +95 -0
  168. package/src/templates/chat/.agents/skills/upgrade-agent-native/SKILL.md +87 -0
  169. package/src/templates/chat/.env.example +5 -0
  170. package/src/templates/chat/.ignore +0 -0
  171. package/src/templates/chat/.oxfmtrc.json +8 -0
  172. package/src/templates/chat/.react-router/types/+server-build.d.ts +18 -0
  173. package/src/templates/chat/.react-router/types/app/+types/root.ts +68 -0
  174. package/src/templates/chat/AGENTS.md +62 -0
  175. package/src/templates/chat/CHANGELOG.md +10 -0
  176. package/src/templates/chat/DEVELOPING.md +185 -0
  177. package/src/templates/chat/README.md +32 -0
  178. package/src/templates/chat/_gitignore +43 -0
  179. package/src/templates/chat/actions/hello.spec.ts +23 -0
  180. package/src/templates/chat/actions/hello.ts +13 -0
  181. package/src/templates/chat/actions/navigate.spec.ts +68 -0
  182. package/src/templates/chat/actions/navigate.ts +41 -0
  183. package/src/templates/chat/actions/run.ts +2 -0
  184. package/src/templates/chat/actions/view-screen.spec.ts +40 -0
  185. package/src/templates/chat/actions/view-screen.ts +31 -0
  186. package/src/templates/chat/app/components/layout/Header.tsx +59 -0
  187. package/src/templates/chat/app/components/layout/Layout.tsx +184 -0
  188. package/src/templates/chat/app/components/layout/Sidebar.tsx +580 -0
  189. package/src/templates/chat/app/components/ui/button.tsx +1 -0
  190. package/src/templates/chat/app/components/ui/card.tsx +1 -0
  191. package/src/templates/chat/app/components/ui/dropdown-menu.tsx +1 -0
  192. package/src/templates/chat/app/components/ui/input.tsx +1 -0
  193. package/src/templates/chat/app/components/ui/label.tsx +1 -0
  194. package/src/templates/chat/app/components/ui/sheet.tsx +1 -0
  195. package/src/templates/chat/app/components/ui/toolkit-provider.tsx +12 -0
  196. package/src/templates/chat/app/components/ui/tooltip.tsx +1 -0
  197. package/src/templates/chat/app/entry.client.tsx +19 -0
  198. package/src/templates/chat/app/entry.server.tsx +10 -0
  199. package/src/templates/chat/app/global.css +93 -0
  200. package/src/templates/chat/app/hooks/use-navigation-state.ts +111 -0
  201. package/src/templates/chat/app/i18n/ar-SA.ts +68 -0
  202. package/src/templates/chat/app/i18n/de-DE.ts +71 -0
  203. package/src/templates/chat/app/i18n/en-US.ts +70 -0
  204. package/src/templates/chat/app/i18n/es-ES.ts +71 -0
  205. package/src/templates/chat/app/i18n/fr-FR.ts +71 -0
  206. package/src/templates/chat/app/i18n/hi-IN.ts +69 -0
  207. package/src/templates/chat/app/i18n/index.ts +34 -0
  208. package/src/templates/chat/app/i18n/ja-JP.ts +70 -0
  209. package/src/templates/chat/app/i18n/ko-KR.ts +70 -0
  210. package/src/templates/chat/app/i18n/pt-BR.ts +71 -0
  211. package/src/templates/chat/app/i18n/zh-CN.ts +67 -0
  212. package/src/templates/chat/app/i18n/zh-TW.ts +67 -0
  213. package/src/templates/chat/app/i18n-data.ts +556 -0
  214. package/src/templates/chat/app/lib/agent-page.spec.tsx +52 -0
  215. package/src/templates/chat/app/lib/agent-page.tsx +40 -0
  216. package/src/templates/chat/app/lib/app-config.ts +11 -0
  217. package/src/templates/chat/app/lib/tab-id.ts +1 -0
  218. package/src/templates/chat/app/lib/utils.ts +1 -0
  219. package/src/templates/chat/app/root.tsx +172 -0
  220. package/src/templates/chat/app/routes/_index.tsx +91 -0
  221. package/src/templates/chat/app/routes/agent.tsx +17 -0
  222. package/src/templates/chat/app/routes/chat.$threadId.tsx +1 -0
  223. package/src/templates/chat/app/routes/database.tsx +17 -0
  224. package/src/templates/chat/app/routes/extensions.$id.$slug.tsx +2 -0
  225. package/src/templates/chat/app/routes/extensions.$id.tsx +11 -0
  226. package/src/templates/chat/app/routes/extensions._index.tsx +11 -0
  227. package/src/templates/chat/app/routes/extensions.tsx +5 -0
  228. package/src/templates/chat/app/routes/observability.tsx +18 -0
  229. package/src/templates/chat/app/routes/settings.tsx +88 -0
  230. package/src/templates/chat/app/routes/team.tsx +11 -0
  231. package/src/templates/chat/app/routes.ts +4 -0
  232. package/src/templates/chat/app/vite-env.d.ts +6 -0
  233. package/src/templates/chat/changelog/2026-06-24-a-new-settings-page-gives-quick-access-to-language-workspace.md +6 -0
  234. package/src/templates/chat/changelog/2026-06-24-added-a-language-picker-and-localized-app-chrome-for-support.md +6 -0
  235. package/src/templates/chat/changelog/2026-06-27-traditional-chinese-copy-uses-taiwan-terminology.md +6 -0
  236. package/src/templates/chat/changelog/2026-06-28-left-sidebar-collapse-motion-and-footer-chrome-are-quieter.md +6 -0
  237. package/src/templates/chat/changelog/2026-06-29-chat-layouts-adapt-when-the-agent-sidebar-is-open.md +6 -0
  238. package/src/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  239. package/src/templates/chat/changelog/2026-07-10-chat-now-makes-ai-connection-setup-clear-without-shifting-th.md +6 -0
  240. package/src/templates/chat/changelog/2026-07-13-a-full-agent-page-now-brings-context-files-connections-jobs-.md +6 -0
  241. package/src/templates/chat/changelog/2026-07-14-chat-opens-reliably-on-hosted-deployments-instead-of-failing.md +6 -0
  242. package/src/templates/chat/changelog/2026-07-14-fixed-chat-template-startup-with-older-core-versions.md +6 -0
  243. package/src/templates/chat/changelog/2026-07-15-chat-navigation-focuses-on-chat-and-agent.md +6 -0
  244. package/src/templates/chat/components.json +20 -0
  245. package/src/templates/chat/data/.gitkeep +0 -0
  246. package/src/templates/chat/data/sync-config.json +1 -0
  247. package/src/templates/chat/learnings.defaults.md +5 -0
  248. package/src/templates/chat/netlify.toml +10 -0
  249. package/src/templates/chat/package.json +92 -0
  250. package/src/templates/chat/public/agent-native-icon-dark.svg +10 -0
  251. package/src/templates/chat/public/agent-native-icon-light.svg +10 -0
  252. package/src/templates/chat/public/agent-native-logo-dark.svg +21 -0
  253. package/src/templates/chat/public/agent-native-logo-light.svg +21 -0
  254. package/src/templates/chat/public/favicon.svg +1 -0
  255. package/src/templates/chat/public/icon-180.svg +1 -0
  256. package/src/templates/chat/public/icon-192.svg +1 -0
  257. package/src/templates/chat/public/icon-512.svg +1 -0
  258. package/src/templates/chat/public/manifest.json +21 -0
  259. package/src/templates/chat/react-router.config.ts +7 -0
  260. package/src/templates/chat/server/middleware/auth.ts +15 -0
  261. package/src/templates/chat/server/plugins/agent-chat.ts +21 -0
  262. package/src/templates/chat/server/plugins/auth.ts +17 -0
  263. package/src/templates/chat/server/routes/[...page].get.ts +5 -0
  264. package/src/templates/chat/ssr-entry.ts +15 -0
  265. package/src/templates/chat/tsconfig.json +21 -0
  266. package/src/templates/chat/vite.config.ts +19 -0
@@ -0,0 +1,189 @@
1
+ ---
2
+ name: adding-a-feature
3
+ description: >-
4
+ The four-area checklist every new feature must complete. Use when adding any
5
+ feature, integration, or capability to ensure the agent and UI stay in parity.
6
+ scope: dev
7
+ metadata:
8
+ internal: true
9
+ ---
10
+
11
+ # Adding a Feature — The Four-Area Checklist
12
+
13
+ ## Rule
14
+
15
+ Every new feature MUST update all four areas. Skipping any one breaks the agent-native contract — the agent and UI must always be equal partners.
16
+
17
+ ## Why
18
+
19
+ Agent-native apps are defined by parity: everything the UI can do, the agent can do, and vice versa. A feature that only has UI is invisible to the agent. A feature that only has scripts is invisible to the user. A feature without app-state sync means the agent is blind to what the user is doing.
20
+
21
+ ## The Checklist
22
+
23
+ When you add a new feature, work through these four areas in order:
24
+
25
+ ### 1. UI Component
26
+
27
+ Build the user-facing interface — a page, component, dialog, or route. Use `useActionQuery` and `useActionMutation` from `@agent-native/core/client` to call actions for data fetching and mutations. Do not create a custom REST endpoint just so React can call action-backed data; the action endpoint already exists.
28
+
29
+ **Auto-refresh on agent writes is non-negotiable** — when the agent mutates data, the UI must reflect the change without a manual refresh. There are two paths, and you must pick the right one:
30
+
31
+ - **`useActionQuery` / `useActionMutation`** — covered automatically. The framework's `useDbSync` invalidates `["action"]` on every change event, so every `useActionQuery` hook refetches on agent activity. No extra wiring required. **Prefer this path.**
32
+ - **Raw `useQuery` with custom keys** — needs explicit wiring. Fold `useChangeVersions([<source>, "action"])` from `@agent-native/core/client` into the `queryKey` and set `placeholderData: (prev) => prev`. The `action` source is the reliable signal (the agent runner emits it after every successful tool call); the resource-specific source (`"dashboards"`, `"analyses"`, `"settings"`, etc.) is bonus when emitted. Without this wiring, agent writes will be invisible until manual refresh — that breaks the framework's #1 promise.
33
+
34
+ ```tsx
35
+ import { useChangeVersions } from "@agent-native/core/client";
36
+ import { useQuery } from "@tanstack/react-query";
37
+
38
+ const v = useChangeVersions(["dashboards", "action"]);
39
+ useQuery({
40
+ queryKey: ["dashboard", id, v],
41
+ queryFn: () => fetchDashboard(id),
42
+ placeholderData: (prev) => prev, // no flicker on refetch
43
+ });
44
+ ```
45
+
46
+ See the `real-time-sync` skill for the full pattern and source catalog.
47
+
48
+ ### 2. Action
49
+
50
+ Create an action in `actions/` using `defineAction`. This serves double duty: the agent calls it as a tool, and the UI calls it through `useActionQuery` / `useActionMutation` while the framework owns the HTTP transport. Set `http: { method: "GET" }` for read actions, leave default for writes, or set `http: false` for agent-only actions like `navigate` and `view-screen`.
51
+
52
+ Before adding a new route or endpoint, inspect the existing actions. Reuse an
53
+ action if it already covers the business operation, extend it if the shared
54
+ contract is incomplete, or create a new `defineAction` if the agent and UI both
55
+ need the capability. Do not add pass-through `/api/*` routes that re-export
56
+ actions. If client code needs a new framework/app route, expose a named helper
57
+ or hook first and use that helper from components and docs.
58
+
59
+ For provider-backed analysis/query/reporting integrations, do not turn every
60
+ provider endpoint or filter into a rigid action. Prefer the shared
61
+ `provider-api-catalog` / `provider-api-docs` / `provider-api-request` pattern
62
+ from `@agent-native/core/provider-api`, then add narrow convenience actions only
63
+ for workflows that truly deserve a first-class shortcut. Treat this as a
64
+ capability requirement, not a nice-to-have: convenience actions must not become
65
+ the ceiling of what the agent can ask the provider to do. Pair broad provider
66
+ access with staging or sandboxed code execution when responses may be too large
67
+ for chat context. If provider credentials live on resource/share rows, add the
68
+ scoped resolver first so broad access preserves the same ownership boundary as
69
+ the app UI.
70
+
71
+ If the feature needs credentials, design the credential path in the same change.
72
+ Never hardcode API keys, tokens, webhook URLs, signing secrets, private
73
+ Builder/internal data, or customer data in the action, UI, seed data, fixtures,
74
+ docs, prompts, or generated extension/app content. Register required secrets,
75
+ use OAuth helpers, or read scoped values from the vault/credential store.
76
+
77
+ If the feature involves attachments, images, recordings, screenshots, exports,
78
+ or other file-like payloads, design the upload path in the same change:
79
+ provider upload first, then URL/id/blob handle in SQL. Do not add base64/binary
80
+ columns or stuff files into `application_state`.
81
+
82
+ **If the action produces or lists a navigable resource**, add a `link` builder that returns `{ url: buildDeepLink({ app, view, params }), label }`. External coding agents and MCP hosts (Claude / ChatGPT / Claude Code / Cowork / Codex, over MCP/A2A) then surface an "Open in … →" deep link that drops the user back into the running UI focused on the record — for free. If a compatible MCP host should render an inline review/edit surface, also add `mcpApp` with `embedApp()` so the action embeds the real React app route instead of a one-off HTML UI. The `link` builder and `mcpApp` metadata must be pure and synchronous (no I/O). Any external-agent read/ingest action must be `http: { method: "GET" }` + `readOnly: true` + `publicAgent: { expose: true, readOnly: true, requiresAuth: true }`. See the `external-agents` skill.
83
+
84
+ ### 3. Skills / Instructions
85
+
86
+ Update `AGENTS.md` and/or create a skill in `.agents/skills/` if the feature introduces patterns the agent needs to know. At minimum, add the new actions to the action table in the template's `AGENTS.md`.
87
+
88
+ Reusable actions are part of the app contract, not just implementation detail. When an action is useful outside one screen, update agent instructions in the same change so app agents know when to call it, which arguments matter, and what output to preserve. If the capability is workflow-heavy, cross-app, provider-backed, or has a non-obvious sequence of actions, add or update a skill instead of burying the behavior in one long `AGENTS.md` paragraph.
89
+
90
+ Instruction examples may name secret keys like `SLACK_WEBHOOK`, but must use
91
+ placeholders such as `${keys.SLACK_WEBHOOK}` or `<SLACK_WEBHOOK>`. Do not paste
92
+ real keys, internal data, or customer data into instructions as examples.
93
+
94
+ If the feature adds or changes visible UI copy, prompts, toasts, labels, empty
95
+ states, or formatting, read `internationalization` and update the app's i18n
96
+ catalogs in the same change.
97
+
98
+ For app-backed skills, declare skill visibility in the app-skill manifest:
99
+
100
+ - `internal` — only the app's own agents should use it.
101
+ - `exported` — marketplace installs receive it, but the app does not need it loaded internally.
102
+ - `both` — shared between the app's internal agents and exported marketplace bundles.
103
+
104
+ ### 4. Application State Sync
105
+
106
+ Expose navigation and selection state so the agent knows what the user is looking at. Write to the `navigation` app-state key on route changes. Update the `view-screen` action to fetch relevant data for the new feature. Add a `navigate` command if the agent needs to open the new view.
107
+
108
+ ## Examples
109
+
110
+ ### Adding "compose email" to a mail app
111
+
112
+ | Area | What to build |
113
+ | --------------- | ---------------------------------------------------------------------------------------- |
114
+ | UI | Compose panel with tabs, to/cc/bcc fields, body editor. Use `useActionQuery`/`useActionMutation` for data. |
115
+ | Action | `manage-draft` action (create/update/delete drafts), `send-email` action |
116
+ | Skills/AGENTS | Document compose state shape, draft lifecycle, action args in AGENTS.md |
117
+ | App-state sync | `compose-{id}` keys for each draft tab, `navigation` includes compose state |
118
+
119
+ ### Adding "create form" to a forms app
120
+
121
+ | Area | What to build |
122
+ | --------------- | ---------------------------------------------------------------------------------------- |
123
+ | UI | Form builder page with drag-and-drop fields, preview, settings. Use `useActionQuery` for lists. |
124
+ | Action | `create-form` action, `update-form` action, `list-forms` action (GET) |
125
+ | Skills/AGENTS | Document form schema shape, field types, validation rules in AGENTS.md |
126
+ | App-state sync | `navigation` includes `{ view: "form-builder", formId: "..." }`, `view-screen` fetches form data |
127
+
128
+ ### Adding "chart type" to an analytics app
129
+
130
+ | Area | What to build |
131
+ | --------------- | ---------------------------------------------------------------------------------------- |
132
+ | UI | New chart component, chart type selector in dashboard |
133
+ | Action | `create-chart` or `update-dashboard` action that sets chart type and config |
134
+ | Skills/AGENTS | Document supported chart types, config options, data requirements |
135
+ | App-state sync | `navigation` includes selected chart/dashboard, `view-screen` returns chart config |
136
+
137
+ ## Adding a new route
138
+
139
+ Templates are single-page apps with client-side routing. The app shell (AgentSidebar + top-level nav) MUST persist across navigation — it is mounted once, either in `root.tsx` around `<Outlet />` or via a pathless `_app.tsx` layout route that all authed routes nest under.
140
+
141
+ **Never wrap each new route in its own `<AppLayout>` / `<Layout>`.** That causes React to unmount the entire app shell on every navigation, reloading the agent sidebar and destroying in-progress work.
142
+
143
+ - If the template has `<AppLayout>` in `root.tsx` — just render page content in your new route file, nothing else.
144
+ - If the template has `app/routes/_app.tsx` (pathless layout) — name your new route `_app.<segment>.tsx` to inherit the shell, or bare `<segment>.tsx` for public routes that should NOT have the shell.
145
+ - If a page needs per-route data (e.g. highlighting the active item in the sidebar), read it in the layout from `useParams()` / `useLocation()`. Don't pass it as a prop through every route file.
146
+
147
+ See the "Client-Side Routing" section in the root `CLAUDE.md` for full details.
148
+
149
+ ## Anti-Patterns
150
+
151
+ - **Per-route `<AppLayout>` wrappers** — Every route file wraps its content in `<AppLayout>` or `<Layout>`. React sees a different component at the outlet on each nav and unmounts the whole shell, causing the agent sidebar to reload on every click. Mount the shell once above `<Outlet />` (root.tsx or `_app.tsx` pathless layout).
152
+ - **UI without actions** — The user can create forms but the agent cannot. The agent says "I don't have access to that" when it should be able to do it.
153
+ - **Actions without AGENTS.md** — The actions exist but the agent doesn't know about them because they're not documented. The agent reinvents solutions instead of using the actions.
154
+ - **Duplicate API routes** — Creating `/api/` routes for operations that actions already handle, including pass-through routes that just call or repackage an action. Use `useActionQuery`/`useActionMutation` instead.
155
+ - **Raw client route calls** — Teaching or adding `fetch("/_agent-native/...")`,
156
+ `fetch(agentNativePath(...))`, or template `/api/*` calls in components for
157
+ normal app work. Add a named client helper/hook and call that instead.
158
+ - **Features without app-state** — The agent cannot see that the user is looking at a specific form, email, or chart. It asks "which one?" instead of acting on the current selection.
159
+ - **Actions without UI** — The agent can do something the user cannot. This is less common but still breaks parity.
160
+
161
+ ## Verification
162
+
163
+ After completing all four areas, verify:
164
+
165
+ 1. Can the user perform the operation from the UI?
166
+ 2. Can the agent perform the same operation via actions?
167
+ 3. Does `pnpm action view-screen` show the relevant state when the user is using the feature?
168
+ 4. Can the agent navigate to the feature view via the `navigate` action?
169
+ 5. Is the feature documented in AGENTS.md with action names and args?
170
+ 6. Are credentials and sensitive data supplied only through approved runtime
171
+ channels, with no hardcoded real keys, tokens, webhook URLs, Builder/internal
172
+ data, or customer data?
173
+
174
+ ## One more area — sharing
175
+
176
+ If the feature stores **user-authored resources** (documents, dashboards, forms, decks, etc.), make them ownable so they get private-by-default semantics and a share dialog for free. See the `sharing` skill.
177
+
178
+ TL;DR: spread `ownableColumns()` into the resource table, pair it with `createSharesTable(...)`, call `registerShareableResource(...)`, wrap list/read queries with `accessFilter`, guard writes with `assertAccess`, and drop `<ShareButton>` in the resource header. The `share-resource`, `unshare-resource`, `list-resource-shares`, and `set-resource-visibility` actions are auto-mounted framework-wide.
179
+
180
+ ## Related Skills
181
+
182
+ - **sharing** — How to make a new resource ownable (private by default, share with users/orgs/public)
183
+ - **context-awareness** — How to expose UI state to the agent (area 4 in detail)
184
+ - **actions** — How to create actions with `defineAction` and the `http` option (area 2 in detail)
185
+ - **external-agents** — Add a `link` builder so external agents (MCP/A2A) get an "Open in … →" deep link
186
+ - **create-skill** — How to create skills for new patterns (area 3 in detail)
187
+ - **storing-data** — Where to store the feature's data
188
+ - **real-time-sync** — How the UI stays in sync when the agent writes data
189
+ - **internationalization** — How to update localized UI copy and catalogs
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: agent-native-docs
3
+ description: >-
4
+ How to find version-matched Agent Native framework docs and source bundled in
5
+ node_modules. Use before implementing or answering questions about
6
+ @agent-native/core APIs, generated apps, workspaces, templates, or advanced
7
+ features.
8
+ scope: dev
9
+ metadata:
10
+ internal: true
11
+ ---
12
+
13
+ # Agent Native Docs Lookup
14
+
15
+ ## Rule
16
+
17
+ Before implementing or explaining non-trivial Agent Native behavior, read the
18
+ version-matched docs installed with `@agent-native/core`. When examples,
19
+ imports, or implementation details matter, inspect the packaged source corpus
20
+ too.
21
+
22
+ ## Why
23
+
24
+ Generated apps and workspaces may be on a different framework version than the
25
+ public docs or model memory. The installed package is the source that matches
26
+ the app in front of you. It also includes a source-only corpus of core and
27
+ first-party templates so agents can replicate current best-practice patterns
28
+ without needing the framework monorepo checkout.
29
+
30
+ ## How
31
+
32
+ From a generated app directory:
33
+
34
+ ```bash
35
+ pnpm action docs-search --query "<feature>"
36
+ pnpm action docs-search --slug <slug>
37
+ pnpm action docs-search --list
38
+ pnpm action source-search --query "<pattern>"
39
+ pnpm action source-search --path templates/plan/AGENTS.md
40
+ pnpm action source-search --list
41
+ ```
42
+
43
+ The headless `pnpm agent` loop and built-in app agent also expose a read-only
44
+ `docs-search` tool with the same `query`, `slug`, and `list` options, plus a
45
+ read-only `source-search` tool with `query`, `path`, and `list`.
46
+
47
+ If the action runner is unavailable, search the package directly:
48
+
49
+ ```bash
50
+ rg -n "actions|automations|a2a|sharing" node_modules/@agent-native/core/docs
51
+ rg -n "defineAction|useActionQuery" node_modules/@agent-native/core/corpus
52
+ ```
53
+
54
+ Then read `node_modules/@agent-native/core/docs/AGENTS.md` or the matching file
55
+ under `node_modules/@agent-native/core/docs/content/`. For source examples,
56
+ read files under `node_modules/@agent-native/core/corpus/core/` or
57
+ `node_modules/@agent-native/core/corpus/templates/`.
58
+
59
+ ## Useful Slugs
60
+
61
+ | Need | Slugs |
62
+ | --- | --- |
63
+ | Actions and typed client calls | `actions`, `client` |
64
+ | SQL, auth, access, sharing | `database`, `authentication`, `security`, `sharing` |
65
+ | UI state visible to the agent | `context-awareness` |
66
+ | Headless and chat-first apps | `pure-agent-apps`, `agent-surfaces`, `using-your-agent` |
67
+ | Automations and schedules | `automations`, `recurring-jobs` |
68
+ | Cross-app and external agents | `a2a-protocol`, `external-agents`, `mcp-protocol`, `mcp-apps` |
69
+ | Skills and instructions | `skills-guide`, `writing-agent-instructions` |
70
+
71
+ ## Don't
72
+
73
+ - Do not rely on memory for framework APIs when package docs are present.
74
+ - Do not add custom REST wrappers for app data before reading `actions`.
75
+ - Do not add inline LLM calls before reading `using-your-agent` and
76
+ `agent-surfaces`.
@@ -0,0 +1,89 @@
1
+ ---
2
+ name: capture-learnings
3
+ description: >-
4
+ Capture and apply accumulated knowledge via structured memory. Use when the
5
+ user gives feedback, shares preferences, corrects a mistake, or when you
6
+ discover something worth remembering for future conversations.
7
+ user-invocable: false
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Capture Learnings
13
+
14
+ This is background knowledge, not a slash command. **Organization learnings and your personal memory index are loaded at the start of every conversation, including Slack/integration turns.** Capture durable context proactively when you learn something worth remembering.
15
+
16
+ ## How to Read & Write Memories
17
+
18
+ Memories are stored as **resources** in the SQL database, not as files on disk.
19
+
20
+ - **Team/organization knowledge:** shared `LEARNINGS.md`. Read it first, merge the new fact, then write the full updated file with the `resources` tool using `scope: "shared"`. Shared scope resolves to the active organization; it must never leak to another organization in the same deployment.
21
+ - **Personal knowledge:** `memory/MEMORY.md` plus `memory/<name>.md`, written with `save-memory`.
22
+
23
+ - **Save a memory:** `save-memory --name <name> --type <type> --description "..." --content "..."`
24
+ - **Read a memory:** `resource-read --path memory/<name>.md`
25
+ - **Delete a memory:** `delete-memory --name <name>`
26
+ - **List all memories:** `resource-list --prefix memory/`
27
+
28
+ ## Memory Types
29
+
30
+ | Type | Use for |
31
+ |------|---------|
32
+ | `user` | Preferences, role, personal context, contacts |
33
+ | `feedback` | Corrections, confirmed approaches, things to avoid or repeat |
34
+ | `project` | Ongoing work context, decisions, deadlines, status |
35
+ | `reference` | Pointers to external systems, URLs, API details |
36
+
37
+ ## When to Capture
38
+
39
+ ### Team and organization knowledge (`LEARNINGS.md`, shared scope)
40
+ - Canonical destinations and workflows (for example, which Content database receives a type of Slack request)
41
+ - Required intake fields, ownership, prioritization conventions, metric definitions, and approved terminology
42
+ - Durable external references that the whole team needs, including the canonical page/database URL
43
+ - Corrections or decisions that should affect every organization member's future Slack and app conversations
44
+
45
+ Store the fact and a concise provenance link when available. Do not paste full private conversations, customer data, credentials, or secrets into learnings. Put stable always-on policy in shared `AGENTS.md`; put learned facts and evolving conventions in shared `LEARNINGS.md`.
46
+
47
+ ### User Preferences & Memory (`user`)
48
+ - **Tone and style** — "I prefer casual tone", "don't use emojis", "keep replies short"
49
+ - **Personal context** — contacts, relationships, habits ("my wife's email is...", "I'm in PST timezone")
50
+ - **Workflow preferences** — "always CC my assistant", "I like to review before sending"
51
+ - **Role and expertise** — "I'm a data scientist", "new to React"
52
+
53
+ ### Feedback & Corrections (`feedback`)
54
+ - **Corrections** — user says "no, do it this way" → capture the right way
55
+ - **Confirmed approaches** — user validates a non-obvious choice ("yes, that's perfect")
56
+ - **Repeated friction** — you hit the same issue twice; save it
57
+
58
+ ### Project Context (`project`)
59
+ - **Ongoing work** — who is doing what, why, by when
60
+ - **Decisions** — why something is done a certain way
61
+ - **Status** — current state of initiatives
62
+
63
+ ### References (`reference`)
64
+ - **External systems** — "bugs are tracked in Linear project INGEST"
65
+ - **URLs** — dashboards, documentation, tools
66
+ - **API quirks** — undocumented behavior, version-specific gotchas
67
+
68
+ ### Don't Capture
69
+ - Things obvious from reading the code
70
+ - Standard language/framework behavior
71
+ - Temporary debugging notes
72
+ - Anything already in AGENTS.md, shared LEARNINGS.md, or skills
73
+ - Ephemeral task details (use tasks/plans instead)
74
+
75
+ ## Key Rules
76
+
77
+ 1. **Save proactively — don't ask permission.** When you learn something durable, save it immediately at the correct scope.
78
+ 2. **Choose scope by audience.** Organization workflow or reference → shared `LEARNINGS.md`; one person's preference/context → personal memory.
79
+ 3. **One memory per topic** — e.g. `coding-style`, `project-alpha`, not one giant dump
80
+ 4. **Read before updating** — if a memory exists, read it first and merge, don't overwrite
81
+ 5. **Keep descriptions concise** — the index is loaded every conversation
82
+ 6. **Memories are SQL-backed** — they persist across sessions and are not in git; still minimize sensitive content
83
+
84
+ ## Graduation
85
+
86
+ When a memory is referenced repeatedly, it may belong in AGENTS.md or a skill:
87
+ - Saving a personal memory is lightweight (auto-apply, personal scope)
88
+ - Shared LEARNINGS.md is the lightweight organization knowledge layer
89
+ - Updating AGENTS.md or a skill is heavier (affects all users/agents)
@@ -0,0 +1,221 @@
1
+ ---
2
+ name: create-skill
3
+ description: >-
4
+ How to create new skills for an agent-native app. Use when adding a new
5
+ skill, documenting a pattern the agent should follow, or creating reusable
6
+ guidance for the agent.
7
+ scope: dev
8
+ metadata:
9
+ internal: true
10
+ ---
11
+
12
+ # Create a Skill
13
+
14
+ ## When to Use
15
+
16
+ Create a new skill when:
17
+
18
+ - There's a pattern the agent should follow repeatedly.
19
+ - A multi-step workflow needs reliable, step-by-step guidance.
20
+ - You want to scaffold files from a template.
21
+
22
+ Don't create a skill when:
23
+
24
+ - The guidance already exists in another skill — extend it instead.
25
+ - You're documenting something the agent already knows (e.g., how to write
26
+ TypeScript).
27
+ - It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
28
+ (personal, per-user). See **capture-learnings**.
29
+
30
+ ## Interview
31
+
32
+ Before writing the skill, answer these:
33
+
34
+ 1. **What should this skill enable?** — The core purpose in one sentence.
35
+ 2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
36
+ or application state (see the **adding-a-feature** skill). Most skills are
37
+ about how to touch one or more of these correctly.
38
+ 3. **When should it trigger?** — Describe the situations in natural language.
39
+ Be slightly pushy — over-triggering is better than under-triggering.
40
+ 4. **Does it involve context awareness?** — Does the agent need to know what the
41
+ user is looking at? If so, reference the `navigation` application-state key and
42
+ the `view-screen` action pattern. See the **context-awareness** skill.
43
+ 5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
44
+ 6. **Does it need supporting files?** — References (read-only context) or none.
45
+ Keep it minimal; push depth into `references/`.
46
+
47
+ ## Skill Types and Templates
48
+
49
+ ### Pattern (architectural rule)
50
+
51
+ For documenting how things should be done:
52
+
53
+ ```markdown
54
+ ---
55
+ name: my-pattern
56
+ description: >-
57
+ [Under 40 words. What it covers AND when it should trigger.]
58
+ ---
59
+
60
+ # [Pattern Name]
61
+
62
+ ## Rule
63
+
64
+ [One sentence: what must be true]
65
+
66
+ ## Why
67
+
68
+ [Why this rule exists]
69
+
70
+ ## How
71
+
72
+ [How to follow it, with code examples]
73
+
74
+ ## Don't
75
+
76
+ [Common violations]
77
+
78
+ ## Related Skills
79
+
80
+ [Which skills compose with this one]
81
+ ```
82
+
83
+ ### Workflow (step-by-step)
84
+
85
+ For multi-step implementation tasks:
86
+
87
+ ```markdown
88
+ ---
89
+ name: my-workflow
90
+ description: >-
91
+ [Under 40 words. What it covers AND when it should trigger.]
92
+ ---
93
+
94
+ # [Workflow Name]
95
+
96
+ ## Prerequisites
97
+
98
+ [What must be in place first]
99
+
100
+ ## Steps
101
+
102
+ [Numbered steps with code examples]
103
+
104
+ ## Verification
105
+
106
+ [How to confirm it worked]
107
+
108
+ ## Troubleshooting
109
+
110
+ [Common issues and fixes]
111
+
112
+ ## Related Skills
113
+ ```
114
+
115
+ ### Generator (scaffolding)
116
+
117
+ For creating files from templates:
118
+
119
+ ```markdown
120
+ ---
121
+ name: my-generator
122
+ description: >-
123
+ [Under 40 words. What it covers AND when it should trigger.]
124
+ ---
125
+
126
+ # [Generator Name]
127
+
128
+ ## Usage
129
+
130
+ [How to invoke — what args/inputs are needed]
131
+
132
+ ## What Gets Created
133
+
134
+ [List of files and their purpose]
135
+
136
+ ## Template
137
+
138
+ [The template content with placeholders]
139
+
140
+ ## After Generation
141
+
142
+ [What to do next — wire up sync, add routes, register the action, etc.]
143
+
144
+ ## Related Skills
145
+ ```
146
+
147
+ ## Naming Conventions
148
+
149
+ - Hyphen-case only: `[a-z0-9-]`, max 64 characters.
150
+ - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
151
+ - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
152
+ - The directory name must match the `name` in frontmatter.
153
+
154
+ ## Skill Scope (runtime vs dev)
155
+
156
+ An optional `scope` frontmatter field controls which agent loads the skill:
157
+
158
+ - `both` (default when omitted) — loaded by connected repo agents and the
159
+ in-app runtime agent. Use for any skill both audiences should follow.
160
+ - `runtime` — loaded only by the in-app runtime agent.
161
+ - `dev` — meant for the human's coding agent (e.g. Claude Code) only. **Excluded
162
+ from the runtime agent everywhere**: not in the system-prompt skills block and
163
+ not in `docs-search` results.
164
+
165
+ Use `scope: dev` for internal-only skills that should guide connected repo
166
+ agents such as Codex or Claude Code, but should not affect the deployed
167
+ production agent. Do not use `metadata.internal` for runtime visibility; that
168
+ field is catalog/package metadata and is intentionally not treated as
169
+ production exclusion.
170
+
171
+ ```markdown
172
+ ---
173
+ name: release-checklist
174
+ description: >-
175
+ Steps for cutting a release. Use when preparing or publishing a new version.
176
+ scope: dev
177
+ ---
178
+ ```
179
+
180
+ Leave `scope` off for normal skills — the default (`both`) keeps them loading at
181
+ runtime, so this is fully backward compatible. To make a dev-only skill visible
182
+ to your coding agent but hidden from the runtime agent, mark it `scope: dev` and
183
+ optionally mirror it under `.claude/skills/<name>/SKILL.md` (Claude Code reads
184
+ `.claude/skills/` independently of the runtime's `.agents/skills/`).
185
+
186
+ ## Tips
187
+
188
+ - **Keep descriptions under 40 words** — they load into context on every
189
+ conversation. State what the skill does AND when to trigger it.
190
+ - **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
191
+ `references/` files (progressive disclosure).
192
+ - **Use standard markdown headings** — no XML tags or custom formats.
193
+
194
+ ## Anti-Patterns
195
+
196
+ - **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
197
+ through the agent chat (see **delegate-to-agent**).
198
+ - **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
199
+ - **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
200
+ `useActionQuery` so the UI updates (see **real-time-sync**).
201
+ - **Vague descriptions** — "Helps with development" won't trigger. Be specific
202
+ about _when_.
203
+ - **Pure documentation** — skills should guide action, not just explain concepts.
204
+
205
+ ## File Structure
206
+
207
+ ```
208
+ .agents/skills/my-skill/
209
+ ├── SKILL.md # Main skill (required)
210
+ └── references/ # Optional supporting context
211
+ └── detailed-guide.md
212
+ ```
213
+
214
+ ## Related Skills
215
+
216
+ - **adding-a-feature** — The four-area model every skill ultimately serves.
217
+ - **writing-agent-instructions** — How to write AGENTS.md and skills well for
218
+ apps and templates you ship to others.
219
+ - **capture-learnings** — When a learning graduates to reusable guidance, create
220
+ a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
221
+ - **self-modifying-code** — The agent can create new skills (Tier 2 modification).