You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/skills/create-adapter/SKILL.md
+85-8Lines changed: 85 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,21 @@
1
1
---
2
2
name: create-evlog-adapter
3
-
description: Create a new built-in evlog adapter to send wide events to an external observability platform. Use when adding a new drain adapter (e.g., for Datadog, Sentry, Loki, Elasticsearch, etc.) to the evlog package. Covers source code, build config, package exports, tests, and documentation.
3
+
description: Create a new built-in evlog adapter to send wide events to an external observability platform. Use when adding a new drain adapter (e.g., for Datadog, Sentry, Loki, Elasticsearch, etc.) to the evlog package. Covers source code, build config, package exports, tests, and all documentation.
4
4
---
5
5
6
6
# Create evlog Adapter
7
7
8
-
Add a new built-in adapter to evlog. Every adapter follows the same architecture. This skill walks through all 5 touchpoints.
8
+
Add a new built-in adapter to evlog. Every adapter follows the same architecture. This skill walks through all 8 touchpoints. **Every single touchpoint is mandatory** -- do not skip any.
9
+
10
+
## PR Title
11
+
12
+
Recommended format for the pull request title:
13
+
14
+
```
15
+
feat: add {name} adapter
16
+
```
17
+
18
+
The exact wording may vary depending on the adapter (e.g., `feat: add OTLP adapter`, `feat: add Axiom drain adapter`), but it should always follow the `feat:` conventional commit prefix.
9
19
10
20
## Touchpoints Checklist
11
21
@@ -15,9 +25,12 @@ Add a new built-in adapter to evlog. Every adapter follows the same architecture
7.**Querying/Using** -- how to find evlog events in the target service
149
+
8.**Troubleshooting** -- common errors (missing config, auth failures)
150
+
9.**Direct API Usage** -- `sendTo{Name}()` and `sendBatchTo{Name}()` examples
151
+
10.**Next Steps** -- links to other adapters and best practices
152
+
153
+
Use the existing Axiom adapter page (`apps/docs/content/3.adapters/2.axiom.md`) as a reference for tone, structure, and depth.
154
+
155
+
## Step 6: Update Adapters Overview Page
156
+
157
+
Edit `apps/docs/content/3.adapters/1.overview.md` to add the new adapter in **three** places:
158
+
159
+
### 6a. Frontmatter `links` array
160
+
161
+
Add a link entry alongside the existing adapters:
162
+
163
+
```yaml
164
+
- label: "{Name}"
165
+
icon: i-simple-icons-{name}
166
+
to: /adapters/{name}
167
+
color: neutral
168
+
variant: subtle
169
+
```
170
+
171
+
### 6b. `::card-group` section
172
+
173
+
Add a card block for the new adapter (before the Custom card):
136
174
137
-
Renumber `custom.md` if needed so it stays last.
175
+
```markdown
176
+
:::card
177
+
---
178
+
icon: i-simple-icons-{name}
179
+
title: {Name}
180
+
to: /adapters/{name}
181
+
---
182
+
[Short description of what the adapter does.]
183
+
:::
184
+
```
185
+
186
+
### 6c. Zero-Config Setup `.env` example
187
+
188
+
Add the adapter's env vars in the `.env` code block. The variable names depend on the service (e.g., `NUXT_AXIOM_TOKEN`, `NUXT_OTLP_ENDPOINT`, `NUXT_POSTHOG_API_KEY`):
138
189
139
-
## Final Step: Update AGENTS.md
190
+
```bash
191
+
# {Name}
192
+
NUXT_{NAME}_<RELEVANT_VAR>=xxx
193
+
```
140
194
141
-
Add the new adapter to the adapters table in the root `AGENTS.md` file, in the "Log Draining & Adapters" section:
195
+
## Step 7: Update AGENTS.md
196
+
197
+
Add the new adapter to the **"Built-in Adapters"** table in the root `AGENTS.md` file, in the "Log Draining & Adapters" section:
142
198
143
199
```markdown
144
200
| {Name} | `evlog/{name}` | Send logs to {Name} for [description] |
145
201
```
146
202
203
+
Also add a usage example block (following the pattern of existing adapters in AGENTS.md):
Set the required environment variables (e.g., \`NUXT_{NAME}_TOKEN\`, \`NUXT_{NAME}_ENDPOINT\`, etc. -- depends on the service).
218
+
```
219
+
220
+
## Step 8: Renumber `custom.md`
221
+
222
+
If the new adapter's number conflicts with `custom.md`, renumber `custom.md` to be the last entry. For example, if the new adapter is `5.{name}.md`, rename `5.custom.md` to `6.custom.md`.
evlog provides built-in adapters for popular observability platforms. Use the `evlog:drain` hook to send logs to external services.
213
213
214
+
> **Creating a new adapter?** Follow the skill at `.agents/skills/create-adapter/SKILL.md`. It covers all touchpoints: source code, build config, package exports, tests, and all documentation updates.
0 commit comments