wp-guard
Что он делает
Этот агент проверяет код плагинов, тем и блоков WordPress на безопасность, локализацию, производительность и корректность использования API. Он помогает избежать распространённых проблем, которые могут возникнуть в коде, написанном ИИ.
Когда использовать
- ✓После того как ИИ-агент создал или изменил код WordPress.
- ✓Перед публикацией нового плагина или темы WordPress.
- ✓При проверке существующего кода на уязвимости или ошибки в переводах.
Ссылка на скилл
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/wp-guard/SKILL.mdСкопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.
Как использовать
Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.
Готовое сообщение для вставки
Для Claude Code, Codex или Cursor: запустите в папке проекта, и скилл установится.
Скачайте SKILL.md и положите его в папку скиллов вашего агента.
Пример запроса к вашему ИИ
“Проверь код этого плагина WordPress: убедись, что он безопасен и подготовлен к переводу.”
5 новых скиллов в неделю. 1 минута чтения.
Как это работает
Агент анализирует код на известные уязвимости, например на отсутствие защитных механизмов, жёстко заданные английские строки, которые нужно сделать переводимыми, или неудачно написанные запросы к базе данных. Затем он предлагает исправления для этих проблем.
Технический текст (оригинальный SKILL.md)
Оригинальный текст автора на английском, прямо с GitHub.
⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.
Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:
- Ask the user to state the exact target URL, IP, account, or resource.
- Ask the user to confirm written authorization and the permitted scope.
- Show the exact command(s) and explain their expected effect.
- Wait for explicit confirmation in the current conversation.
Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.
WP Guard
[!WARNING] Authorized Use Only. Review only WordPress code and environments the user owns or is explicitly authorized to assess. Keep checks non-destructive and inside the approved scope.
You are reviewing generated or changed WordPress code before it ships. Apply the rules below as a guard pass after the first implementation pass. Be a sharp reviewer, not a pedantic one: flag what creates vulnerabilities, breaks translations, or melts servers — ignore cosmetic preferences WPCS tooling already handles.
These rules exist because AI agents produce WordPress code with systematic failures: raw echo of request data, AJAX handlers with neither nonce nor capability check, SQL built by string interpolation, English hardcoded into user-facing strings, posts_per_page => -1 on sites with a million posts, and hand-rolled replacements for APIs core already ships. Each one looks fine in a demo and fails in production.
When to Use
Use this skill when reviewing generated or changed WordPress code — plugins, themes, and blocks — before it ships. Activate it reactively after an agent writes, edits, or reviews code touching WordPress APIs: hooks, custom post types, REST endpoints, database queries, and block editor integrations.
How to use this skill
Guard-pass mode (recommended): after WordPress code has been generated or edited, apply the rules to the diff or target files, then run the self-check before delivery. Fix violations before showing the user.
Live mode (explicit): when the user invokes this skill before writing WordPress code, apply the same rules while writing, then run the self-check before delivery.
Review mode (the user asks you to review, audit, or rate WordPress code): walk references/review-checklist.md against the target files and produce a structured findings report. Do not edit code in review mode unless asked.
Pair this skill with clean-code-guard when both are installed: clean-code-guard owns generic code quality; wp-guard owns the WordPress layer.
Adapt to the project first
- Read the project's agent instructions (CLAUDE.md, AGENTS.md),
phpcs.xml/WPCS config, andcomposer.json. Project conventions win on conflict. - Identify the established prefix (functions, options, meta keys, handles) and the minimum supported WP/PHP versions. Match both.
- Detect context: WooCommerce APIs in play → apply woo-guard alongside this skill when it is installed; otherwise apply WooCommerce's HPOS, CRUD, and checkout rules from its developer documentation. Multilingual site (WPML/Polylang/multisite) → i18n rules are blocking, not advisory.
- Read one neighboring file before writing. Mirror its error handling, hook registration style, and escaping habits — unless they violate the security rules below, which are non-negotiable.
The Rules
Security — must fix, no exceptions
- Escape late, escape everything. Every variable crossing into HTML output goes through the context-correct function:
esc_html(),esc_attr(),esc_url(), orwp_kses()/wp_kses_post()for rich content. Data passed to inline JS goes throughwp_json_encode()+wp_add_inline_script()—esc_js()is legacy, for single-quoted strings in inline attributes only. Escaping happens at output, not at storage.echo $anything;without anesc_*wrapper fails review.
…
Частые вопросы
Зачем нужно разрешение на использование этого инструмента?
Этот инструмент мощный и может находить уязвимости. Важно использовать его только для систем, которыми вы владеете, или на тестирование которых у вас есть явное разрешение, чтобы не столкнуться с юридическими и этическими проблемами.
Что такое «nonce» и «проверки прав» (capability checks)?
Это механизмы безопасности WordPress. Nonce помогает убедиться, что запрос отправил нужный пользователь и что его не подменили. Проверка прав (capability check) определяет, есть ли у пользователя разрешение на выполнение запрошенного действия.
Что означает «экранирование» (escape) и «санитизация» (sanitize) данных?
Санитизация — это очистка входящих данных от опасных или недопустимых символов. Экранирование — это подготовка данных перед выводом, чтобы их не восприняли как вредоносный код (например, HTML или JavaScript).
Подробности
Оригинальное описание автора
Review generated or changed WordPress plugins, themes, and blocks for security, internationalization, performance, and API correctness.
Популярность
- Звёзды на GitHub
- 48k
- Место в рейтинге
- #6205
- Лицензия
- MIT
- Обновлён
- 15.10.2026
Комментарии
- …
Другие скиллы из этого репозитория
00-andruia-consultant
48kПомогает агенту начинать или улучшать ИИ-проекты: анализирует код, подбирает инструменты и составляет план на испанском.
007
48kАгент проводит аудит безопасности и моделирование угроз для защиты проектов.
10-andruia-skill-smith
48kПомогает агенту создавать и улучшать ИИ-инструменты: описание работы, документация и проверка структуры.
20-andruia-niche-intelligence
48kАгент составляет обзор отрасли: контекст, правила, паттерны использования и риски по надёжным источникам.
Похожие скиллы
test-driven-development
311kУчит агента сначала писать падающий тест, увидеть, что он падает, и только затем писать минимальный код, который его проходит, прежде чем создавать любую функцию или исправление.
verification-before-completion
311kУчит агента запускать настоящие проверки и читать их вывод, прежде чем утверждать, что задача, исправление или сборка готовы или проходят.
migrate-to-shoehorn
310kЗаменяет рискованные приведения типов в тестовых файлах на библиотеку shoehorn, чтобы тесты могли использовать неполные данные и проходить проверку типов.