myaidev-method 0.0.7 → 0.0.8
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/.claude/CLAUDE.md +52 -0
- package/.claude/agents/content-writer.md +155 -0
- package/.claude/commands/myai-configure.md +44 -0
- package/.claude/commands/myai-content-writer.md +78 -0
- package/.claude/commands/myai-wordpress-publish.md +120 -0
- package/.claude/mcp/gutenberg-converter.js +447 -0
- package/.claude/mcp/mcp-config.json +101 -0
- package/.claude/mcp/wordpress-server-simple.js +182 -0
- package/.claude/mcp/wordpress-server.js +1277 -0
- package/.claude/settings.local.json +12 -0
- package/README.md +4 -4
- package/bin/cli.js +17 -22
- package/dist/mcp/gutenberg-converter.js +447 -0
- package/dist/mcp/mcp-config.json +101 -0
- package/dist/mcp/wordpress-server-simple.js +182 -0
- package/dist/mcp/wordpress-server.js +1277 -0
- package/package.json +16 -3
- package/src/mcp/health-check.js +190 -0
- package/src/mcp/mcp-launcher.js +237 -0
- package/src/templates/claude/agents/wordpress-admin.md +228 -271
- package/src/templates/claude/commands/myai-configure.md +10 -74
- package/src/templates/claude/commands/myai-wordpress-publish.md +16 -8
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: myai-wordpress-publish
|
|
3
|
-
description: Publish markdown content to WordPress as draft or live post
|
|
4
|
-
tools: Read, Task, WebFetch
|
|
3
|
+
description: Publish markdown content to WordPress as draft or live post using native tools
|
|
4
|
+
tools: Read, Task, WebFetch, Bash
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
Publish the specified markdown file to WordPress using the
|
|
7
|
+
Publish the specified markdown file to WordPress using native tools and the WordPress REST API.
|
|
8
8
|
|
|
9
9
|
## Task
|
|
10
10
|
Read and publish the file specified in $ARGUMENTS to WordPress.
|
|
@@ -19,16 +19,24 @@ Read and publish the file specified in $ARGUMENTS to WordPress.
|
|
|
19
19
|
- tags
|
|
20
20
|
- category
|
|
21
21
|
- use_gutenberg (optional, default: false)
|
|
22
|
-
3. **
|
|
22
|
+
3. **Load WordPress configuration** from `.env` file:
|
|
23
23
|
- WORDPRESS_URL
|
|
24
24
|
- WORDPRESS_USERNAME
|
|
25
25
|
- WORDPRESS_APP_PASSWORD
|
|
26
26
|
- WORDPRESS_USE_GUTENBERG (optional, default: false)
|
|
27
|
-
4. **
|
|
28
|
-
5. **Convert content format** if Gutenberg is enabled:
|
|
27
|
+
4. **Convert content format** if Gutenberg is enabled:
|
|
29
28
|
- If use_gutenberg is true or WORDPRESS_USE_GUTENBERG is true
|
|
30
|
-
- Convert HTML to Gutenberg block format
|
|
31
|
-
|
|
29
|
+
- Convert HTML to Gutenberg block format using patterns:
|
|
30
|
+
* `<!-- wp:paragraph --><p>content</p><!-- /wp:paragraph -->`
|
|
31
|
+
* `<!-- wp:heading {"level":2} --><h2>title</h2><!-- /wp:heading -->`
|
|
32
|
+
5. **Create categories and tags** if they don't exist using WordPress REST API
|
|
33
|
+
6. **Publish the post** using curl with Basic Authentication:
|
|
34
|
+
```bash
|
|
35
|
+
curl -X POST "${WORDPRESS_URL}/wp-json/wp/v2/posts" \
|
|
36
|
+
-H "Authorization: Basic $(echo -n "${USERNAME}:${APP_PASSWORD}" | base64)" \
|
|
37
|
+
-H "Content-Type: application/json" \
|
|
38
|
+
-d '{"title":"Post Title","content":"Content","status":"draft"}'
|
|
39
|
+
```
|
|
32
40
|
7. **Report the result** including:
|
|
33
41
|
- Post ID
|
|
34
42
|
- Preview URL
|