@contentrain/skills 0.1.1 → 0.2.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.
Files changed (45) hide show
  1. package/README.md +65 -60
  2. package/dist/index.cjs +65 -1
  3. package/dist/index.d.cts +50 -2
  4. package/dist/index.d.cts.map +1 -1
  5. package/dist/index.d.mts +50 -2
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +65 -2
  8. package/dist/index.mjs.map +1 -1
  9. package/frameworks/nuxt.md +26 -1
  10. package/package.json +3 -1
  11. package/skills/contentrain/SKILL.md +149 -0
  12. package/skills/contentrain/references/architecture.md +212 -0
  13. package/skills/contentrain/references/content-formats.md +279 -0
  14. package/skills/contentrain/references/i18n.md +298 -0
  15. package/skills/contentrain/references/mcp-pipelines.md +192 -0
  16. package/skills/contentrain/references/mcp-tools.md +308 -0
  17. package/skills/contentrain/references/model-kinds.md +330 -0
  18. package/skills/contentrain/references/schema-types.md +177 -0
  19. package/skills/contentrain/references/security.md +146 -0
  20. package/skills/contentrain/references/workflow.md +267 -0
  21. package/skills/contentrain-bulk/SKILL.md +99 -0
  22. package/skills/contentrain-content/SKILL.md +162 -0
  23. package/skills/contentrain-diff/SKILL.md +62 -0
  24. package/skills/contentrain-doctor/SKILL.md +62 -0
  25. package/skills/contentrain-generate/SKILL.md +183 -0
  26. package/skills/contentrain-generate/references/generated-client.md +198 -0
  27. package/skills/contentrain-init/SKILL.md +99 -0
  28. package/skills/contentrain-model/SKILL.md +141 -0
  29. package/skills/contentrain-normalize/SKILL.md +185 -0
  30. package/skills/contentrain-normalize/references/extraction.md +164 -0
  31. package/skills/contentrain-normalize/references/reuse.md +146 -0
  32. package/skills/contentrain-normalize/references/what-is-content.md +115 -0
  33. package/skills/contentrain-quality/SKILL.md +180 -0
  34. package/skills/contentrain-quality/references/accessibility.md +160 -0
  35. package/skills/contentrain-quality/references/content-quality.md +299 -0
  36. package/skills/contentrain-quality/references/media.md +170 -0
  37. package/skills/contentrain-quality/references/seo.md +229 -0
  38. package/skills/contentrain-review/SKILL.md +170 -0
  39. package/skills/contentrain-sdk/SKILL.md +145 -0
  40. package/skills/contentrain-sdk/references/bundler-config.md +135 -0
  41. package/skills/contentrain-serve/SKILL.md +96 -0
  42. package/skills/contentrain-translate/SKILL.md +180 -0
  43. package/skills/contentrain-validate-fix/SKILL.md +92 -0
  44. package/workflows/contentrain-content.md +1 -1
  45. package/workflows/contentrain-generate.md +5 -5
package/README.md CHANGED
@@ -5,92 +5,97 @@
5
5
 
6
6
  Workflow skills and framework guides for Contentrain-aware AI agents.
7
7
 
8
- This package is the procedural layer of the Contentrain ecosystem. It tells an agent how to apply the policy from `@contentrain/rules` in concrete tasks such as:
8
+ This package follows the [Agent Skills standard](https://agentskills.io) for progressive disclosure: each skill has a `SKILL.md` (loaded on activation) and optional `references/` (loaded on demand).
9
9
 
10
- - initializing a project
11
- - creating content
12
- - running normalize
13
- - reviewing and submitting changes
14
- - generating the SDK client
15
- - translating content
16
-
17
- If `@contentrain/rules` defines constraints, `@contentrain/skills` defines execution playbooks.
18
-
19
- ## 🚀 Install
10
+ ## Install
20
11
 
21
12
  ```bash
22
13
  pnpm add @contentrain/skills
23
14
  ```
24
15
 
25
- ## 📦 What It Contains
16
+ Or install directly via the skills CLI:
17
+
18
+ ```bash
19
+ npx skills add contentrain/contentrain-ai --skill='*'
20
+ ```
26
21
 
27
- ### Workflow skills
22
+ ## What It Contains
23
+
24
+ ### Agent Skills (standard format)
25
+
26
+ Published under `skills/`:
27
+
28
+ | Skill | Description |
29
+ |-------|-------------|
30
+ | `contentrain` | Core architecture, MCP tools, content formats |
31
+ | `contentrain-normalize` | Two-phase normalize (extract + reuse) |
32
+ | `contentrain-quality` | Content quality, SEO, accessibility, media |
33
+ | `contentrain-sdk` | @contentrain/query SDK usage (local + CDN) |
34
+ | `contentrain-content` | Content CRUD operations |
35
+ | `contentrain-model` | Model creation/update |
36
+ | `contentrain-init` | Project initialization |
37
+ | `contentrain-bulk` | Batch operations |
38
+ | `contentrain-validate-fix` | Validation and auto-fix |
39
+ | `contentrain-review` | Content quality review |
40
+ | `contentrain-translate` | Multi-locale translation |
41
+ | `contentrain-generate` | SDK client generation |
42
+ | `contentrain-serve` | Local review/normalize UI |
43
+ | `contentrain-diff` | Branch content diffs |
44
+ | `contentrain-doctor` | Project health diagnostics |
45
+
46
+ Each skill directory contains:
47
+ ```
48
+ skills/{name}/
49
+ ├── SKILL.md # Instructions (< 500 lines)
50
+ └── references/ # Detailed docs (loaded on demand)
51
+ └── *.md
52
+ ```
28
53
 
29
- Published under `workflows/*`:
54
+ ### Workflow skills (backward compat)
30
55
 
31
- - `contentrain-init.md`
32
- - `contentrain-model.md`
33
- - `contentrain-content.md`
34
- - `contentrain-bulk.md`
35
- - `contentrain-normalize.md`
36
- - `contentrain-validate-fix.md`
37
- - `contentrain-review.md`
38
- - `contentrain-diff.md`
39
- - `contentrain-doctor.md`
40
- - `contentrain-serve.md`
41
- - `contentrain-translate.md`
42
- - `contentrain-generate.md`
56
+ Published under `workflows/*` — flat markdown files from previous versions. Still functional.
43
57
 
44
58
  ### Framework guides
45
59
 
46
60
  Published under `frameworks/*`:
47
61
 
48
- - `nuxt.md`
49
- - `next.md`
50
- - `astro.md`
51
- - `sveltekit.md`
52
- - `vue.md`
53
- - `react.md`
54
- - `expo.md`
55
- - `react-native.md`
56
- - `node.md`
57
-
58
- ## 🧰 Public Exports
59
-
60
- The package root exports:
62
+ - `nuxt.md`, `next.md`, `astro.md`, `sveltekit.md`, `vue.md`, `react.md`, `expo.md`, `react-native.md`, `node.md`
61
63
 
62
- - `WORKFLOW_SKILLS`
63
- - `FRAMEWORK_GUIDES`
64
-
65
- ## 🧪 Example
64
+ ## Public Exports
66
65
 
67
66
  ```ts
68
- import { WORKFLOW_SKILLS, FRAMEWORK_GUIDES } from '@contentrain/skills'
67
+ import { AGENT_SKILLS, WORKFLOW_SKILLS, FRAMEWORK_GUIDES } from '@contentrain/skills'
68
+
69
+ // Agent Skills catalog (name + description for Tier 1 discovery)
70
+ console.log(AGENT_SKILLS)
69
71
 
72
+ // Backward compat
70
73
  console.log(WORKFLOW_SKILLS)
71
- console.log(FRAMEWORK_GUIDES.includes('next'))
74
+ console.log(FRAMEWORK_GUIDES)
72
75
  ```
73
76
 
74
- ## 🧠 Design Role
75
-
76
- `@contentrain/skills` is for step-by-step execution guidance:
77
+ ## Progressive Disclosure
77
78
 
78
- - `skills` = procedures and operational playbooks
79
- - `rules` = policy and non-negotiable constraints
79
+ | Tier | What's Loaded | When | Token Cost |
80
+ |------|--------------|------|------------|
81
+ | 1. Catalog | `name` + `description` | Session start | ~50 tokens/skill |
82
+ | 2. Instructions | Full `SKILL.md` body | Skill activated | < 5000 tokens |
83
+ | 3. References | `references/*.md` | Agent needs detail | Varies |
80
84
 
81
- In practice:
85
+ This reduces always-loaded context from ~4,700 lines to ~86 lines (essential guardrails only).
82
86
 
83
- - use `@contentrain/rules` to understand what is allowed
84
- - use `@contentrain/skills` to decide which workflow to run next
87
+ ## IDE Support
85
88
 
86
- ## 🔗 Relationship To Other Packages
89
+ Skills are installed by `contentrain init` for detected IDEs:
87
90
 
88
- - `@contentrain/mcp` provides the actual tool surface
89
- - `@contentrain/rules` defines policy and quality constraints
90
- - `contentrain` exposes CLI and serve workflows
91
- - `@contentrain/query` provides the generated content runtime
91
+ | IDE | Rules Dir | Skills Dir |
92
+ |-----|-----------|------------|
93
+ | Claude Code | `.claude/rules/` | `.claude/skills/` |
94
+ | Cursor | `.cursor/rules/` | `.cursor/skills/` |
95
+ | Windsurf | `.windsurf/rules/` | `.windsurf/skills/` |
96
+ | GitHub Copilot | `.github/` | `.agents/skills/` |
92
97
 
93
- ## 🛠 Build
98
+ ## Build
94
99
 
95
100
  From the monorepo root:
96
101
 
@@ -100,6 +105,6 @@ pnpm --filter @contentrain/skills test
100
105
  pnpm --filter @contentrain/skills typecheck
101
106
  ```
102
107
 
103
- ## 📄 License
108
+ ## License
104
109
 
105
110
  MIT
package/dist/index.cjs CHANGED
@@ -3,8 +3,71 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  /**
4
4
  * @contentrain/skills — AI agent skills for Contentrain
5
5
  *
6
- * Step-by-step workflow procedures and framework integration guides.
6
+ * Agent Skills standard format: SKILL.md + references/ for progressive disclosure.
7
+ * Also includes workflow procedures and framework integration guides.
7
8
  */
9
+ const AGENT_SKILLS = [
10
+ {
11
+ name: "contentrain",
12
+ description: "Contentrain CMS architecture, content formats, and MCP tool usage"
13
+ },
14
+ {
15
+ name: "contentrain-normalize",
16
+ description: "Two-phase normalize: extract hardcoded strings and patch source files"
17
+ },
18
+ {
19
+ name: "contentrain-quality",
20
+ description: "Content quality, SEO, accessibility, and media rules"
21
+ },
22
+ {
23
+ name: "contentrain-sdk",
24
+ description: "Query SDK usage: #contentrain imports, QueryBuilder, type-safe content access"
25
+ },
26
+ {
27
+ name: "contentrain-content",
28
+ description: "Create and manage content entries for existing models"
29
+ },
30
+ {
31
+ name: "contentrain-model",
32
+ description: "Design and save model definitions"
33
+ },
34
+ {
35
+ name: "contentrain-init",
36
+ description: "Initialize a new Contentrain project"
37
+ },
38
+ {
39
+ name: "contentrain-bulk",
40
+ description: "Batch operations on content entries"
41
+ },
42
+ {
43
+ name: "contentrain-validate-fix",
44
+ description: "Validate content and auto-fix structural issues"
45
+ },
46
+ {
47
+ name: "contentrain-review",
48
+ description: "Review content changes before publishing"
49
+ },
50
+ {
51
+ name: "contentrain-translate",
52
+ description: "Translate content across supported locales"
53
+ },
54
+ {
55
+ name: "contentrain-generate",
56
+ description: "Generate the typed SDK client from models"
57
+ },
58
+ {
59
+ name: "contentrain-serve",
60
+ description: "Start the local review and normalize UI"
61
+ },
62
+ {
63
+ name: "contentrain-diff",
64
+ description: "View content diffs between branches"
65
+ },
66
+ {
67
+ name: "contentrain-doctor",
68
+ description: "Diagnose project health issues"
69
+ }
70
+ ];
8
71
  const WORKFLOW_SKILLS = [
9
72
  "contentrain-init",
10
73
  "contentrain-model",
@@ -31,5 +94,6 @@ const FRAMEWORK_GUIDES = [
31
94
  "node"
32
95
  ];
33
96
  //#endregion
97
+ exports.AGENT_SKILLS = AGENT_SKILLS;
34
98
  exports.FRAMEWORK_GUIDES = FRAMEWORK_GUIDES;
35
99
  exports.WORKFLOW_SKILLS = WORKFLOW_SKILLS;
package/dist/index.d.cts CHANGED
@@ -2,12 +2,60 @@
2
2
  /**
3
3
  * @contentrain/skills — AI agent skills for Contentrain
4
4
  *
5
- * Step-by-step workflow procedures and framework integration guides.
5
+ * Agent Skills standard format: SKILL.md + references/ for progressive disclosure.
6
+ * Also includes workflow procedures and framework integration guides.
6
7
  */
8
+ declare const AGENT_SKILLS: readonly [{
9
+ readonly name: "contentrain";
10
+ readonly description: "Contentrain CMS architecture, content formats, and MCP tool usage";
11
+ }, {
12
+ readonly name: "contentrain-normalize";
13
+ readonly description: "Two-phase normalize: extract hardcoded strings and patch source files";
14
+ }, {
15
+ readonly name: "contentrain-quality";
16
+ readonly description: "Content quality, SEO, accessibility, and media rules";
17
+ }, {
18
+ readonly name: "contentrain-sdk";
19
+ readonly description: "Query SDK usage: #contentrain imports, QueryBuilder, type-safe content access";
20
+ }, {
21
+ readonly name: "contentrain-content";
22
+ readonly description: "Create and manage content entries for existing models";
23
+ }, {
24
+ readonly name: "contentrain-model";
25
+ readonly description: "Design and save model definitions";
26
+ }, {
27
+ readonly name: "contentrain-init";
28
+ readonly description: "Initialize a new Contentrain project";
29
+ }, {
30
+ readonly name: "contentrain-bulk";
31
+ readonly description: "Batch operations on content entries";
32
+ }, {
33
+ readonly name: "contentrain-validate-fix";
34
+ readonly description: "Validate content and auto-fix structural issues";
35
+ }, {
36
+ readonly name: "contentrain-review";
37
+ readonly description: "Review content changes before publishing";
38
+ }, {
39
+ readonly name: "contentrain-translate";
40
+ readonly description: "Translate content across supported locales";
41
+ }, {
42
+ readonly name: "contentrain-generate";
43
+ readonly description: "Generate the typed SDK client from models";
44
+ }, {
45
+ readonly name: "contentrain-serve";
46
+ readonly description: "Start the local review and normalize UI";
47
+ }, {
48
+ readonly name: "contentrain-diff";
49
+ readonly description: "View content diffs between branches";
50
+ }, {
51
+ readonly name: "contentrain-doctor";
52
+ readonly description: "Diagnose project health issues";
53
+ }];
54
+ type AgentSkillName = (typeof AGENT_SKILLS)[number]['name'];
7
55
  declare const WORKFLOW_SKILLS: readonly ["contentrain-init", "contentrain-model", "contentrain-content", "contentrain-bulk", "contentrain-normalize", "contentrain-validate-fix", "contentrain-review", "contentrain-diff", "contentrain-doctor", "contentrain-serve", "contentrain-translate", "contentrain-generate"];
8
56
  type WorkflowSkill = (typeof WORKFLOW_SKILLS)[number];
9
57
  declare const FRAMEWORK_GUIDES: readonly ["nuxt", "next", "astro", "sveltekit", "vue", "react", "expo", "react-native", "node"];
10
58
  type FrameworkGuide = (typeof FRAMEWORK_GUIDES)[number];
11
59
  //#endregion
12
- export { FRAMEWORK_GUIDES, FrameworkGuide, WORKFLOW_SKILLS, WorkflowSkill };
60
+ export { AGENT_SKILLS, AgentSkillName, FRAMEWORK_GUIDES, FrameworkGuide, WORKFLOW_SKILLS, WorkflowSkill };
13
61
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;AAQA;;;;cAAa,eAAA;AAAA,KAeD,aAAA,WAAwB,eAAA;AAAA,cAIvB,gBAAA;AAAA,KACD,cAAA,WAAyB,gBAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/index.ts"],"mappings":";;AASA;;;;;cAAa,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBD,cAAA,WAAyB,YAAA;AAAA,cAIxB,eAAA;AAAA,KAeD,aAAA,WAAwB,eAAA;AAAA,cAIvB,gBAAA;AAAA,KACD,cAAA,WAAyB,gBAAA"}
package/dist/index.d.mts CHANGED
@@ -2,12 +2,60 @@
2
2
  /**
3
3
  * @contentrain/skills — AI agent skills for Contentrain
4
4
  *
5
- * Step-by-step workflow procedures and framework integration guides.
5
+ * Agent Skills standard format: SKILL.md + references/ for progressive disclosure.
6
+ * Also includes workflow procedures and framework integration guides.
6
7
  */
8
+ declare const AGENT_SKILLS: readonly [{
9
+ readonly name: "contentrain";
10
+ readonly description: "Contentrain CMS architecture, content formats, and MCP tool usage";
11
+ }, {
12
+ readonly name: "contentrain-normalize";
13
+ readonly description: "Two-phase normalize: extract hardcoded strings and patch source files";
14
+ }, {
15
+ readonly name: "contentrain-quality";
16
+ readonly description: "Content quality, SEO, accessibility, and media rules";
17
+ }, {
18
+ readonly name: "contentrain-sdk";
19
+ readonly description: "Query SDK usage: #contentrain imports, QueryBuilder, type-safe content access";
20
+ }, {
21
+ readonly name: "contentrain-content";
22
+ readonly description: "Create and manage content entries for existing models";
23
+ }, {
24
+ readonly name: "contentrain-model";
25
+ readonly description: "Design and save model definitions";
26
+ }, {
27
+ readonly name: "contentrain-init";
28
+ readonly description: "Initialize a new Contentrain project";
29
+ }, {
30
+ readonly name: "contentrain-bulk";
31
+ readonly description: "Batch operations on content entries";
32
+ }, {
33
+ readonly name: "contentrain-validate-fix";
34
+ readonly description: "Validate content and auto-fix structural issues";
35
+ }, {
36
+ readonly name: "contentrain-review";
37
+ readonly description: "Review content changes before publishing";
38
+ }, {
39
+ readonly name: "contentrain-translate";
40
+ readonly description: "Translate content across supported locales";
41
+ }, {
42
+ readonly name: "contentrain-generate";
43
+ readonly description: "Generate the typed SDK client from models";
44
+ }, {
45
+ readonly name: "contentrain-serve";
46
+ readonly description: "Start the local review and normalize UI";
47
+ }, {
48
+ readonly name: "contentrain-diff";
49
+ readonly description: "View content diffs between branches";
50
+ }, {
51
+ readonly name: "contentrain-doctor";
52
+ readonly description: "Diagnose project health issues";
53
+ }];
54
+ type AgentSkillName = (typeof AGENT_SKILLS)[number]['name'];
7
55
  declare const WORKFLOW_SKILLS: readonly ["contentrain-init", "contentrain-model", "contentrain-content", "contentrain-bulk", "contentrain-normalize", "contentrain-validate-fix", "contentrain-review", "contentrain-diff", "contentrain-doctor", "contentrain-serve", "contentrain-translate", "contentrain-generate"];
8
56
  type WorkflowSkill = (typeof WORKFLOW_SKILLS)[number];
9
57
  declare const FRAMEWORK_GUIDES: readonly ["nuxt", "next", "astro", "sveltekit", "vue", "react", "expo", "react-native", "node"];
10
58
  type FrameworkGuide = (typeof FRAMEWORK_GUIDES)[number];
11
59
  //#endregion
12
- export { FRAMEWORK_GUIDES, FrameworkGuide, WORKFLOW_SKILLS, WorkflowSkill };
60
+ export { AGENT_SKILLS, AgentSkillName, FRAMEWORK_GUIDES, FrameworkGuide, WORKFLOW_SKILLS, WorkflowSkill };
13
61
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;AAQA;;;;cAAa,eAAA;AAAA,KAeD,aAAA,WAAwB,eAAA;AAAA,cAIvB,gBAAA;AAAA,KACD,cAAA,WAAyB,gBAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":";;AASA;;;;;cAAa,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkBD,cAAA,WAAyB,YAAA;AAAA,cAIxB,eAAA;AAAA,KAeD,aAAA,WAAwB,eAAA;AAAA,cAIvB,gBAAA;AAAA,KACD,cAAA,WAAyB,gBAAA"}
package/dist/index.mjs CHANGED
@@ -2,8 +2,71 @@
2
2
  /**
3
3
  * @contentrain/skills — AI agent skills for Contentrain
4
4
  *
5
- * Step-by-step workflow procedures and framework integration guides.
5
+ * Agent Skills standard format: SKILL.md + references/ for progressive disclosure.
6
+ * Also includes workflow procedures and framework integration guides.
6
7
  */
8
+ const AGENT_SKILLS = [
9
+ {
10
+ name: "contentrain",
11
+ description: "Contentrain CMS architecture, content formats, and MCP tool usage"
12
+ },
13
+ {
14
+ name: "contentrain-normalize",
15
+ description: "Two-phase normalize: extract hardcoded strings and patch source files"
16
+ },
17
+ {
18
+ name: "contentrain-quality",
19
+ description: "Content quality, SEO, accessibility, and media rules"
20
+ },
21
+ {
22
+ name: "contentrain-sdk",
23
+ description: "Query SDK usage: #contentrain imports, QueryBuilder, type-safe content access"
24
+ },
25
+ {
26
+ name: "contentrain-content",
27
+ description: "Create and manage content entries for existing models"
28
+ },
29
+ {
30
+ name: "contentrain-model",
31
+ description: "Design and save model definitions"
32
+ },
33
+ {
34
+ name: "contentrain-init",
35
+ description: "Initialize a new Contentrain project"
36
+ },
37
+ {
38
+ name: "contentrain-bulk",
39
+ description: "Batch operations on content entries"
40
+ },
41
+ {
42
+ name: "contentrain-validate-fix",
43
+ description: "Validate content and auto-fix structural issues"
44
+ },
45
+ {
46
+ name: "contentrain-review",
47
+ description: "Review content changes before publishing"
48
+ },
49
+ {
50
+ name: "contentrain-translate",
51
+ description: "Translate content across supported locales"
52
+ },
53
+ {
54
+ name: "contentrain-generate",
55
+ description: "Generate the typed SDK client from models"
56
+ },
57
+ {
58
+ name: "contentrain-serve",
59
+ description: "Start the local review and normalize UI"
60
+ },
61
+ {
62
+ name: "contentrain-diff",
63
+ description: "View content diffs between branches"
64
+ },
65
+ {
66
+ name: "contentrain-doctor",
67
+ description: "Diagnose project health issues"
68
+ }
69
+ ];
7
70
  const WORKFLOW_SKILLS = [
8
71
  "contentrain-init",
9
72
  "contentrain-model",
@@ -30,6 +93,6 @@ const FRAMEWORK_GUIDES = [
30
93
  "node"
31
94
  ];
32
95
  //#endregion
33
- export { FRAMEWORK_GUIDES, WORKFLOW_SKILLS };
96
+ export { AGENT_SKILLS, FRAMEWORK_GUIDES, WORKFLOW_SKILLS };
34
97
 
35
98
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @contentrain/skills — AI agent skills for Contentrain\n *\n * Step-by-step workflow procedures and framework integration guides.\n */\n\n// ─── Workflow Skills ───\n\nexport const WORKFLOW_SKILLS = [\n 'contentrain-init',\n 'contentrain-model',\n 'contentrain-content',\n 'contentrain-bulk',\n 'contentrain-normalize',\n 'contentrain-validate-fix',\n 'contentrain-review',\n 'contentrain-diff',\n 'contentrain-doctor',\n 'contentrain-serve',\n 'contentrain-translate',\n 'contentrain-generate',\n] as const\n\nexport type WorkflowSkill = (typeof WORKFLOW_SKILLS)[number]\n\n// ─── Framework Guides ───\n\nexport const FRAMEWORK_GUIDES = ['nuxt', 'next', 'astro', 'sveltekit', 'vue', 'react', 'expo', 'react-native', 'node'] as const\nexport type FrameworkGuide = (typeof FRAMEWORK_GUIDES)[number]\n"],"mappings":";;;;;;AAQA,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAMD,MAAa,mBAAmB;CAAC;CAAQ;CAAQ;CAAS;CAAa;CAAO;CAAS;CAAQ;CAAgB;CAAO"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["/**\n * @contentrain/skills — AI agent skills for Contentrain\n *\n * Agent Skills standard format: SKILL.md + references/ for progressive disclosure.\n * Also includes workflow procedures and framework integration guides.\n */\n\n// ─── Agent Skills Catalog ───\n\nexport const AGENT_SKILLS = [\n { name: 'contentrain', description: 'Contentrain CMS architecture, content formats, and MCP tool usage' },\n { name: 'contentrain-normalize', description: 'Two-phase normalize: extract hardcoded strings and patch source files' },\n { name: 'contentrain-quality', description: 'Content quality, SEO, accessibility, and media rules' },\n { name: 'contentrain-sdk', description: 'Query SDK usage: #contentrain imports, QueryBuilder, type-safe content access' },\n { name: 'contentrain-content', description: 'Create and manage content entries for existing models' },\n { name: 'contentrain-model', description: 'Design and save model definitions' },\n { name: 'contentrain-init', description: 'Initialize a new Contentrain project' },\n { name: 'contentrain-bulk', description: 'Batch operations on content entries' },\n { name: 'contentrain-validate-fix', description: 'Validate content and auto-fix structural issues' },\n { name: 'contentrain-review', description: 'Review content changes before publishing' },\n { name: 'contentrain-translate', description: 'Translate content across supported locales' },\n { name: 'contentrain-generate', description: 'Generate the typed SDK client from models' },\n { name: 'contentrain-serve', description: 'Start the local review and normalize UI' },\n { name: 'contentrain-diff', description: 'View content diffs between branches' },\n { name: 'contentrain-doctor', description: 'Diagnose project health issues' },\n] as const\n\nexport type AgentSkillName = (typeof AGENT_SKILLS)[number]['name']\n\n// ─── Workflow Skills (backward compat) ───\n\nexport const WORKFLOW_SKILLS = [\n 'contentrain-init',\n 'contentrain-model',\n 'contentrain-content',\n 'contentrain-bulk',\n 'contentrain-normalize',\n 'contentrain-validate-fix',\n 'contentrain-review',\n 'contentrain-diff',\n 'contentrain-doctor',\n 'contentrain-serve',\n 'contentrain-translate',\n 'contentrain-generate',\n] as const\n\nexport type WorkflowSkill = (typeof WORKFLOW_SKILLS)[number]\n\n// ─── Framework Guides ───\n\nexport const FRAMEWORK_GUIDES = ['nuxt', 'next', 'astro', 'sveltekit', 'vue', 'react', 'expo', 'react-native', 'node'] as const\nexport type FrameworkGuide = (typeof FRAMEWORK_GUIDES)[number]\n"],"mappings":";;;;;;;AASA,MAAa,eAAe;CAC1B;EAAE,MAAM;EAAe,aAAa;EAAqE;CACzG;EAAE,MAAM;EAAyB,aAAa;EAAyE;CACvH;EAAE,MAAM;EAAuB,aAAa;EAAwD;CACpG;EAAE,MAAM;EAAmB,aAAa;EAAiF;CACzH;EAAE,MAAM;EAAuB,aAAa;EAAyD;CACrG;EAAE,MAAM;EAAqB,aAAa;EAAqC;CAC/E;EAAE,MAAM;EAAoB,aAAa;EAAwC;CACjF;EAAE,MAAM;EAAoB,aAAa;EAAuC;CAChF;EAAE,MAAM;EAA4B,aAAa;EAAmD;CACpG;EAAE,MAAM;EAAsB,aAAa;EAA4C;CACvF;EAAE,MAAM;EAAyB,aAAa;EAA8C;CAC5F;EAAE,MAAM;EAAwB,aAAa;EAA6C;CAC1F;EAAE,MAAM;EAAqB,aAAa;EAA2C;CACrF;EAAE,MAAM;EAAoB,aAAa;EAAuC;CAChF;EAAE,MAAM;EAAsB,aAAa;EAAkC;CAC9E;AAMD,MAAa,kBAAkB;CAC7B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD;AAMD,MAAa,mBAAmB;CAAC;CAAQ;CAAQ;CAAS;CAAa;CAAO;CAAS;CAAQ;CAAgB;CAAO"}
@@ -30,7 +30,32 @@ The generator reads `.contentrain/models/` and produces a typed client in `.cont
30
30
 
31
31
  The generator adds this automatically. After generation, restart the Nuxt dev server to pick up the new import map.
32
32
 
33
- ### 1.2 Watch Mode
33
+ ### 1.2 Bundler Alias
34
+
35
+ The `#contentrain` subpath import works natively in Node.js 22+ but does NOT resolve in Nuxt's bundler. Add a top-level alias:
36
+
37
+ ```ts
38
+ // nuxt.config.ts
39
+ export default defineNuxtConfig({
40
+ alias: {
41
+ '#contentrain': './.contentrain/client/index.mjs',
42
+ },
43
+ })
44
+ ```
45
+
46
+ Also add a `paths` entry to `tsconfig.json` so the TypeScript language server resolves it:
47
+
48
+ ```json
49
+ {
50
+ "compilerOptions": {
51
+ "paths": {
52
+ "#contentrain": ["./.contentrain/client/index.d.ts"]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### 1.3 Watch Mode
34
59
 
35
60
  Run the generator in watch mode alongside Nuxt dev:
36
61
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentrain/skills",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "description": "AI agent skills for Contentrain — workflow procedures, framework integration guides",
6
6
  "type": "module",
@@ -40,11 +40,13 @@
40
40
  "require": "./dist/index.cjs",
41
41
  "default": "./dist/index.mjs"
42
42
  },
43
+ "./skills/*": "./skills/*",
43
44
  "./workflows/*": "./workflows/*",
44
45
  "./frameworks/*": "./frameworks/*"
45
46
  },
46
47
  "files": [
47
48
  "dist",
49
+ "skills",
48
50
  "workflows",
49
51
  "frameworks"
50
52
  ],