Update project knowledge

From ippontech/terraform-provider-anthropic · View interactive version

Update project knowledge is an AI agent skill from the GitHub repository ippontech/terraform-provider-anthropic. Reviews the work just done and updates CLAUDE.md, agent memories, and subagent MD files to reflect any new conventions, packages, resources, or patterns discovered. Run after completing any significant implementation task.

How to use this skill

Skill file

update-project-knowledge

Keep CLAUDE.md and agent memories accurate after each implementation task.

Trigger

Workflow

Step 1 — Gather context

git rev-parse --abbrev-ref HEAD
git log origin/main..HEAD --oneline
git diff origin/main..HEAD --name-only

Also read the root CLAUDE.md, and the internal/services/<service>/CLAUDE.md of every service the branch touched, to know what is already documented.

Step 2 — Identify gaps

Cross-reference changed files against the CLAUDE.md files. Check each category:

| If this changed | Check this |

|---|---|

| New *_resource.go or *_data_source.go | Its name on the service's line of the root "Services" list, and its load-bearing details in internal/services/<service>/CLAUDE.md (a new service directory gets its own file and a new line) |

| New make target in GNUmakefile | Root "Commands" section |

| New Go package under internal/ | Root "Architecture" section |

| New provider-wide convention | Root "Provider coding conventions" section |

The root CLAUDE.md holds repo-wide rules only (its opening paragraph says so): per-resource notes go in the service's CLAUDE.md, never in the root file.

For agent memories, check if the session revealed a pattern that agents got wrong or a non-obvious project idiom — record it in the relevant agent's memory directory.

Skip anything already documented. Skip anything derivable by reading the code.

Step 3 — Update

Edit only files where something is genuinely missing or stale. Prefer adding to existing sections.

Do NOT:

Step 4 — Report

List each file updated and what was added (one line per change). If nothing needed updating, say so.

Then suppress the Stop hook reminder for this branch:

branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
touch "/tmp/claude-knowledge-done-$(echo "$branch" | tr '/' '-')"
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.