codex-seo — Claude Code hook: schema checks after edits
This hook runs a schema check when Claude Code edits or writes a file. It ships with codex-seo, a plugin bundle for SEO workflows.
MIT ★ 1,596 updated 2026-10-29
.claude/settings.jsonWhat codex-seo does
After Claude Code uses Edit or Write, the hook runs python3 "./hooks/validate-schema.py" "$FILE_PATH". The script receives the path of the changed file, so schema validation follows file edits rather than requiring a separate audit request.
The configuration attaches the command to PostToolUse and matches Edit|Write. The wider codex-seo bundle covers SEO audits, Google API workflows, backlink analysis, and reporting; this hook configuration specifically shows schema validation. It needs python3 and ./hooks/validate-schema.py at that path. Without either, the command cannot run.
What it helps with
- check a file's schema after editing it
- run validation after writing changes
- pass the changed file path to a validation script
Example prompts for the agent
- Edit the page markup and check its schema.
- Write the updated file, then run the schema check.
How to install codex-seo
Manually: put the files in place
.claude/settings.jsonThe hooks block: event (PreToolUse, PostToolUse, Stop…) → command. Personal ones go to ~/.claude/settings.json
Step by step, with commands for each platform: Claude Code hooks: what they are, where to configure them, how to block a risky command
Questions about codex-seo
How do I install codex-seo in Claude Code?
Add the hook configuration to .claude/settings.json, using the PostToolUse event and the schema-check command.
What does codex-seo do?
This hook runs schema validation after Edit or Write and passes the changed file's path to the script.
What does the hook need to run?
It needs python3 and the script ./hooks/validate-schema.py at the configured path.
Source text
hooks.json · MIT
Hooks bundle shipped with the codex-seo plugin for Claude Code.
Full-stack SEO audits, Google API workflows, backlinks analysis, reporting, and optional MCP extensions for Codex.
Triggers on: PostToolUse.
```json
{
"hooks": {
"PostToolUse": [
{
"matcher": "Edit|Write",
"hooks": [
{
"type": "command",
"command": "python3 \"./hooks/validate-schema.py\" \"$FILE_PATH\""
}
]
}
]
}
}
```
© BestLemoon · MIT · hashgraph-online/awesome-codex-plugins