.claude/skills/sync-ai-docs/SKILL.md
Sync AI documentation (CLAUDE.md, AGENTS.md, memory files) with recent code changes. Use when the user runs /sync-ai-docs, has just finished writing code manually, has completed a notable feature or refactor, or asks to update/sync the project AI docs.
npx skillsauth add mark-lengyel-attrecto/movies-app-react sync-ai-docsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
git rev-parse HEADcat .claude/skills/sync-ai-docs/state 2>/dev/null || echo "(none — first run)"LAST=$(cat .claude/skills/sync-ai-docs/state 2>/dev/null | tr -d '[:space:]'); if [ -z "$LAST" ] || [ "$LAST" = "(none" ]; then echo "(no prior sync — showing last 20 commits:)"; git log --oneline -20; else COUNT=$(git rev-list --count "${LAST}..HEAD" 2>/dev/null || echo 0); if [ "$COUNT" = "0" ]; then echo "(already up to date — no new commits since last sync)"; else echo "(${COUNT} new commit(s) since last sync:)"; git log "${LAST}..HEAD" --oneline; fi; fiSynchronize all AI documentation files so they accurately reflect the current codebase. Work through these steps in order.
If the commits list above says "(already up to date)", report that and stop — no further action needed.
For each commit hash listed above, investigate:
git show <hash> --stat # file-level overview of what changed
git show <hash> -- <path> # full diff for a specific file if needed
Classify each commit:
Build a mental model of what the project looks like now vs. what the docs describe.
File: CLAUDE.md (project root)
Make targeted edits — only touch sections that are actually wrong or missing. Do not rewrite unrelated sections.
Check for:
src/ directories or notable new filesfeatures/, new components, new hooksapp/[locale]/.env keysFile: AGENTS.md (project root)
Only update if changes affect rules that AI agents (not just Claude) need to know — typically Next.js API or routing conventions that differ from what an agent trained before this project would assume.
Memory directory: C:/Users/user/.claude/projects/c--projects-movies-app-react/memory/
Update or add memory files for things that:
Do NOT save things that are already documented in CLAUDE.md or that can be found by reading the source.
When updating MEMORY.md index, keep each entry under ~150 characters.
Write the current HEAD hash to the state file so the next run knows where to start:
git rev-parse HEAD to get the hash.claude/skills/sync-ai-docs/stateSummarize concisely:
tools
Add a new page to the app following project conventions. Use when the user runs /new-page or asks to create a new route or page.
development
Detect unused files, exports, and dependencies with knip. Use when the user runs /find-dead-code or asks to find dead code, unused exports, or unused dependencies.
development
Validate that all translation keys used in source code exist in both en.json and hu.json. Use when the user runs /check-i18n or wants to audit translation completeness.
development
Audit the codebase for project-specific convention violations. Use when the user runs /check-conventions or asks to validate that the code follows project conventions.