@jahia/agentic 0.2.0 → 0.3.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 (101) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +28 -0
  3. package/dist/claude/.claude/skills/jahia/SKILL.md +18 -10
  4. package/dist/claude/.claude/skills/jahia-content/SKILL.md +102 -84
  5. package/dist/claude/.claude/skills/jahia-content-create-content/SKILL.md +255 -280
  6. package/dist/claude/.claude/skills/jahia-content-explore-structure/SKILL.md +187 -96
  7. package/dist/claude/.claude/skills/jahia-content-media-upload/SKILL.md +197 -0
  8. package/dist/claude/.claude/skills/jahia-content-move-content/SKILL.md +160 -165
  9. package/dist/claude/.claude/skills/jahia-content-organize/SKILL.md +209 -0
  10. package/dist/claude/.claude/skills/jahia-content-publish/SKILL.md +181 -0
  11. package/dist/claude/.claude/skills/jahia-content-query-content/SKILL.md +122 -92
  12. package/dist/claude/.claude/skills/jahia-content-translate-content/SKILL.md +154 -225
  13. package/dist/claude/.claude/skills/jahia-dev-cypress/SKILL.md +150 -330
  14. package/dist/claude/.claude/skills/jahia-dev-query-content/SKILL.md +93 -296
  15. package/dist/claude/.claude/skills/jahia-jcr-sql2/SKILL.md +258 -0
  16. package/dist/claude/CLAUDE.md +1 -7
  17. package/dist/codex/.agents/skills/jahia/SKILL.md +18 -10
  18. package/dist/codex/.agents/skills/jahia-content/SKILL.md +102 -84
  19. package/dist/codex/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  20. package/dist/codex/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  21. package/dist/codex/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  22. package/dist/codex/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  23. package/dist/codex/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  24. package/dist/codex/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  25. package/dist/codex/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  26. package/dist/codex/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  27. package/dist/codex/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  28. package/dist/codex/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  29. package/dist/codex/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  30. package/dist/codex/AGENTS.md +2 -4
  31. package/dist/copilot/.agents/skills/jahia/SKILL.md +18 -10
  32. package/dist/copilot/.agents/skills/jahia-content/SKILL.md +102 -84
  33. package/dist/copilot/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  34. package/dist/copilot/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  35. package/dist/copilot/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  36. package/dist/copilot/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  37. package/dist/copilot/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  38. package/dist/copilot/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  39. package/dist/copilot/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  40. package/dist/copilot/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  41. package/dist/copilot/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  42. package/dist/copilot/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  43. package/dist/copilot/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  44. package/dist/copilot/AGENTS.md +2 -4
  45. package/dist/cursor/.agents/skills/jahia/SKILL.md +18 -10
  46. package/dist/cursor/.agents/skills/jahia-content/SKILL.md +102 -84
  47. package/dist/cursor/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  48. package/dist/cursor/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  49. package/dist/cursor/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  50. package/dist/cursor/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  51. package/dist/cursor/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  52. package/dist/cursor/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  53. package/dist/cursor/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  54. package/dist/cursor/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  55. package/dist/cursor/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  56. package/dist/cursor/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  57. package/dist/cursor/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  58. package/dist/gemini/.agents/skills/jahia/SKILL.md +18 -10
  59. package/dist/gemini/.agents/skills/jahia-content/SKILL.md +102 -84
  60. package/dist/gemini/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  61. package/dist/gemini/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  62. package/dist/gemini/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  63. package/dist/gemini/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  64. package/dist/gemini/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  65. package/dist/gemini/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  66. package/dist/gemini/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  67. package/dist/gemini/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  68. package/dist/gemini/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  69. package/dist/gemini/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  70. package/dist/gemini/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  71. package/dist/gemini/AGENTS.md +2 -4
  72. package/dist/gemini/GEMINI.md +2 -2
  73. package/dist/opencode/.agents/skills/jahia/SKILL.md +18 -10
  74. package/dist/opencode/.agents/skills/jahia-content/SKILL.md +102 -84
  75. package/dist/opencode/.agents/skills/jahia-content-create-content/SKILL.md +255 -280
  76. package/dist/opencode/.agents/skills/jahia-content-explore-structure/SKILL.md +187 -96
  77. package/dist/opencode/.agents/skills/jahia-content-media-upload/SKILL.md +197 -0
  78. package/dist/opencode/.agents/skills/jahia-content-move-content/SKILL.md +160 -165
  79. package/dist/opencode/.agents/skills/jahia-content-organize/SKILL.md +209 -0
  80. package/dist/opencode/.agents/skills/jahia-content-publish/SKILL.md +181 -0
  81. package/dist/opencode/.agents/skills/jahia-content-query-content/SKILL.md +122 -92
  82. package/dist/opencode/.agents/skills/jahia-content-translate-content/SKILL.md +154 -225
  83. package/dist/opencode/.agents/skills/jahia-dev-cypress/SKILL.md +150 -330
  84. package/dist/opencode/.agents/skills/jahia-dev-query-content/SKILL.md +93 -296
  85. package/dist/opencode/.agents/skills/jahia-jcr-sql2/SKILL.md +258 -0
  86. package/dist/opencode/AGENTS.md +2 -4
  87. package/dist/windsurf/.windsurf/skills/jahia/SKILL.md +18 -10
  88. package/dist/windsurf/.windsurf/skills/jahia-content/SKILL.md +102 -84
  89. package/dist/windsurf/.windsurf/skills/jahia-content-create-content/SKILL.md +255 -280
  90. package/dist/windsurf/.windsurf/skills/jahia-content-explore-structure/SKILL.md +187 -96
  91. package/dist/windsurf/.windsurf/skills/jahia-content-media-upload/SKILL.md +197 -0
  92. package/dist/windsurf/.windsurf/skills/jahia-content-move-content/SKILL.md +160 -165
  93. package/dist/windsurf/.windsurf/skills/jahia-content-organize/SKILL.md +209 -0
  94. package/dist/windsurf/.windsurf/skills/jahia-content-publish/SKILL.md +181 -0
  95. package/dist/windsurf/.windsurf/skills/jahia-content-query-content/SKILL.md +122 -92
  96. package/dist/windsurf/.windsurf/skills/jahia-content-translate-content/SKILL.md +154 -225
  97. package/dist/windsurf/.windsurf/skills/jahia-dev-cypress/SKILL.md +150 -330
  98. package/dist/windsurf/.windsurf/skills/jahia-dev-query-content/SKILL.md +93 -296
  99. package/dist/windsurf/.windsurf/skills/jahia-jcr-sql2/SKILL.md +258 -0
  100. package/dist/windsurf/AGENTS.md +2 -4
  101. package/package.json +3 -3
@@ -0,0 +1,258 @@
1
+ ---
2
+ name: jahia-jcr-sql2
3
+ description: JCR-SQL2 reference for Jahia queries. Use when building, reviewing, or debugging SQL2 statements for content listings, full-text search, sorting, pagination, or Java back-end query code.
4
+ ---
5
+
6
+ # Skill: jahia-jcr-sql2
7
+
8
+ Use this skill when you need the JCR-SQL2 language itself: selectors, path constraints, filters, ordering, full-text syntax, joins, pagination rules, and performance guardrails.
9
+
10
+ ---
11
+
12
+ ## When to use JCR-SQL2
13
+
14
+ JCR-SQL2 is the standard Jahia query language for:
15
+
16
+ - listing pages or content with filtering and sorting
17
+ - querying a folder subtree
18
+ - searching by property value, date, or reference
19
+ - full-text search across indexed content
20
+ - back-end Java code using `QueryManagerWrapper`
21
+ - template-set listings that use `useJCRQuery` or the Page Builder query component
22
+
23
+ ---
24
+
25
+ ## Basic syntax
26
+
27
+ ### Select by node type
28
+
29
+ ```sql
30
+ SELECT * FROM [jnt:page] AS page
31
+ SELECT * FROM [jnt:content] AS content
32
+ SELECT * FROM [jnt:file] AS file
33
+ ```
34
+
35
+ The selector matches the named type and its subtypes.
36
+
37
+ ### Common node types
38
+
39
+ | Type | Meaning |
40
+ |------|---------|
41
+ | `jnt:page` | pages |
42
+ | `jnt:content` | editorial content |
43
+ | `jnt:file` | files |
44
+ | `jnt:virtualsite` | sites |
45
+ | `jmix:searchable` | general searchable content |
46
+ | `nt:base` | all nodes — avoid unless paired with a strict path |
47
+
48
+ ---
49
+
50
+ ## Path constraints
51
+
52
+ ### Recursive subtree
53
+
54
+ ```sql
55
+ SELECT * FROM [jnt:page] AS page
56
+ WHERE ISDESCENDANTNODE(page, '/sites/luxe/home')
57
+ ```
58
+
59
+ ### Direct children only
60
+
61
+ ```sql
62
+ SELECT * FROM [jnt:page] AS page
63
+ WHERE ISCHILDNODE(page, '/sites/luxe/home')
64
+ ```
65
+
66
+ **Guardrail:** always constrain by path to avoid repository-wide scans.
67
+
68
+ ---
69
+
70
+ ## Property constraints
71
+
72
+ ### Exact match
73
+
74
+ ```sql
75
+ WHERE page.[j:templateName] = 'home'
76
+ WHERE node.[jcr:title] = 'My Title'
77
+ ```
78
+
79
+ ### Pattern match
80
+
81
+ ```sql
82
+ WHERE node.[jcr:title] LIKE '%keyword%'
83
+ WHERE node.[j:nodename] LIKE '%.png'
84
+ ```
85
+
86
+ ### Null checks
87
+
88
+ ```sql
89
+ WHERE page.[jcr:title] IS NOT NULL
90
+ ```
91
+
92
+ ### Boolean
93
+
94
+ ```sql
95
+ WHERE node.[j:published] = CAST('true' AS BOOLEAN)
96
+ ```
97
+
98
+ ### Date comparison
99
+
100
+ ```sql
101
+ WHERE page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
102
+ ```
103
+
104
+ Use the millisecond form `yyyy-MM-dd'T'HH:mm:ss.SSSX` for SQL2 date casts.
105
+
106
+ ### Multiple conditions
107
+
108
+ ```sql
109
+ WHERE ISDESCENDANTNODE(page, '/sites/luxe')
110
+ AND page.[jcr:lastModified] > CAST('2026-01-01T00:00:00.000Z' AS DATE)
111
+ ```
112
+
113
+ ### OR conditions
114
+
115
+ ```sql
116
+ WHERE node.[jcr:primaryType] = 'jnt:bigText'
117
+ OR node.[jcr:primaryType] = 'jnt:article'
118
+ ```
119
+
120
+ ---
121
+
122
+ ## Ordering
123
+
124
+ ```sql
125
+ ORDER BY page.[jcr:lastModified] DESC
126
+ ORDER BY page.[jcr:created] ASC
127
+ ORDER BY node.[jcr:title]
128
+ ```
129
+
130
+ Multiple columns:
131
+
132
+ ```sql
133
+ ORDER BY page.[j:templateName] ASC, page.[jcr:lastModified] DESC
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Full-text search
139
+
140
+ ### Search indexed content
141
+
142
+ ```sql
143
+ WHERE CONTAINS(node.*, 'digital')
144
+ ```
145
+
146
+ ### Search one property
147
+
148
+ ```sql
149
+ WHERE CONTAINS(node.[jcr:title], 'welcome')
150
+ ```
151
+
152
+ ### Expression syntax
153
+
154
+ | Syntax | Meaning |
155
+ |--------|---------|
156
+ | `term` | must contain the term |
157
+ | `term1 term2` | implicit AND |
158
+ | `term1 OR term2` | either term |
159
+ | `"exact phrase"` | exact phrase |
160
+ | `-term` | exclude term |
161
+
162
+ ### Relevance sort
163
+
164
+ ```sql
165
+ SELECT * FROM [jnt:content] AS n
166
+ WHERE ISDESCENDANTNODE(n, '/sites/luxe')
167
+ AND CONTAINS(n.*, 'digital')
168
+ ORDER BY SCORE(n) DESC
169
+ ```
170
+
171
+ Combine full-text with path constraints for performance.
172
+
173
+ ---
174
+
175
+ ## Joins
176
+
177
+ ```sql
178
+ SELECT * FROM [jnt:imageReferenceLink] AS img
179
+ INNER JOIN [jnt:file] AS file
180
+ ON img.[j:node] = file.[jcr:uuid]
181
+ WHERE img.[j:node] = 'UUID'
182
+ ```
183
+
184
+ Jahia supports inner joins, but keep them focused and path-constrained whenever possible.
185
+
186
+ ---
187
+
188
+ ## Using SQL2 in Jahia code
189
+
190
+ ### Template-set listing with `useJCRQuery`
191
+
192
+ ```tsx
193
+ const posts = useJCRQuery({
194
+ query: `SELECT * FROM [namespace:blogPost] AS post
195
+ WHERE ISDESCENDANTNODE(post, '/sites/${siteKey}/contents/blog')
196
+ ORDER BY post.[publicationDate] DESC`,
197
+ });
198
+ ```
199
+
200
+ ### Java back-end query execution
201
+
202
+ ```java
203
+ QueryManagerWrapper qm = session.getWorkspace().getQueryManager();
204
+ QueryWrapper query = qm.createQuery(sql2Statement, Query.JCR_SQL2);
205
+ query.setLimit(limit);
206
+ query.setOffset(offset);
207
+ JCRNodeIteratorWrapper nodes = query.execute().getNodes();
208
+ ```
209
+
210
+ **Guardrail:** never embed `LIMIT` or `OFFSET` inside the SQL2 string. Use `setLimit()` and `setOffset()`.
211
+
212
+ ---
213
+
214
+ ## Security and validation
215
+
216
+ ### Escape user input
217
+
218
+ In Java back-end code, escape user-provided values with `JCRContentUtils.sqlEncode()` before interpolating them into a SQL2 string.
219
+
220
+ ```java
221
+ String safeValue = JCRContentUtils.sqlEncode(userInput);
222
+ ```
223
+
224
+ ### Validate dynamic sort fields
225
+
226
+ If a user can choose the sort field, validate it against a whitelist before interpolating it into `ORDER BY`.
227
+
228
+ ---
229
+
230
+ ## Performance best practices
231
+
232
+ 1. Always constrain by path.
233
+ 2. Use the most specific node type possible.
234
+ 3. Keep result sets small.
235
+ 4. Prefer indexed equality filters over broad `LIKE '%...%'` patterns.
236
+ 5. Use full-text sparingly on large trees.
237
+ 6. Sort on common indexed fields such as `jcr:lastModified` or `jcr:created`.
238
+ 7. Cap API result limits to a sane maximum.
239
+
240
+ ---
241
+
242
+ ## Quick checklist
243
+
244
+ - [ ] Query has a path constraint
245
+ - [ ] Node type is specific
246
+ - [ ] Sort field is intentional and safe
247
+ - [ ] Full-text is combined with a subtree path
248
+ - [ ] Dates use `yyyy-MM-dd'T'HH:mm:ss.SSSX`
249
+ - [ ] Java code uses `setLimit()` and `setOffset()` instead of inline SQL clauses
250
+
251
+ ---
252
+
253
+ ## Related skills
254
+
255
+ - `/jahia-dev-query-content` — apply SQL2 inside Page Builder queries and JS module views
256
+ - `/jahia-dev-define-content-type` — define the content types you will query
257
+ - `/jahia-java-jcr` — implement back-end JCR logic around the query
258
+
@@ -1,13 +1,11 @@
1
1
  # CLAUDE.md
2
2
  <!-- Generated by APM CLI -->
3
- <!-- Build ID: e1dda0152472 -->
4
- <!-- APM Version: 0.14.1 -->
3
+ <!-- Build ID: 3e845c4f03a9 -->
5
4
 
6
5
  # Project Standards
7
6
 
8
7
  ## Global Instructions
9
8
 
10
- <!-- Source: local .apm/instructions/jahia.instructions.md -->
11
9
  # Jahia JavaScript Module Development
12
10
 
13
11
  ## Context
@@ -86,7 +84,3 @@ When Jahia is running at `http://localhost:8080` (default credentials: `root` /
86
84
  - **GraphQL playground**: http://localhost:8080/modules/graphql
87
85
  - **JCR browser**: http://localhost:8080/modules/tools/jcrBrowser.jsp
88
86
  - **Definitions browser**: http://localhost:8080/modules/tools/definitionsBrowser.jsp
89
-
90
- ---
91
- *This file was generated by APM CLI. Do not edit manually.*
92
- *To regenerate: `apm compile`*
@@ -1,13 +1,14 @@
1
1
  ---
2
2
  name: jahia
3
- description: Top-level entry point for ALL Jahia tasks. Detects whether the request is about building a module (dev) or managing content (CMS), and delegates to the right skill or combination. Start here if unsure which Jahia skill to use.
4
- allowed-tools: Bash, Read
3
+ description: Top-level entry point for ALL Jahia tasks. Detects whether the request is about building a module (dev) or managing content (CMS via MCP tools), and delegates to the right skill or combination. Start here if unsure which Jahia skill to use.
5
4
  ---
6
5
 
7
6
  # Jahia — Universal Entry Point
8
7
 
9
8
  You are the top-level GPS for all Jahia work. Your job is to understand what the user wants to accomplish, then delegate to the right skill(s) — `/jahia-dev`, `/jahia-content`, or both in sequence.
10
9
 
10
+ > **Content operations use MCP tools** via the `jahia` MCP server. Never call Jahia's GraphQL API directly for content creation, querying, or structure discovery — use the MCP tools instead.
11
+
11
12
  ---
12
13
 
13
14
  ## Step 1 — Classify the request
@@ -62,8 +63,8 @@ Use these recipes as starting points when the task maps to a known pattern.
62
63
  ```
63
64
  1. /jahia-dev-build-component → define the content type + create the view
64
65
  2. /jahia-dev-create-page-template → (if a new page layout is needed)
65
- 3. /jahia-content-create-content → populate the section with real or dummy content
66
- 4. /jahia-content-move-content → (if existing content needs to be reorganized)
66
+ 3. /jahia-content-create-content → create the site if needed, then populate the section with content
67
+ 4. /jahia-content-organize → (if existing content needs to be reorganized)
67
68
  ```
68
69
 
69
70
  ### "Add an article to the site"
@@ -71,7 +72,8 @@ Use these recipes as starting points when the task maps to a known pattern.
71
72
  1. Check the CND — does the article content type exist?
72
73
  → Yes: jump to step 2
73
74
  → No: /jahia-dev-define-content-type + /jahia-dev-create-view first
74
- 2. /jahia-content-create-content → create the article node + set properties + publish
75
+ 2. /jahia-content-create-content → create the article node + set properties
76
+ 3. /jahia-content-publish → publish it to LIVE
75
77
  ```
76
78
 
77
79
  ### "Redesign the layout of a page"
@@ -88,8 +90,9 @@ Use these recipes as starting points when the task maps to a known pattern.
88
90
  2. /jahia-dev-start-local → start Jahia locally
89
91
  3. /jahia-dev-build-component → build content types + views (repeat per component)
90
92
  4. /jahia-dev-create-page-template → create page templates
91
- 5. /jahia-content-create-content → populate with articles, pages, folders
92
- 6. /jahia-dev-review catch issues before shipping
93
+ 5. /jahia-content-create-content → use `site.templateSets` + `site.create`, then add pages and content
94
+ 6. /jahia-content-publish publish the site content
95
+ 7. /jahia-dev-review → catch issues before shipping
93
96
  ```
94
97
 
95
98
  ---
@@ -124,11 +127,16 @@ Always print this at the end so the user can jump anywhere:
124
127
  ### 📝 Content Management (/jahia-content and sub-skills)
125
128
  /jahia-content Detect site state, route to content operations ← start here
126
129
  /jahia-content-explore-structure Map content types, properties, enums & mixins on an unknown site
127
- /jahia-content-query-content Query and audit content via GraphQL
128
- /jahia-content-create-content Create nodes, folders, articles, bulk-populate
129
- /jahia-content-move-content Restructure the content tree: move, rename, reorder
130
+ /jahia-content-query-content Query and audit content via MCP tools
131
+ /jahia-content-create-content Create sites, pages, nodes, folders, and articles
132
+ /jahia-content-media-upload Upload files and images into Jahia media storage
133
+ /jahia-content-organize Restructure the tree: move, copy, rename, reorder, delete
134
+ /jahia-content-move-content Focused move/reorder/delete workflow for an existing branch
135
+ /jahia-content-translate-content Translate i18n content and page titles
136
+ /jahia-content-publish Publish, unpublish, and inspect publication status
130
137
  ### 📚 Knowledge Reference
131
138
  /jahia-dev-java OSGi DS, CND definitions, JSP rendering, Drools rules, Content Editor/jContent UI
139
+ /jahia-jcr-sql2 JCR-SQL2 syntax, filtering, full-text, joins, and pagination guardrails
132
140
  /jahia-dev-apis GraphQL, JCR Java/REST API, OAuth/SAML, personal tokens, HTML filtering, CSP
133
141
  /jahia-dev-ops Docker Compose, Kubernetes, health monitoring, Karaf, provisioning YAML API
134
142
  /jahia-dev-properties jahia.properties and OSGi .cfg configuration keys reference
@@ -1,139 +1,157 @@
1
1
  ---
2
2
  name: jahia-content
3
- description: Entry point for managing content on a running Jahia website via the GraphQL API. Detects the current site state and routes to the right sub-skill. Use for any task involving creating, querying, moving, updating, or publishing JCR content.
3
+ description: Entry point for creating sites, authoring pages, querying content, reorganizing nodes, uploading media, translating, and publishing a Jahia website via MCP tools.
4
4
  ---
5
5
 
6
6
  # Jahia Content — Content Management GPS
7
7
 
8
- You are the entry point for managing content on a live Jahia instance. Your job is to understand what the user needs, assess the current site state, and route to the right sub-skill.
8
+ You are the entry point for content work on a live Jahia instance. Understand the request, assess the site state, and route to the right content skill.
9
+
10
+ > **Never call Jahia's GraphQL API directly for content operations.** Use only MCP tools via the `jahia` MCP server. If a capability is missing, report it — do not work around with curl/GraphQL.
9
11
 
10
12
  ---
11
13
 
12
- ## Step 1 — Verify Jahia is reachable
14
+ ## Step 1 — Verify the MCP connection
15
+
16
+ Confirm the `jahia` MCP server is available:
13
17
 
14
- ```bash
15
- curl -s -o /dev/null -w "%{http_code}" http://localhost:8080/cms/login
18
+ ```
19
+ tool: site.list
16
20
  ```
17
21
 
18
- - `200` Jahia is running
19
- - Anything else → Jahia is not running. Tell the user: **"Please start Jahia first (use `/jahia-dev-start-local` if needed)."**
22
+ If this fails, Jahia or the MCP connection is not ready.
20
23
 
21
24
  ---
22
25
 
23
- ## Step 2 — Detect site state
26
+ ## Step 2 — Detect the site state
24
27
 
25
- Run both checks in parallel to understand what's currently in the CMS:
28
+ Run these checks to understand what exists already:
26
29
 
27
30
  ### A. List available sites
28
- ```bash
29
- curl -s -u root:root1234 \
30
- -H "Content-Type: application/json" \
31
- -H "Origin: http://localhost:8080" \
32
- -X POST http://localhost:8080/modules/graphql \
33
- -d '{"query":"{ jcr { nodeByPath(path: \"/sites\") { children { nodes { name } } } } }"}'
31
+
32
+ ```
33
+ tool: site.list
34
34
  ```
35
35
 
36
- ### B. List top-level content folders
37
- ```bash
38
- curl -s -u root:root1234 \
39
- -H "Content-Type: application/json" \
40
- -H "Origin: http://localhost:8080" \
41
- -X POST http://localhost:8080/modules/graphql \
42
- -d '{"query":"{ jcr { nodeByPath(path: \"/sites/mySite/contents\") { children { nodes { name primaryNodeType { name } } } } } }"}'
36
+ ### B. Discover installed template sets for new site creation
37
+
38
+ ```
39
+ tool: site.templateSets
40
+ args: {}
43
41
  ```
44
42
 
45
- > Replace `mySite` with the actual site key if different.
43
+ ### C. If a site exists, list its pages
44
+
45
+ ```
46
+ tool: page.list
47
+ args: { "siteKey": "SITE_KEY" }
48
+ ```
46
49
 
47
50
  ---
48
51
 
49
- ## Step 3 — Report site state
52
+ ## Step 3 — Report the CMS state
53
+
54
+ Summarize what you found:
50
55
 
51
56
  ```
52
- 🌐 Jahia: running at http://localhost:8080
53
- 📁 Sites: <list site keys>
54
- 📂 Content root: <list folder names under /contents>
57
+ 🌐 Jahia MCP: connected
58
+ 📁 Sites: <site keys>
59
+ 🧱 Template sets: <installed template sets>
60
+ 📄 Pages: <page titles and templates for the chosen site>
55
61
  ```
56
62
 
57
63
  ---
58
64
 
59
65
  ## Step 4 — Route to the right sub-skill
60
66
 
61
- Use the task description to pick the right skill(s):
62
-
63
- | What the user wants to do | Skill |
64
- |---------------------------|-------|
65
- | Explore an unknown site's content types, property names, enum values, mixins | **`/jahia-content-explore-structure`** |
66
- | Find out what content exists, audit the tree, run a search | **`/jahia-content-query-content`** |
67
- | Create pages, articles, tutorials, folders, populate a site | **`/jahia-content-create-content`** |
68
- | Move, rename, restructure content into sub-folders | **`/jahia-content-move-content`** |
69
- | Translate existing content to another language | **`/jahia-content-translate-content`** |
70
- | Publish content to the live site | Use `publish` mutation (see below) |
71
- | Delete content | Use `deleteNode` mutation (see below) |
72
- | Do several of the above in sequence | Run the skills in order — start with **explore-structure** if site is unfamiliar, then create or move |
67
+ | User intent | Skill |
68
+ |-------------|-------|
69
+ | Explore an unknown site, map areas, inspect types and properties | `/jahia-content-explore-structure` |
70
+ | Create a brand-new site before authoring content | `/jahia-content-create-content` using `site.templateSets` and `site.create` |
71
+ | Create pages, content, or structured trees on an existing site | `/jahia-content-create-content` |
72
+ | Upload files and images to `/sites/<siteKey>/files` | `/jahia-content-media-upload` |
73
+ | Find, inspect, or audit existing content | `/jahia-content-query-content` |
74
+ | Move, copy, rename, reorder, or delete content | `/jahia-content-organize` |
75
+ | Translate content to another locale | `/jahia-content-translate-content` |
76
+ | Publish, unpublish, or check readiness | `/jahia-content-publish` |
77
+ | Do several of the above in sequence | Start with `/jahia-content-explore-structure` if the site is unfamiliar |
73
78
 
74
79
  ---
75
80
 
76
- ## Step 5 — Direct patterns for one-off operations
81
+ ## Direct MCP patterns
77
82
 
78
- Use these when the task is simple enough to not need a full sub-skill.
83
+ ### Create a site before authoring pages
79
84
 
80
- ### Publish a node (and all its children)
81
- ```bash
82
- curl -s -u root:root1234 \
83
- -H "Content-Type: application/json" \
84
- -H "Origin: http://localhost:8080" \
85
- -X POST http://localhost:8080/modules/graphql \
86
- -d '{"query":"mutation { jcr { mutateNode(pathOrId: \"/sites/mySite/contents/articles\") { publish(languages: [\"en\"]) } } }"}'
87
85
  ```
86
+ tool: site.templateSets
87
+ args: {}
88
+
89
+ tool: site.create
90
+ args: {
91
+ "siteKey": "brandSite",
92
+ "title": "Brand Site",
93
+ "templateSet": "digitall",
94
+ "defaultLanguage": "en",
95
+ "languages": ["en", "fr"],
96
+ "serverName": "brand.local"
97
+ }
98
+ ```
99
+
100
+ ### Publish a page or subtree
88
101
 
89
- ### Publish all content at once
90
- ```bash
91
- curl -s -u root:root1234 \
92
- -H "Content-Type: application/json" \
93
- -H "Origin: http://localhost:8080" \
94
- -X POST http://localhost:8080/modules/graphql \
95
- -d '{"query":"mutation { jcr { mutateNodesByQuery(query: \"SELECT * FROM [jnt:content] WHERE ISDESCENDANTNODE(\u0027/sites/mySite/contents\u0027)\", queryLanguage: SQL2) { publish(languages: [\"en\"]) } } }"}'
96
102
  ```
103
+ tool: publication.publish
104
+ args: {
105
+ "path": "/sites/SITE_KEY/home/about",
106
+ "languages": ["en"]
107
+ }
108
+ ```
109
+
110
+ ### Unpublish a page or subtree
97
111
 
98
- ### Delete a node
99
- ```bash
100
- curl -s -u root:root1234 \
101
- -H "Content-Type: application/json" \
102
- -H "Origin: http://localhost:8080" \
103
- -X POST http://localhost:8080/modules/graphql \
104
- -d '{"query":"mutation { jcr { mutateNode(pathOrId: \"/sites/mySite/contents/articles/old-article\") { delete } } }"}'
112
+ ```
113
+ tool: publication.unpublish
114
+ args: {
115
+ "path": "/sites/SITE_KEY/home/about",
116
+ "languages": ["en"]
117
+ }
105
118
  ```
106
119
 
107
- ### Update a property on an existing node
108
- ```bash
109
- curl -s -u root:root1234 \
110
- -H "Content-Type: application/json" \
111
- -H "Origin: http://localhost:8080" \
112
- -X POST http://localhost:8080/modules/graphql \
113
- -d '{"query":"mutation { jcr { mutateNode(pathOrId: \"/sites/mySite/contents/articles/my-article\") { mutateProperty(name: \"jcr:title\") { setValue(language: \"en\", value: \"Updated Title\") } } } }"}'
120
+ ### Delete a published node correctly
121
+
122
+ ```
123
+ tool: content.markForDeletion
124
+ args: { "path": "/sites/SITE_KEY/home/old-page" }
125
+
126
+ tool: publication.publish
127
+ args: {
128
+ "path": "/sites/SITE_KEY/home/old-page",
129
+ "languages": ["en"]
130
+ }
114
131
  ```
115
132
 
116
133
  ---
117
134
 
118
- ## Step 6 — Print the full CMS skill map
119
-
120
- Always print this at the end so the user can navigate anywhere:
135
+ ## Full skill map
121
136
 
122
137
  ```
123
- ## Jahia Content Skills
124
-
125
- /jahia-content-explore-structure Map content types, properties, enums, mixins on an unknown site ← start here
126
- /jahia-content-query-content List, inspect, and search content via GraphQL
127
- /jahia-content-create-content Create nodes, folders, articles, and bulk-populate a site
128
- /jahia-content-move-content Restructure the content tree: move, rename, reorder nodes
129
- /jahia-content-translate-content Translate existing nodes to a new language and publish
138
+ /jahia-content-explore-structure Map sites, template sets, pages, areas, and content definitions
139
+ /jahia-content-create-content Create sites, pages, content nodes, and structured trees
140
+ /jahia-content-media-upload Upload media and reference it from content
141
+ /jahia-content-query-content List, inspect, and search content via MCP tools
142
+ /jahia-content-organize Move, copy, rename, reorder, mark for deletion, and delete content
143
+ /jahia-content-move-content Focused move/reorder/delete workflow for an existing content tree
144
+ /jahia-content-translate-content Translate i18n content and page titles
145
+ /jahia-content-publish Check publication status, publish, unpublish, and handle workflow
130
146
  ```
131
147
 
132
148
  ---
133
149
 
134
- ## Critical rules (always enforce)
150
+ ## Critical rules
151
+
152
+ - Always use MCP tools — never GraphQL directly
153
+ - Use `site.templateSets` and `site.create` when the requested site does not exist yet
154
+ - Always pass `locale` to content creation and update calls
155
+ - Always publish after creating, moving, deleting, or translating content
156
+ - Always explore with `/jahia-content-explore-structure` before authoring on an unfamiliar site
135
157
 
136
- - Always include `-H "Origin: http://localhost:8080"` in every curl — omitting it causes `Permission denied`
137
- - Always use `language: "en"` (or the site's language) for `i18n` properties (`jcr:title` on folders with `mix:title`, richtext body, etc.)
138
- - Always publish after creating or moving content — JCR writes to the **default workspace** only; live visitors see the **live workspace**
139
- - Mandatory fields (e.g. `body`) must be set **before** other properties on the same node in a new locale