Initial commit

This commit is contained in:
Zhongwei Li
2025-11-29 18:08:03 +08:00
commit d102f8db57
4 changed files with 204 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
{
"name": "update-claudemd",
"description": "Automatically update CLAUDE.md file based on recent code changes",
"version": "1.0.0",
"author": {
"name": " Anand Tyagi",
"url": "https://github.com/ananddtyagi"
},
"commands": [
"./commands"
]
}

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
# update-claudemd
Automatically update CLAUDE.md file based on recent code changes

144
commands/update-claudemd.md Normal file
View File

@@ -0,0 +1,144 @@
---
allowed-tools: Bash(git diff:*), Bash(git log:*), Bash(git status:*), Bash(find:*), Bash(grep:*), Bash(wc:*), Bash(ls:*)
description: Automatically update CLAUDE.md file based on recent code changes
---
# Update Claude.md File
## Current Claude.md State
@CLAUDE.md
## Git Analysis
### Current Repository Status
!`git status --porcelain`
### Recent Changes (Last 10 commits)
!`git log --oneline -10`
### Detailed Recent Changes
!`git log --since="1 week ago" --pretty=format:"%h - %an, %ar : %s" --stat`
### Recent Diff Analysis
!`git diff HEAD~5 --name-only | head -20`
### Detailed Diff of Key Changes
!`git diff HEAD~5 -- "*.js" "*.ts" "*.jsx" "*.tsx" "*.py" "*.md" "*.json" | head -200`
### New Files Added
!`git diff --name-status HEAD~10 | grep "^A" | head -15`
### Deleted Files
!`git diff --name-status HEAD~10 | grep "^D" | head -10`
### Modified Core Files
!`git diff --name-status HEAD~10 | grep "^M" | grep -E "(package\.json|README|config|main|index|app)" | head -10`
## Project Structure Changes
!`find . -name "*.md" -not -path "./node_modules/*" -not -path "./.git/*" | head -10`
## Configuration Changes
!`git diff HEAD~10 -- package.json tsconfig.json webpack.config.js next.config.js .env* docker* | head -100`
## API/Route Changes
!`git diff HEAD~10 -- "**/routes/**" "**/api/**" "**/controllers/**" | head -150`
## Database/Model Changes
!`git diff HEAD~10 -- "**/models/**" "**/schemas/**" "**/migrations/**" | head -100`
## Your Task
Based on the current CLAUDE.md content and all the git analysis above, create an updated CLAUDE.md file that:
## 1. Preserves Important Existing Content
- Keep the core project description and architecture
- Maintain important setup instructions
- Preserve key architectural decisions and patterns
- Keep essential development workflow information
## 2. Integrates Recent Changes
Analyze the git diff and logs to identify:
- **New Features**: What new functionality was added?
- **API Changes**: New endpoints, modified routes, updated parameters
- **Configuration Updates**: Changes to build tools, dependencies, environment variables
- **File Structure Changes**: New directories, moved files, deleted components
- **Database Changes**: New models, schema updates, migrations
- **Bug Fixes**: Important fixes that affect how the system works
- **Refactoring**: Significant code reorganization or architectural changes
## 3. Updates Key Sections
Intelligently update these CLAUDE.md sections:
### Project Overview
- Update description if scope changed
- Note new technologies or frameworks added
- Update version information
### Architecture
- Document new architectural patterns
- Note significant structural changes
- Update component relationships
### Setup Instructions
- Add new environment variables
- Update installation steps if dependencies changed
- Note new configuration requirements
### API Documentation
- Add new endpoints discovered in routes
- Update existing endpoint documentation
- Note authentication or parameter changes
### Development Workflow
- Update based on new scripts in package.json
- Note new development tools or processes
- Update testing procedures if changed
### Recent Changes Section
Add a "Recent Updates" section with:
- Summary of major changes from git analysis
- New features and their impact
- Important bug fixes
- Breaking changes developers should know about
### File Structure
- Update directory explanations for new folders
- Note relocated or reorganized files
- Document new important files
## 4. Smart Content Management
- **Don't duplicate**: Avoid repeating information already well-documented
- **Prioritize relevance**: Focus on changes that affect how developers work with the code
- **Keep it concise**: Summarize rather than listing every small change
- **Maintain structure**: Follow existing CLAUDE.md organization
- **Add timestamps**: Note when major updates were made
## 5. Output Format
Provide the complete updated CLAUDE.md content, organized as:
```markdown
# Project Name
## Overview
[Updated project description]
## Architecture
[Updated architecture information]
## Setup & Installation
[Updated setup instructions]
## Development Workflow
[Updated development processes]
## API Documentation
[Updated API information]
## File Structure
[Updated directory explanations]
## Recent Updates (Updated: YYYY-MM-DD)
[Summary of recent changes]
## Important Notes
[Key information for developers]

45
plugin.lock.json Normal file
View File

@@ -0,0 +1,45 @@
{
"$schema": "internal://schemas/plugin.lock.v1.json",
"pluginId": "gh:ccplugins/awesome-claude-code-plugins:plugins/update-claudemd",
"normalized": {
"repo": null,
"ref": "refs/tags/v20251128.0",
"commit": "d24b87cb55ccfa548262aee509c38171ce9a6911",
"treeHash": "361adba37e9464af8a6c2828ccde2cd4a061d032ca8b98aba7d7a8e1f9de331d",
"generatedAt": "2025-11-28T10:14:31.945871Z",
"toolVersion": "publish_plugins.py@0.2.0"
},
"origin": {
"remote": "git@github.com:zhongweili/42plugin-data.git",
"branch": "master",
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
},
"manifest": {
"name": "update-claudemd",
"description": "Automatically update CLAUDE.md file based on recent code changes",
"version": "1.0.0"
},
"content": {
"files": [
{
"path": "README.md",
"sha256": "6f28ff50fd4e7f6a80ba5827d9e5684095fce386d520ddf2a92204f20c78eb2e"
},
{
"path": ".claude-plugin/plugin.json",
"sha256": "b94aad273c25d19b839d86eebada137038b48a5514f4121b5950819f272d1e07"
},
{
"path": "commands/update-claudemd.md",
"sha256": "ceb96690e50bc5a8aef9f1c5ffad30284f6bdc5e711e891778d2ed5605aed899"
}
],
"dirSha256": "361adba37e9464af8a6c2828ccde2cd4a061d032ca8b98aba7d7a8e1f9de331d"
},
"security": {
"scannedAt": null,
"scannerVersion": null,
"flags": []
}
}