@agent-native/core 0.28.5 → 0.29.0

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.
@@ -12,25 +12,34 @@ description: >-
12
12
 
13
13
  Create a new skill when:
14
14
 
15
- - There's a pattern the agent should follow repeatedly
16
- - A workflow needs step-by-step guidance
17
- - You want to scaffold files from a template
15
+ - There's a pattern the agent should follow repeatedly.
16
+ - A multi-step workflow needs reliable, step-by-step guidance.
17
+ - You want to scaffold files from a template.
18
18
 
19
19
  Don't create a skill when:
20
20
 
21
- - The guidance already exists in another skill (extend it instead)
22
- - You're documenting something the agent already knows (e.g., how to write TypeScript)
23
- - The guidance is a one-off — put it in `AGENTS.md` or `learnings.md` instead
21
+ - The guidance already exists in another skill extend it instead.
22
+ - You're documenting something the agent already knows (e.g., how to write
23
+ TypeScript).
24
+ - It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
25
+ (personal, per-user). See **capture-learnings**.
24
26
 
25
- ## 5-Question Interview
27
+ ## Interview
26
28
 
27
29
  Before writing the skill, answer these:
28
30
 
29
31
  1. **What should this skill enable?** — The core purpose in one sentence.
30
- 2. **Which agent-native rule does it serve?** — Rule 1 (files), Rule 2 (delegate), Rule 3 (scripts), Rule 4 (SSE), Rule 5 (self-modify), or "utility."
31
- 3. **When should it trigger?** — Describe the situations in natural language. Be slightly pushy — over-triggering is better than under-triggering.
32
- 4. **What type of skill?** — Pattern, Workflow, or Generator (see templates below).
33
- 5. **Does it need supporting files?** — References (read-only context) or none. Keep it minimal.
32
+ 2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
33
+ or application state (see the **adding-a-feature** skill). Most skills are
34
+ about how to touch one or more of these correctly.
35
+ 3. **When should it trigger?** — Describe the situations in natural language.
36
+ Be slightly pushy — over-triggering is better than under-triggering.
37
+ 4. **Does it involve context awareness?** — Does the agent need to know what the
38
+ user is looking at? If so, reference the `navigation` application-state key and
39
+ the `view-screen` action pattern. See the **context-awareness** skill.
40
+ 5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
41
+ 6. **Does it need supporting files?** — References (read-only context) or none.
42
+ Keep it minimal; push depth into `references/`.
34
43
 
35
44
  ## Skill Types and Templates
36
45
 
@@ -42,7 +51,7 @@ For documenting how things should be done:
42
51
  ---
43
52
  name: my-pattern
44
53
  description: >-
45
- [Under 40 words. When should this trigger?]
54
+ [Under 40 words. What it covers AND when it should trigger.]
46
55
  ---
47
56
 
48
57
  # [Pattern Name]
@@ -76,7 +85,7 @@ For multi-step implementation tasks:
76
85
  ---
77
86
  name: my-workflow
78
87
  description: >-
79
- [Under 40 words. When should this trigger?]
88
+ [Under 40 words. What it covers AND when it should trigger.]
80
89
  ---
81
90
 
82
91
  # [Workflow Name]
@@ -108,7 +117,7 @@ For creating files from templates:
108
117
  ---
109
118
  name: my-generator
110
119
  description: >-
111
- [Under 40 words. When should this trigger?]
120
+ [Under 40 words. What it covers AND when it should trigger.]
112
121
  ---
113
122
 
114
123
  # [Generator Name]
@@ -127,30 +136,36 @@ description: >-
127
136
 
128
137
  ## After Generation
129
138
 
130
- [What to do next — wire up SSE, add routes, etc.]
139
+ [What to do next — wire up sync, add routes, register the action, etc.]
131
140
 
132
141
  ## Related Skills
133
142
  ```
134
143
 
135
144
  ## Naming Conventions
136
145
 
137
- - Hyphen-case only: `[a-z0-9-]`, max 64 characters
138
- - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`)
139
- - Workflow/generator skills: verb-noun (`create-script`, `capture-learnings`)
146
+ - Hyphen-case only: `[a-z0-9-]`, max 64 characters.
147
+ - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
148
+ - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
149
+ - The directory name must match the `name` in frontmatter.
140
150
 
141
151
  ## Tips
142
152
 
143
- - **Keep descriptions under 40 words** — They're loaded into context on every conversation.
144
- - **Keep SKILL.md under 500 lines** Move detailed content to `references/` files.
145
- - **Use standard markdown headings** — No XML tags or custom formats.
153
+ - **Keep descriptions under 40 words** — they load into context on every
154
+ conversation. State what the skill does AND when to trigger it.
155
+ - **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
156
+ `references/` files (progressive disclosure).
157
+ - **Use standard markdown headings** — no XML tags or custom formats.
146
158
 
147
159
  ## Anti-Patterns
148
160
 
149
- - **Inline LLM calls** — Skills must not call LLMs directly (violates Rule 2)
150
- - **Database patterns** Skills must not introduce databases (violates Rule 1)
151
- - **Ignoring db sync** — If a skill creates data, mention wiring up `useDbSync`
152
- - **Vague descriptions** — "Helps with development" won't trigger. Be specific about _when_.
153
- - **Pure documentation** Skills should guide action, not just explain concepts
161
+ - **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
162
+ through the agent chat (see **delegate-to-agent**).
163
+ - **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
164
+ - **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
165
+ `useActionQuery` so the UI updates (see **real-time-sync**).
166
+ - **Vague descriptions** — "Helps with development" won't trigger. Be specific
167
+ about _when_.
168
+ - **Pure documentation** — skills should guide action, not just explain concepts.
154
169
 
155
170
  ## File Structure
156
171
 
@@ -163,5 +178,9 @@ description: >-
163
178
 
164
179
  ## Related Skills
165
180
 
166
- - **capture-learnings** — When a learning graduates to reusable guidance, create a skill
167
- - **self-modifying-code** — The agent can create new skills (Tier 2 modification)
181
+ - **adding-a-feature** — The four-area model every skill ultimately serves.
182
+ - **writing-agent-instructions** — How to write AGENTS.md and skills well for
183
+ apps and templates you ship to others.
184
+ - **capture-learnings** — When a learning graduates to reusable guidance, create
185
+ a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
186
+ - **self-modifying-code** — The agent can create new skills (Tier 2 modification).
@@ -12,26 +12,34 @@ description: >-
12
12
 
13
13
  Create a new skill when:
14
14
 
15
- - There's a pattern the agent should follow repeatedly
16
- - A workflow needs step-by-step guidance
17
- - You want to scaffold files from a template
15
+ - There's a pattern the agent should follow repeatedly.
16
+ - A multi-step workflow needs reliable, step-by-step guidance.
17
+ - You want to scaffold files from a template.
18
18
 
19
19
  Don't create a skill when:
20
20
 
21
- - The guidance already exists in another skill (extend it instead)
22
- - You're documenting something the agent already knows (e.g., how to write TypeScript)
23
- - The guidance is a one-off — put it in `AGENTS.md` or `learnings.md` instead
21
+ - The guidance already exists in another skill extend it instead.
22
+ - You're documenting something the agent already knows (e.g., how to write
23
+ TypeScript).
24
+ - It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
25
+ (personal, per-user). See **capture-learnings**.
24
26
 
25
- ## 5-Question Interview
27
+ ## Interview
26
28
 
27
29
  Before writing the skill, answer these:
28
30
 
29
31
  1. **What should this skill enable?** — The core purpose in one sentence.
30
- 2. **Which agent-native rule does it serve?** — Rule 1 (data in SQL), Rule 2 (delegate to agent), Rule 3 (scripts), Rule 4 (polling sync), Rule 5 (self-modify), Rule 6 (app-state in SQL), or "utility."
31
- 3. **When should it trigger?** — Describe the situations in natural language. Be slightly pushy — over-triggering is better than under-triggering.
32
- 4. **Does it involve context awareness?** — Does the agent need to know what the user is looking at to use this skill? If yes, the skill should reference the `navigation` app-state key and the `view-screen` script pattern. See the **context-awareness** skill.
33
- 5. **What type of skill?** — Pattern, Workflow, or Generator (see templates below).
34
- 6. **Does it need supporting files?** References (read-only context) or none. Keep it minimal.
32
+ 2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
33
+ or application state (see the **adding-a-feature** skill). Most skills are
34
+ about how to touch one or more of these correctly.
35
+ 3. **When should it trigger?** — Describe the situations in natural language.
36
+ Be slightly pushyover-triggering is better than under-triggering.
37
+ 4. **Does it involve context awareness?** — Does the agent need to know what the
38
+ user is looking at? If so, reference the `navigation` application-state key and
39
+ the `view-screen` action pattern. See the **context-awareness** skill.
40
+ 5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
41
+ 6. **Does it need supporting files?** — References (read-only context) or none.
42
+ Keep it minimal; push depth into `references/`.
35
43
 
36
44
  ## Skill Types and Templates
37
45
 
@@ -43,7 +51,7 @@ For documenting how things should be done:
43
51
  ---
44
52
  name: my-pattern
45
53
  description: >-
46
- [Under 40 words. When should this trigger?]
54
+ [Under 40 words. What it covers AND when it should trigger.]
47
55
  ---
48
56
 
49
57
  # [Pattern Name]
@@ -77,7 +85,7 @@ For multi-step implementation tasks:
77
85
  ---
78
86
  name: my-workflow
79
87
  description: >-
80
- [Under 40 words. When should this trigger?]
88
+ [Under 40 words. What it covers AND when it should trigger.]
81
89
  ---
82
90
 
83
91
  # [Workflow Name]
@@ -109,7 +117,7 @@ For creating files from templates:
109
117
  ---
110
118
  name: my-generator
111
119
  description: >-
112
- [Under 40 words. When should this trigger?]
120
+ [Under 40 words. What it covers AND when it should trigger.]
113
121
  ---
114
122
 
115
123
  # [Generator Name]
@@ -128,30 +136,36 @@ description: >-
128
136
 
129
137
  ## After Generation
130
138
 
131
- [What to do next — wire up SSE, add routes, etc.]
139
+ [What to do next — wire up sync, add routes, register the action, etc.]
132
140
 
133
141
  ## Related Skills
134
142
  ```
135
143
 
136
144
  ## Naming Conventions
137
145
 
138
- - Hyphen-case only: `[a-z0-9-]`, max 64 characters
139
- - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`)
140
- - Workflow/generator skills: verb-noun (`create-script`, `capture-learnings`)
146
+ - Hyphen-case only: `[a-z0-9-]`, max 64 characters.
147
+ - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
148
+ - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
149
+ - The directory name must match the `name` in frontmatter.
141
150
 
142
151
  ## Tips
143
152
 
144
- - **Keep descriptions under 40 words** — They're loaded into context on every conversation.
145
- - **Keep SKILL.md under 500 lines** Move detailed content to `references/` files.
146
- - **Use standard markdown headings** — No XML tags or custom formats.
153
+ - **Keep descriptions under 40 words** — they load into context on every
154
+ conversation. State what the skill does AND when to trigger it.
155
+ - **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
156
+ `references/` files (progressive disclosure).
157
+ - **Use standard markdown headings** — no XML tags or custom formats.
147
158
 
148
159
  ## Anti-Patterns
149
160
 
150
- - **Inline LLM calls** — Skills must not call LLMs directly (violates Rule 2)
151
- - **Database patterns** Skills must not introduce databases (violates Rule 1)
152
- - **Ignoring db sync** — If a skill creates data, mention wiring up `useDbSync`
153
- - **Vague descriptions** — "Helps with development" won't trigger. Be specific about _when_.
154
- - **Pure documentation** Skills should guide action, not just explain concepts
161
+ - **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
162
+ through the agent chat (see **delegate-to-agent**).
163
+ - **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
164
+ - **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
165
+ `useActionQuery` so the UI updates (see **real-time-sync**).
166
+ - **Vague descriptions** — "Helps with development" won't trigger. Be specific
167
+ about _when_.
168
+ - **Pure documentation** — skills should guide action, not just explain concepts.
155
169
 
156
170
  ## File Structure
157
171
 
@@ -164,5 +178,9 @@ description: >-
164
178
 
165
179
  ## Related Skills
166
180
 
167
- - **capture-learnings** — When a learning graduates to reusable guidance, create a skill
168
- - **self-modifying-code** — The agent can create new skills (Tier 2 modification)
181
+ - **adding-a-feature** — The four-area model every skill ultimately serves.
182
+ - **writing-agent-instructions** — How to write AGENTS.md and skills well for
183
+ apps and templates you ship to others.
184
+ - **capture-learnings** — When a learning graduates to reusable guidance, create
185
+ a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
186
+ - **self-modifying-code** — The agent can create new skills (Tier 2 modification).
@@ -282,7 +282,7 @@ Projects are the top-level resource. They contain tasks and notes.
282
282
  - For shared projects, check access through framework sharing helpers.
283
283
  ```
284
284
 
285
- Update `AGENTS.md` whenever you add a new action, route, state key, or recurring workflow.
285
+ Update `AGENTS.md` whenever you add a new action, route, state key, or recurring workflow. See [Writing Agent Instructions](/docs/writing-agent-instructions) for how to keep `AGENTS.md` skimmable and word skill and tool descriptions so the agent triggers them reliably.
286
286
 
287
287
  ## Add Skills {#skills}
288
288
 
@@ -180,6 +180,8 @@ The frontmatter `name` and `description` are used by the agent's tool system for
180
180
 
181
181
  Save the file at `.agents/skills/my-skill/SKILL.md`. The directory name should match the `name` in frontmatter.
182
182
 
183
+ > **See also:** [Writing Agent Instructions](/docs/writing-agent-instructions) for how to word skill descriptions, apply progressive disclosure, and keep `AGENTS.md` lean.
184
+
183
185
  ## Skills vs AGENTS.md {#skills-vs-agents-md}
184
186
 
185
187
  > **AGENTS.md** — The overview. Lists all scripts, describes the data model, explains the app architecture. The agent reads this first to understand the app.
@@ -0,0 +1,130 @@
1
+ ---
2
+ title: "Writing Agent Instructions & Skills"
3
+ description: "How to write great agent instructions for an agent-native app or template: AGENTS.md, skills, and tool descriptions."
4
+ ---
5
+
6
+ # Writing Agent Instructions & Skills
7
+
8
+ The agent's behavior in an agent-native app is only as good as the instructions you give it. Three surfaces carry that guidance: `AGENTS.md` (the map), skills (the deep dives), and action/tool descriptions (how the agent picks the right tool). Write each one for fast retrieval, not for prose.
9
+
10
+ ## Keep AGENTS.md small and skimmable {#small-agents-md}
11
+
12
+ `AGENTS.md` is loaded as orientation. It should be the smallest thing that lets the agent act correctly, with everything deep pushed into skills. Aim for these sections and little else:
13
+
14
+ - **Purpose line** — one sentence on what the app is and the primary workflow.
15
+ - **Core rules** — the handful of invariants that must always hold (data in SQL, operations go through actions, AI goes through the agent chat, schema changes are additive). Short, imperative bullets.
16
+ - **Application-state keys** — the `navigation`/selection/focus keys the agent reads to know what the user is looking at, with their shape.
17
+ - **Action table** — a compact table of action name to purpose.
18
+ - **Skills index** — a list of the skills that exist and when to read each one.
19
+
20
+ If a section grows past a screen, it belongs in a skill. `AGENTS.md` answers "what is this app and what can I do," not "how exactly do I do the hard thing."
21
+
22
+ ```markdown
23
+ # Projects App
24
+
25
+ One workspace for projects, tasks, and notes. Agent and UI share the same SQL
26
+ data and the same actions.
27
+
28
+ ## Core Rules
29
+
30
+ - Data lives in SQL via Drizzle. Use actions for all writes.
31
+ - All AI work goes through the agent chat; never call an LLM inline.
32
+ - Schema changes are additive only.
33
+
34
+ ## Application State
35
+
36
+ - `navigation.view`: `home` | `project`
37
+ - `navigation.projectId`: selected project on a project page
38
+
39
+ ## Actions
40
+
41
+ | Action | Purpose |
42
+ | ---------------- | --------------------------- |
43
+ | `list-projects` | List accessible projects |
44
+ | `create-project` | Create a project |
45
+ | `update-project` | Rename or archive a project |
46
+
47
+ ## Skills
48
+
49
+ - `project-imports` — read before importing legacy CSV exports.
50
+ - `sharing` — read before exposing a project to other users.
51
+ ```
52
+
53
+ ## Single-source AGENTS.md {#single-source}
54
+
55
+ Keep one canonical instructions file: `AGENTS.md`. If a client expects `CLAUDE.md`, make it a symlink to `AGENTS.md` rather than a second copy. Two hand-maintained files drift, and the agent ends up with contradictory rules. One source of truth, linked where needed.
56
+
57
+ ## SKILL.md frontmatter must say what AND when {#skill-frontmatter}
58
+
59
+ The `description` is the only thing the agent sees when deciding whether to read a skill. It must answer two questions: what the skill covers, and when to trigger it. A description that only describes the topic will not fire.
60
+
61
+ ```markdown
62
+ ---
63
+ name: project-imports
64
+ description: >-
65
+ How to import projects from the legacy CSV export. Use when the user uploads
66
+ a project CSV or asks to migrate projects from the old system.
67
+ ---
68
+ ```
69
+
70
+ - Lead with the capability, then add an explicit **"Use when…"** clause.
71
+ - Be slightly pushy — over-triggering beats a skill that never loads.
72
+ - Keep it under ~40 words; it is loaded into context on every conversation.
73
+
74
+ ## Progressive disclosure {#progressive-disclosure}
75
+
76
+ Write the `SKILL.md` as the lean, must-know layer: the rule, how to do it, the do/don't list, and pointers. Push long examples, exhaustive field references, API quirks, and edge-case tables into `references/` files the agent reads only when it needs them.
77
+
78
+ ```text
79
+ .agents/skills/project-imports/
80
+ ├── SKILL.md # rule + happy path + do/don't
81
+ └── references/
82
+ └── csv-format.md # full column spec, encodings, edge cases
83
+ ```
84
+
85
+ This keeps the always-loaded surface small and lets depth scale without bloating context. See the [Skills Guide](/docs/skills-guide) for the full skill format.
86
+
87
+ ## Write action-oriented tables {#action-tables}
88
+
89
+ The agent scans tables faster than prose. Prefer a table of name to purpose over paragraphs describing each operation. The same applies to state keys, field types, and any enumerable set. Tables are skimmable, diffable, and easy to keep in sync when you add an action.
90
+
91
+ ## Write clear tool descriptions {#tool-descriptions}
92
+
93
+ Action descriptions are tool descriptions — they drive tool selection. Make each one a precise, single-purpose sentence:
94
+
95
+ - Say what it does and what it returns, not how it's implemented.
96
+ - Describe each parameter in its `.describe()` so the agent fills it correctly.
97
+ - One responsibility per action. If a description needs "and also…", split it.
98
+ - Mark read-only actions (`readOnly: true` or `http: { method: "GET" }`) so the agent knows they're safe to call freely.
99
+
100
+ ```ts
101
+ defineAction({
102
+ description: "Create a project. Returns the new project id and title.",
103
+ schema: z.object({
104
+ title: z.string().min(1).describe("Project title shown in the sidebar"),
105
+ }),
106
+ // ...
107
+ });
108
+ ```
109
+
110
+ ## Bake in anti-fabrication and verify-before-done {#anti-fabrication}
111
+
112
+ App instructions should make honesty and verification the default behavior:
113
+
114
+ - **Never fabricate.** If data isn't found or an action fails, say so and recover — don't invent results or claim success. Read the real value via an action or query before reporting it.
115
+ - **Verify before declaring done.** After a change, confirm it with a read-back (re-query the row, re-read the screen via `view-screen`) instead of assuming the write worked.
116
+ - **Recover, don't give up.** On a recoverable error (a failed query, a transient fetch), retry or fix the input rather than abandoning the task. Keep this separate from the anti-fabrication rule — don't conflate "don't make things up" with "stop at the first error."
117
+
118
+ Put these as core rules in `AGENTS.md` so they apply to every turn.
119
+
120
+ ## What goes where {#what-goes-where}
121
+
122
+ - **AGENTS.md** — applies to the whole app, every turn: purpose, core rules, state keys, action index, skills index.
123
+ - **Skills** — reusable how-to for a specific pattern, loaded on demand. Applies to everyone working in the app.
124
+ - **Memory (`memory/MEMORY.md`)** — per-user preferences and corrections, not authored guidance.
125
+
126
+ ## What's next {#whats-next}
127
+
128
+ - [Skills Guide](/docs/skills-guide) — the skill file format, framework skills, and app-backed skills.
129
+ - [Creating Templates](/docs/creating-templates) — how `AGENTS.md` and skills fit into a shippable template.
130
+ - [Adding a Feature](/docs/adding-a-feature) — the four-area model every feature must satisfy.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-native/core",
3
- "version": "0.28.5",
3
+ "version": "0.29.0",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=22"
@@ -12,25 +12,34 @@ description: >-
12
12
 
13
13
  Create a new skill when:
14
14
 
15
- - There's a pattern the agent should follow repeatedly
16
- - A workflow needs step-by-step guidance
17
- - You want to scaffold files from a template
15
+ - There's a pattern the agent should follow repeatedly.
16
+ - A multi-step workflow needs reliable, step-by-step guidance.
17
+ - You want to scaffold files from a template.
18
18
 
19
19
  Don't create a skill when:
20
20
 
21
- - The guidance already exists in another skill (extend it instead)
22
- - You're documenting something the agent already knows (e.g., how to write TypeScript)
23
- - The guidance is a one-off — put it in `AGENTS.md` or `learnings.md` instead
21
+ - The guidance already exists in another skill extend it instead.
22
+ - You're documenting something the agent already knows (e.g., how to write
23
+ TypeScript).
24
+ - It's a one-off — put it in `AGENTS.md` (for everyone) or `memory/MEMORY.md`
25
+ (personal, per-user). See **capture-learnings**.
24
26
 
25
- ## 5-Question Interview
27
+ ## Interview
26
28
 
27
29
  Before writing the skill, answer these:
28
30
 
29
31
  1. **What should this skill enable?** — The core purpose in one sentence.
30
- 2. **Which agent-native rule does it serve?** — Rule 1 (files), Rule 2 (delegate), Rule 3 (scripts), Rule 4 (SSE), Rule 5 (self-modify), or "utility."
31
- 3. **When should it trigger?** — Describe the situations in natural language. Be slightly pushy — over-triggering is better than under-triggering.
32
- 4. **What type of skill?** — Pattern, Workflow, or Generator (see templates below).
33
- 5. **Does it need supporting files?** — References (read-only context) or none. Keep it minimal.
32
+ 2. **Which of the four areas does it serve?** — UI, actions, skills/instructions,
33
+ or application state (see the **adding-a-feature** skill). Most skills are
34
+ about how to touch one or more of these correctly.
35
+ 3. **When should it trigger?** — Describe the situations in natural language.
36
+ Be slightly pushy — over-triggering is better than under-triggering.
37
+ 4. **Does it involve context awareness?** — Does the agent need to know what the
38
+ user is looking at? If so, reference the `navigation` application-state key and
39
+ the `view-screen` action pattern. See the **context-awareness** skill.
40
+ 5. **What type of skill?** — Pattern, Workflow, or Generator (see below).
41
+ 6. **Does it need supporting files?** — References (read-only context) or none.
42
+ Keep it minimal; push depth into `references/`.
34
43
 
35
44
  ## Skill Types and Templates
36
45
 
@@ -42,7 +51,7 @@ For documenting how things should be done:
42
51
  ---
43
52
  name: my-pattern
44
53
  description: >-
45
- [Under 40 words. When should this trigger?]
54
+ [Under 40 words. What it covers AND when it should trigger.]
46
55
  ---
47
56
 
48
57
  # [Pattern Name]
@@ -76,7 +85,7 @@ For multi-step implementation tasks:
76
85
  ---
77
86
  name: my-workflow
78
87
  description: >-
79
- [Under 40 words. When should this trigger?]
88
+ [Under 40 words. What it covers AND when it should trigger.]
80
89
  ---
81
90
 
82
91
  # [Workflow Name]
@@ -108,7 +117,7 @@ For creating files from templates:
108
117
  ---
109
118
  name: my-generator
110
119
  description: >-
111
- [Under 40 words. When should this trigger?]
120
+ [Under 40 words. What it covers AND when it should trigger.]
112
121
  ---
113
122
 
114
123
  # [Generator Name]
@@ -127,30 +136,36 @@ description: >-
127
136
 
128
137
  ## After Generation
129
138
 
130
- [What to do next — wire up SSE, add routes, etc.]
139
+ [What to do next — wire up sync, add routes, register the action, etc.]
131
140
 
132
141
  ## Related Skills
133
142
  ```
134
143
 
135
144
  ## Naming Conventions
136
145
 
137
- - Hyphen-case only: `[a-z0-9-]`, max 64 characters
138
- - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`)
139
- - Workflow/generator skills: verb-noun (`create-script`, `capture-learnings`)
146
+ - Hyphen-case only: `[a-z0-9-]`, max 64 characters.
147
+ - Pattern skills: descriptive names (`storing-data`, `delegate-to-agent`).
148
+ - Workflow/generator skills: verb-noun (`create-skill`, `capture-learnings`).
149
+ - The directory name must match the `name` in frontmatter.
140
150
 
141
151
  ## Tips
142
152
 
143
- - **Keep descriptions under 40 words** — They're loaded into context on every conversation.
144
- - **Keep SKILL.md under 500 lines** Move detailed content to `references/` files.
145
- - **Use standard markdown headings** — No XML tags or custom formats.
153
+ - **Keep descriptions under 40 words** — they load into context on every
154
+ conversation. State what the skill does AND when to trigger it.
155
+ - **Keep SKILL.md lean (under ~500 lines)** — move detailed content to
156
+ `references/` files (progressive disclosure).
157
+ - **Use standard markdown headings** — no XML tags or custom formats.
146
158
 
147
159
  ## Anti-Patterns
148
160
 
149
- - **Inline LLM calls** — Skills must not call LLMs directly (violates Rule 2)
150
- - **Database patterns** Skills must not introduce databases (violates Rule 1)
151
- - **Ignoring db sync** — If a skill creates data, mention wiring up `useDbSync`
152
- - **Vague descriptions** — "Helps with development" won't trigger. Be specific about _when_.
153
- - **Pure documentation** Skills should guide action, not just explain concepts
161
+ - **Inline LLM calls** — skills must not call LLMs directly. All AI work goes
162
+ through the agent chat (see **delegate-to-agent**).
163
+ - **Introducing databases** — data lives in SQL via Drizzle (see **storing-data**).
164
+ - **Ignoring sync** — if a skill creates data, mention wiring `useDbSync` /
165
+ `useActionQuery` so the UI updates (see **real-time-sync**).
166
+ - **Vague descriptions** — "Helps with development" won't trigger. Be specific
167
+ about _when_.
168
+ - **Pure documentation** — skills should guide action, not just explain concepts.
154
169
 
155
170
  ## File Structure
156
171
 
@@ -163,5 +178,9 @@ description: >-
163
178
 
164
179
  ## Related Skills
165
180
 
166
- - **capture-learnings** — When a learning graduates to reusable guidance, create a skill
167
- - **self-modifying-code** — The agent can create new skills (Tier 2 modification)
181
+ - **adding-a-feature** — The four-area model every skill ultimately serves.
182
+ - **writing-agent-instructions** — How to write AGENTS.md and skills well for
183
+ apps and templates you ship to others.
184
+ - **capture-learnings** — When a learning graduates to reusable guidance, create
185
+ a skill; one-offs go to `AGENTS.md` or `memory/MEMORY.md`.
186
+ - **self-modifying-code** — The agent can create new skills (Tier 2 modification).