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.
@@ -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 configured MCP integration.
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. **Check WordPress configuration** in environment variables:
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. **Connect to WordPress** using the REST API
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
- 6. **Create or update the post** with status (default: draft)
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