一键导入
audit-metric
Add a new SEO audit metric to the scoring system. Use when extending the SEO analysis, adding new quality checks, or improving the audit dashboard.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Add a new SEO audit metric to the scoring system. Use when extending the SEO analysis, adding new quality checks, or improving the audit dashboard.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Add a new WordPress filter hook to the Saman SEO plugin with proper documentation. Use when making functionality extensible, allowing third-party customization, or adding developer hooks.
Add a new schema.org structured data type to the Saman SEO plugin. Use when adding support for new schema types like Recipe, Event, Product, etc.
Review code changes in the Saman SEO plugin for quality, security, and adherence to WordPress coding standards. Use when reviewing PRs, checking code quality, or before committing changes.
Generate a pull request title and description from the current branch's commits. Produces a concise summary, optional feature highlights, and collapsible technical details.
Create a new React admin page for the Saman SEO plugin dashboard. Use when adding new settings pages, tool interfaces, or admin features that need a UI.
Generate a new SEO service class following the Saman SEO plugin architecture. Use when creating new features that need a dedicated service, adding functionality to the plugin, or extending plugin capabilities.
基于 SOC 职业分类
| name | audit-metric |
| description | Add a new SEO audit metric to the scoring system. Use when extending the SEO analysis, adding new quality checks, or improving the audit dashboard. |
Add a new metric to the Saman SEO audit scoring system.
$ARGUMENTS should contain: metric name, points value, and categoryDefine the metric:
Add to calculate_seo_score() in includes/helpers.php:
// {Metric Name} Check ({points} points)
${metric_key}_check = {your_check_logic};
if ( ${metric_key}_check ) {
$score += {points};
$passed_checks[] = '{metric_key}';
} else {
$failed_checks[] = array(
'key' => '{metric_key}',
'message' => __( '{Failure message explaining the issue}', 'saman-seo' ),
'suggestion' => __( '{Actionable suggestion to fix it}', 'saman-seo' ),
'points_lost' => {points},
);
}
Update the scoring documentation in the function's docblock
Add to React Audit UI (src-v2/pages/Audit.js):
$content_length = str_word_count( wp_strip_all_tags( $content ) );
$has_sufficient_content = $content_length >= 300;
$keyphrase_in_title = ! empty( $focus_keyphrase ) &&
stripos( $title, $focus_keyphrase ) !== false;
preg_match_all( '/<img[^>]+>/i', $content, $images );
$images_without_alt = 0;
foreach ( $images[0] as $img ) {
if ( ! preg_match( '/alt=["\'][^"\']+["\']/', $img ) ) {
$images_without_alt++;
}
}
$all_images_have_alt = $images_without_alt === 0;
$internal_links = \Saman\SEO\Helpers\count_internal_links( $content );
$has_internal_links = $internal_links >= 2;
The score is filterable for third-party customization:
/**
* Filter the SEO score calculation.
*
* @param array $result The score data including score, passed, failed checks.
* @param WP_Post $post The current post object.
*/
$result = saman_seo_apply_filters( 'saman_seo_seo_score', $result, $post );
/audit-metric readability-score 10 content-structure Check content readability using Flesch-Kincaid score
This will: