@moskala/oneagent-templates 0.3.0 → 0.4.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.
package/README.md
CHANGED
|
@@ -201,3 +201,54 @@ Follow the team coding standards documented in Notion.
|
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
Skills, plugins, and rules are all optional.
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## `extends`
|
|
208
|
+
|
|
209
|
+
Templates can inherit from other templates using the `extends` field. The child template only needs to define what it **adds** — skills, plugins, and rules from the parent are merged automatically.
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
name: my-react-template
|
|
213
|
+
description: Our React starter
|
|
214
|
+
extends: https://github.com/moskalakamil/oneagent-template
|
|
215
|
+
|
|
216
|
+
skills:
|
|
217
|
+
- repo: https://github.com/anthropics/skills
|
|
218
|
+
skill: frontend-design
|
|
219
|
+
plugins:
|
|
220
|
+
- target: claude
|
|
221
|
+
id: frontend-design@claude-plugins-official
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### What `extends` accepts
|
|
225
|
+
|
|
226
|
+
| Value | Example | Description |
|
|
227
|
+
|-------|---------|-------------|
|
|
228
|
+
| Builtin template name | `extends: default` | Inherits from one of the built-in templates (`default`, `react`, `react-native`) |
|
|
229
|
+
| GitHub URL | `extends: https://github.com/org/template` | Inherits from a remote template (supports `/tree/branch/subdir` URLs) |
|
|
230
|
+
|
|
231
|
+
### Merge behavior
|
|
232
|
+
|
|
233
|
+
| Field | Behavior |
|
|
234
|
+
|-------|----------|
|
|
235
|
+
| `skills` | `[...parent.skills, ...own.skills]` |
|
|
236
|
+
| `plugins` | `[...parent.plugins, ...own.plugins]` |
|
|
237
|
+
| `rules` | `[...parent.rules, ...own.rules]` |
|
|
238
|
+
| `instructions` | **Not inherited** — each template has its own `instructions.md` |
|
|
239
|
+
|
|
240
|
+
### Chaining
|
|
241
|
+
|
|
242
|
+
Extends is recursive. The built-in templates form a chain:
|
|
243
|
+
|
|
244
|
+
```
|
|
245
|
+
react-native → react → default
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
- `default` defines 7 skills and 9 plugins
|
|
249
|
+
- `react` adds 7 skills and 2 plugins (total after merge: 14 skills, 11 plugins)
|
|
250
|
+
- `react-native` adds 5 skills (total after merge: 19 skills, 11 plugins)
|
|
251
|
+
|
|
252
|
+
### Limitations
|
|
253
|
+
|
|
254
|
+
Remote templates (fetched from GitHub) can only extend other remote templates via URL — not built-in template names.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moskala/oneagent-templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Built-in templates for oneagent",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"typecheck": "tsc --noEmit"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@moskala/oneagent-core": "0.
|
|
19
|
+
"@moskala/oneagent-core": "0.3.1"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@types/bun": "latest",
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import fs from "fs/promises";
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
|
-
import { type TemplatePlugin, type TemplateDefinition, parseTemplateYaml } from "@moskala/oneagent-core";
|
|
4
|
+
import { type TemplatePlugin, type TemplateDefinition, parseTemplateYaml, resolveExtends } from "@moskala/oneagent-core";
|
|
5
5
|
|
|
6
6
|
export type { TemplatePlugin, TemplateDefinition };
|
|
7
7
|
|
|
@@ -19,7 +19,7 @@ async function loadTemplate(name: BuiltinTemplateName): Promise<TemplateDefiniti
|
|
|
19
19
|
fs.readFile(path.join(templateDir, "instructions.md"), "utf-8"),
|
|
20
20
|
]);
|
|
21
21
|
|
|
22
|
-
const
|
|
22
|
+
const parsed = parseTemplateYaml(yamlText, name);
|
|
23
23
|
|
|
24
24
|
const rulesDir = path.join(templateDir, "rules");
|
|
25
25
|
let rules: Array<{ name: string; content: string }> = [];
|
|
@@ -37,7 +37,8 @@ async function loadTemplate(name: BuiltinTemplateName): Promise<TemplateDefiniti
|
|
|
37
37
|
// No rules directory — fine
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
const base = { ...parsed, instructions, rules };
|
|
41
|
+
return resolveExtends(base, (n) => resolveBuiltinTemplate(n));
|
|
41
42
|
}
|
|
42
43
|
|
|
43
44
|
export async function resolveBuiltinTemplate(name: string): Promise<TemplateDefinition | null> {
|
|
@@ -3,8 +3,8 @@ description: General programming starter
|
|
|
3
3
|
skills:
|
|
4
4
|
- repo: https://github.com/vercel-labs/skills
|
|
5
5
|
skill: find-skills
|
|
6
|
-
- repo: https://github.com/
|
|
7
|
-
skill:
|
|
6
|
+
- repo: https://github.com/obra/superpowers
|
|
7
|
+
skill: writing-skills
|
|
8
8
|
- repo: https://github.com/github/awesome-copilot
|
|
9
9
|
skill: conventional-commit
|
|
10
10
|
- repo: https://github.com/oldwinter/skills
|
|
@@ -26,16 +26,6 @@ plugins:
|
|
|
26
26
|
id: security-guidance@claude-plugins-official
|
|
27
27
|
- target: claude
|
|
28
28
|
id: claude-md-management@claude-plugins-official
|
|
29
|
-
- target: cursor
|
|
30
|
-
id: context7-plugin
|
|
31
|
-
- target: cursor
|
|
32
|
-
id: superpowers
|
|
33
|
-
- target: cursor
|
|
34
|
-
id: parallel
|
|
35
|
-
- target: cursor
|
|
36
|
-
id: runlayer
|
|
37
|
-
- target: cursor
|
|
38
|
-
id: cursor-team-kit
|
|
39
29
|
- target: opencode
|
|
40
30
|
id: oh-my-opencode
|
|
41
31
|
- target: opencode
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
name: react
|
|
2
2
|
description: React / Next.js project starter
|
|
3
|
+
extends: default
|
|
3
4
|
skills:
|
|
4
|
-
- repo: https://github.com/vercel-labs/skills
|
|
5
|
-
skill: find-skills
|
|
6
|
-
- repo: https://github.com/anthropics/skills
|
|
7
|
-
skill: skill-creator
|
|
8
|
-
- repo: https://github.com/github/awesome-copilot
|
|
9
|
-
skill: conventional-commit
|
|
10
|
-
- repo: https://github.com/oldwinter/skills
|
|
11
|
-
skill: github-cli
|
|
12
|
-
- repo: https://github.com/supercent-io/skills-template
|
|
13
|
-
skill: code-review
|
|
14
|
-
- repo: https://github.com/vercel-labs/agent-skills
|
|
15
|
-
skill: web-design-guidelines
|
|
16
|
-
- repo: https://github.com/coreyhaines31/marketingskills
|
|
17
|
-
skill: copywriting
|
|
18
5
|
- repo: https://github.com/anthropics/skills
|
|
19
6
|
skill: frontend-design
|
|
20
7
|
- repo: https://github.com/vercel-labs/agent-skills
|
|
@@ -30,37 +17,7 @@ skills:
|
|
|
30
17
|
- repo: https://github.com/wshobson/agents
|
|
31
18
|
skill: react-state-management
|
|
32
19
|
plugins:
|
|
33
|
-
- target: claude
|
|
34
|
-
id: context7@claude-plugins-official
|
|
35
|
-
- target: claude
|
|
36
|
-
id: superpowers@claude-plugins-official
|
|
37
|
-
- target: claude
|
|
38
|
-
id: code-simplifier@claude-plugins-official
|
|
39
|
-
- target: claude
|
|
40
|
-
id: security-guidance@claude-plugins-official
|
|
41
|
-
- target: claude
|
|
42
|
-
id: claude-md-management@claude-plugins-official
|
|
43
20
|
- target: claude
|
|
44
21
|
id: frontend-design@claude-plugins-official
|
|
45
22
|
- target: claude
|
|
46
23
|
id: typescript-lsp@claude-plugins-official
|
|
47
|
-
- target: cursor
|
|
48
|
-
id: context7-plugin
|
|
49
|
-
- target: cursor
|
|
50
|
-
id: superpowers
|
|
51
|
-
- target: cursor
|
|
52
|
-
id: parallel
|
|
53
|
-
- target: cursor
|
|
54
|
-
id: runlayer
|
|
55
|
-
- target: cursor
|
|
56
|
-
id: cursor-team-kit
|
|
57
|
-
- target: cursor
|
|
58
|
-
id: vercel
|
|
59
|
-
- target: opencode
|
|
60
|
-
id: oh-my-opencode
|
|
61
|
-
- target: opencode
|
|
62
|
-
id: "@plannotator/opencode"
|
|
63
|
-
- target: opencode
|
|
64
|
-
id: "@openspoon/subtask2"
|
|
65
|
-
- target: opencode
|
|
66
|
-
id: micode
|
|
@@ -1,34 +1,7 @@
|
|
|
1
1
|
name: react-native
|
|
2
2
|
description: React Native / Expo project starter
|
|
3
|
+
extends: react
|
|
3
4
|
skills:
|
|
4
|
-
- repo: https://github.com/vercel-labs/skills
|
|
5
|
-
skill: find-skills
|
|
6
|
-
- repo: https://github.com/anthropics/skills
|
|
7
|
-
skill: skill-creator
|
|
8
|
-
- repo: https://github.com/github/awesome-copilot
|
|
9
|
-
skill: conventional-commit
|
|
10
|
-
- repo: https://github.com/oldwinter/skills
|
|
11
|
-
skill: github-cli
|
|
12
|
-
- repo: https://github.com/supercent-io/skills-template
|
|
13
|
-
skill: code-review
|
|
14
|
-
- repo: https://github.com/vercel-labs/agent-skills
|
|
15
|
-
skill: web-design-guidelines
|
|
16
|
-
- repo: https://github.com/coreyhaines31/marketingskills
|
|
17
|
-
skill: copywriting
|
|
18
|
-
- repo: https://github.com/anthropics/skills
|
|
19
|
-
skill: frontend-design
|
|
20
|
-
- repo: https://github.com/vercel-labs/agent-skills
|
|
21
|
-
skill: vercel-react-best-practices
|
|
22
|
-
- repo: https://github.com/vercel-labs/agent-skills
|
|
23
|
-
skill: vercel-composition-patterns
|
|
24
|
-
- repo: https://github.com/obra/superpowers
|
|
25
|
-
skill: brainstorming
|
|
26
|
-
- repo: https://github.com/coreyhaines31/marketingskills
|
|
27
|
-
skill: seo-audit
|
|
28
|
-
- repo: https://github.com/vercel-labs/next-skills
|
|
29
|
-
skill: next-best-practices
|
|
30
|
-
- repo: https://github.com/wshobson/agents
|
|
31
|
-
skill: react-state-management
|
|
32
5
|
- repo: https://github.com/vercel-labs/agent-skills
|
|
33
6
|
skill: vercel-react-native-skills
|
|
34
7
|
- repo: https://github.com/callstackincubator/agent-skills
|
|
@@ -39,36 +12,3 @@ skills:
|
|
|
39
12
|
skill: upgrading-expo
|
|
40
13
|
- repo: https://github.com/conorluddy/ios-simulator-skill
|
|
41
14
|
skill: ios-simulator-skill
|
|
42
|
-
plugins:
|
|
43
|
-
- target: claude
|
|
44
|
-
id: context7@claude-plugins-official
|
|
45
|
-
- target: claude
|
|
46
|
-
id: superpowers@claude-plugins-official
|
|
47
|
-
- target: claude
|
|
48
|
-
id: code-simplifier@claude-plugins-official
|
|
49
|
-
- target: claude
|
|
50
|
-
id: security-guidance@claude-plugins-official
|
|
51
|
-
- target: claude
|
|
52
|
-
id: claude-md-management@claude-plugins-official
|
|
53
|
-
- target: claude
|
|
54
|
-
id: frontend-design@claude-plugins-official
|
|
55
|
-
- target: claude
|
|
56
|
-
id: typescript-lsp@claude-plugins-official
|
|
57
|
-
- target: cursor
|
|
58
|
-
id: context7-plugin
|
|
59
|
-
- target: cursor
|
|
60
|
-
id: superpowers
|
|
61
|
-
- target: cursor
|
|
62
|
-
id: parallel
|
|
63
|
-
- target: cursor
|
|
64
|
-
id: runlayer
|
|
65
|
-
- target: cursor
|
|
66
|
-
id: cursor-team-kit
|
|
67
|
-
- target: opencode
|
|
68
|
-
id: oh-my-opencode
|
|
69
|
-
- target: opencode
|
|
70
|
-
id: "@plannotator/opencode"
|
|
71
|
-
- target: opencode
|
|
72
|
-
id: "@openspoon/subtask2"
|
|
73
|
-
- target: opencode
|
|
74
|
-
id: micode
|