claude-plugin-wordpress-manager 2.4.0 → 2.6.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/.claude-plugin/plugin.json +10 -3
- package/CHANGELOG.md +42 -0
- package/agents/wp-content-strategist.md +104 -0
- package/docs/GUIDE.md +183 -23
- package/package.json +12 -3
- package/servers/wp-rest-bridge/build/tools/comments.d.ts +6 -6
- package/servers/wp-rest-bridge/build/tools/gsc.d.ts +3 -0
- package/servers/wp-rest-bridge/build/tools/gsc.js +354 -0
- package/servers/wp-rest-bridge/build/tools/index.d.ts +38 -38
- package/servers/wp-rest-bridge/build/tools/index.js +3 -0
- package/servers/wp-rest-bridge/build/tools/media.d.ts +2 -2
- package/servers/wp-rest-bridge/build/tools/multisite-sites.d.ts +2 -2
- package/servers/wp-rest-bridge/build/tools/plugin-repository.d.ts +1 -1
- package/servers/wp-rest-bridge/build/tools/search.d.ts +2 -2
- package/servers/wp-rest-bridge/build/tools/unified-content.d.ts +8 -8
- package/servers/wp-rest-bridge/build/tools/unified-taxonomies.d.ts +4 -4
- package/servers/wp-rest-bridge/build/tools/users.d.ts +6 -6
- package/servers/wp-rest-bridge/build/tools/wc-coupons.d.ts +1 -1
- package/servers/wp-rest-bridge/build/tools/wc-customers.d.ts +3 -3
- package/servers/wp-rest-bridge/build/tools/wc-orders.d.ts +4 -4
- package/servers/wp-rest-bridge/build/tools/wc-products.d.ts +8 -8
- package/servers/wp-rest-bridge/build/tools/wc-webhooks.d.ts +4 -4
- package/servers/wp-rest-bridge/build/wordpress.d.ts +5 -0
- package/servers/wp-rest-bridge/build/wordpress.js +39 -0
- package/servers/wp-rest-bridge/package.json +1 -0
- package/skills/wordpress-router/references/decision-tree.md +6 -2
- package/skills/wp-content/SKILL.md +1 -0
- package/skills/wp-content-attribution/SKILL.md +2 -0
- package/skills/wp-content-optimization/SKILL.md +172 -0
- package/skills/wp-content-optimization/references/content-freshness.md +234 -0
- package/skills/wp-content-optimization/references/headline-optimization.md +171 -0
- package/skills/wp-content-optimization/references/meta-optimization.md +243 -0
- package/skills/wp-content-optimization/references/readability-analysis.md +201 -0
- package/skills/wp-content-optimization/references/seo-content-scoring.md +245 -0
- package/skills/wp-content-optimization/scripts/content_optimization_inspect.mjs +237 -0
- package/skills/wp-monitoring/SKILL.md +1 -0
- package/skills/wp-programmatic-seo/SKILL.md +2 -0
- package/skills/wp-search-console/SKILL.md +121 -0
- package/skills/wp-search-console/references/competitor-gap-analysis.md +226 -0
- package/skills/wp-search-console/references/content-seo-feedback.md +181 -0
- package/skills/wp-search-console/references/gsc-setup.md +110 -0
- package/skills/wp-search-console/references/indexing-management.md +182 -0
- package/skills/wp-search-console/references/keyword-tracking.md +181 -0
- package/skills/wp-search-console/scripts/search_console_inspect.mjs +178 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* search_console_inspect.mjs — Detect Google Search Console configuration readiness.
|
|
3
|
+
*
|
|
4
|
+
* Checks WP_SITES_CONFIG for GSC credentials, sitemaps, robots.txt,
|
|
5
|
+
* and SEO plugin presence.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* node search_console_inspect.mjs [--cwd=/path/to/project]
|
|
9
|
+
*
|
|
10
|
+
* Exit codes:
|
|
11
|
+
* 0 — GSC or SEO configuration found
|
|
12
|
+
* 1 — no GSC or SEO configuration found
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { readFileSync, existsSync, readdirSync } from 'node:fs';
|
|
16
|
+
import { join, resolve } from 'node:path';
|
|
17
|
+
import { argv, stdout, exit } from 'node:process';
|
|
18
|
+
|
|
19
|
+
// ---------------------------------------------------------------------------
|
|
20
|
+
// Helpers
|
|
21
|
+
// ---------------------------------------------------------------------------
|
|
22
|
+
|
|
23
|
+
function readFileSafe(filePath) {
|
|
24
|
+
try { return readFileSync(filePath, 'utf-8'); } catch { return null; }
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function existsSafe(filePath) {
|
|
28
|
+
try { return existsSync(filePath); } catch { return false; }
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function globDir(dirPath) {
|
|
32
|
+
try { return readdirSync(dirPath); } catch { return []; }
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Detectors
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
|
|
39
|
+
function detectGSCConfig() {
|
|
40
|
+
const gsc = { configured: false, indicators: [] };
|
|
41
|
+
|
|
42
|
+
const raw = process.env.WP_SITES_CONFIG;
|
|
43
|
+
if (!raw) return gsc;
|
|
44
|
+
|
|
45
|
+
let sites;
|
|
46
|
+
try { sites = JSON.parse(raw); } catch { return gsc; }
|
|
47
|
+
if (!Array.isArray(sites)) return gsc;
|
|
48
|
+
|
|
49
|
+
for (const site of sites) {
|
|
50
|
+
const label = site.name || site.url || 'unknown';
|
|
51
|
+
|
|
52
|
+
if (site.gsc_service_account_key) {
|
|
53
|
+
gsc.configured = true;
|
|
54
|
+
gsc.indicators.push(`gsc_service_account_key configured for ${label}`);
|
|
55
|
+
}
|
|
56
|
+
if (site.gsc_site_url) {
|
|
57
|
+
gsc.configured = true;
|
|
58
|
+
gsc.indicators.push(`gsc_site_url configured for ${label}`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return gsc;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function detectSitemaps(cwd) {
|
|
66
|
+
const indicators = [];
|
|
67
|
+
const sitemapPaths = [
|
|
68
|
+
'sitemap.xml',
|
|
69
|
+
'sitemap_index.xml',
|
|
70
|
+
'wp-sitemap.xml',
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
for (const sitemapFile of sitemapPaths) {
|
|
74
|
+
if (existsSafe(join(cwd, sitemapFile))) {
|
|
75
|
+
indicators.push(`sitemap: ${sitemapFile}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return { found: indicators.length > 0, indicators };
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function detectRobotsTxt(cwd) {
|
|
83
|
+
const indicators = [];
|
|
84
|
+
const robotsPath = join(cwd, 'robots.txt');
|
|
85
|
+
|
|
86
|
+
if (!existsSafe(robotsPath)) {
|
|
87
|
+
return { found: false, indicators };
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
indicators.push('robots.txt exists');
|
|
91
|
+
|
|
92
|
+
const content = readFileSafe(robotsPath);
|
|
93
|
+
if (content) {
|
|
94
|
+
const lower = content.toLowerCase();
|
|
95
|
+
if (lower.includes('sitemap:') || lower.includes('sitemap_index')) {
|
|
96
|
+
indicators.push('robots.txt references sitemap');
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
return { found: true, indicators };
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function detectSEOPlugins(cwd) {
|
|
104
|
+
const indicators = [];
|
|
105
|
+
const plugins = globDir(join(cwd, 'wp-content', 'plugins'));
|
|
106
|
+
|
|
107
|
+
const seoPlugins = [
|
|
108
|
+
{ dir: 'wordpress-seo', name: 'Yoast SEO' },
|
|
109
|
+
{ dir: 'seo-by-rank-math', name: 'RankMath' },
|
|
110
|
+
{ dir: 'all-in-one-seo-pack', name: 'AIOSEO' },
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
for (const plugin of plugins) {
|
|
114
|
+
const pluginLower = plugin.toLowerCase();
|
|
115
|
+
for (const seo of seoPlugins) {
|
|
116
|
+
if (pluginLower.includes(seo.dir)) {
|
|
117
|
+
indicators.push(`seo_plugin: ${seo.name} (${plugin})`);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return { found: indicators.length > 0, indicators };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// ---------------------------------------------------------------------------
|
|
126
|
+
// Main
|
|
127
|
+
// ---------------------------------------------------------------------------
|
|
128
|
+
|
|
129
|
+
function main() {
|
|
130
|
+
const cwdArg = argv.find(a => a.startsWith('--cwd='));
|
|
131
|
+
const cwd = cwdArg ? resolve(cwdArg.split('=')[1]) : process.cwd();
|
|
132
|
+
|
|
133
|
+
const gsc = detectGSCConfig();
|
|
134
|
+
const sitemaps = detectSitemaps(cwd);
|
|
135
|
+
const robots_txt = detectRobotsTxt(cwd);
|
|
136
|
+
const seo_plugins = detectSEOPlugins(cwd);
|
|
137
|
+
|
|
138
|
+
const found = gsc.configured || sitemaps.found || robots_txt.found || seo_plugins.found;
|
|
139
|
+
|
|
140
|
+
const recommendations = [];
|
|
141
|
+
|
|
142
|
+
if (gsc.configured) {
|
|
143
|
+
recommendations.push('GSC configured — use wp-search-console skill to track keyword rankings and indexing');
|
|
144
|
+
}
|
|
145
|
+
if (sitemaps.found) {
|
|
146
|
+
recommendations.push('Sitemap detected — GSC can be configured to monitor indexing coverage');
|
|
147
|
+
}
|
|
148
|
+
if (seo_plugins.found) {
|
|
149
|
+
recommendations.push('SEO plugin detected — integrate with GSC for keyword-to-content feedback loop');
|
|
150
|
+
}
|
|
151
|
+
if (robots_txt.found && robots_txt.indicators.some(i => i.includes('references sitemap'))) {
|
|
152
|
+
recommendations.push('Sitemap reference found in robots.txt — good for GSC crawling');
|
|
153
|
+
}
|
|
154
|
+
if (!found) {
|
|
155
|
+
recommendations.push('No GSC or SEO configuration detected — use wp-search-console skill to set up Google Search Console');
|
|
156
|
+
}
|
|
157
|
+
if (gsc.configured && sitemaps.found && seo_plugins.found) {
|
|
158
|
+
recommendations.push('Full SEO stack ready — use wp-search-console for keyword tracking and content optimization');
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const report = {
|
|
162
|
+
tool: 'search_console_inspect',
|
|
163
|
+
version: '1.0.0',
|
|
164
|
+
timestamp: new Date().toISOString(),
|
|
165
|
+
cwd,
|
|
166
|
+
found,
|
|
167
|
+
gsc,
|
|
168
|
+
sitemaps,
|
|
169
|
+
robots_txt,
|
|
170
|
+
seo_plugins,
|
|
171
|
+
recommendations,
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
stdout.write(JSON.stringify(report, null, 2) + '\n');
|
|
175
|
+
exit(found ? 0 : 1);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
main();
|