pre-push-validation
Ensures CLAUDE.md, README.md, and CHANGELOG.md are updated before git push operations
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Ensures CLAUDE.md, README.md, and CHANGELOG.md are updated before git push operations
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
Create educational and interactive Jupyter notebooks as SPAs that explain concepts, teach topics, create tutorials, illustrate ideas from text, or build blog posts. Use for interactive guides, demonstrations, explanations, documentation, or any content meant for end users and learners displayed via ipynb-viewer block. Keywords include educational notebook, tutorial notebook, interactive guide, blog notebook, SPA notebook, explain topic, illustrate concept, teach interactively.
The Block Collection and Block Party are repositories for existing AEM blocks, build tools, code snippets, integration patterns, plugins, and more. Use this skill anytime you are developing something and want to find a reference to use as a starting point.
Survey available blocks from local AEM Edge Delivery Services project and Block Collection to understand the block palette available for authoring. Returns block inventory with purposes to inform content modeling decisions.
Guide for creating new AEM Edge Delivery blocks or modifying existing blocks. Use this skill whenever you are creating a new block from scratch or making significant changes to existing blocks that involve JavaScript decoration, CSS styling, or content model changes.
Apply a Content Driven Development process to AEM Edge Delivery Services development. Use for all development tasks, including building new blocks, modifying existing blocks, making changes to core decoration functionality, etc.
Create effective content models for your blocks that are easy for authors to work with. Use this skill anytime you are building new blocks, making changes to existing blocks that modify the initial structure authors work with.
استنادا إلى تصنيف SOC المهني
| name | pre-push-validation |
| description | Ensures CLAUDE.md, README.md, and CHANGELOG.md are updated before git push operations |
| version | 1.0.0 |
| author | Tom Cranstoun |
| trigger_type | intent |
| tags | ["git push","commit push","pushing changes","before push","validate docs","check documentation"] |
| intent_patterns | ["push.*changes","git push","ready.*push","update.*push"] |
| enforcement | suggest |
| mx | {"canonicalUri":"https://raw.githubusercontent.com/ddttom/allaboutv2/main/.claude/skills/pre-push-validation/SKILL.md"} |
Ensures critical documentation files are updated before pushing changes to the repository.
Automatic validation before git push - The pre-push hook checks that documentation is current:
The hook .claude/hooks/pre-push-validation.sh runs automatically before git push operations:
Validation Logic:
Example Output:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔍 PRE-PUSH VALIDATION
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Commits to push: 3
🌿 Branch: main → origin/main
📝 Checking documentation files...
✓ CLAUDE.md: Updated 2025-12-10
✓ README.md: Updated 2025-12-10
❌ CHANGELOG.md: Not updated since 2025-12-09
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
❌ VALIDATION FAILED
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Please update the following files before pushing:
• CHANGELOG.md
💡 Tips:
1. Update CHANGELOG.md with your changes
2. Update README.md if project structure changed
3. Update CLAUDE.md if AI instructions changed
4. Commit your documentation updates
5. Push again
Always update when:
Format:
## [YYYY-MM-DD<letter>] - Brief Title
### Added/Changed/Fixed/Removed
- Detailed description of changes
- Impact and rationale
- Technical details
### Files Modified
1. `path/to/file.js` - Description
2. `path/to/file.css` - Description
**Total: X files modified**
Update when:
Update when:
Review your commits:
git log origin/main..HEAD --oneline
Update documentation:
Commit all changes (including user edits):
git add .
git commit -m "docs: Update documentation for [feature/fix]"
Push with confidence:
git push
The hook will validate and either allow or block the push.
If you absolutely must push without updating documentation:
git push --no-verify
⚠️ Warning: Only use this for:
Never use --no-verify for main/production branches.
The hook is automatically available in Claude Code projects. To verify:
ls -la .claude/hooks/pre-push-validation.sh
Should show executable permissions: -rwxr-xr-x
If not executable:
chmod +x .claude/hooks/pre-push-validation.sh
git commit -m "feat: Add new feature"git commit -m "docs: Document new feature"git push (hook validates automatically)If you have multiple commits:
# Commits in current session
git log origin/main..HEAD --oneline
# The hook checks documentation is newer than ALL unpushed commits
Best Practice: Update documentation as you go, not at the end.
Problem: Documentation files are outdated compared to code commits.
Solution:
git add . && git commit -m "docs: Update documentation"git pushProblem: Documentation file has uncommitted changes.
Solution:
git diff [file]git add .git commit -m "docs: Update [file]"git pushProblem: Push succeeds without validation.
Possible causes:
chmod +x .claude/hooks/pre-push-validation.shgit rev-parse --is-inside-work-treeThe hook is configured via critical files array in the script:
CRITICAL_FILES=(
"CLAUDE.md"
"README.md"
"CHANGELOG.md"
)
To add more files, edit .claude/hooks/pre-push-validation.sh and add to the array.
.claude/hooks/CONFIG.md.claude/hooks/README.mdCHANGELOG.md (see existing entries)README.md (top-level sections)CLAUDE.md (configuration patterns section)