← Back to Skills

moai-change-logger

modu-ai
Updated Yesterday
21 views
424
78
424
View on GitHub
Design

About

The moai-change-logger is a comprehensive change tracking and audit logging system that monitors file modifications, code changes, and project evolution. It's designed for tracking project history, maintaining audit trails, analyzing development patterns, and providing detailed change documentation for compliance and team collaboration. The skill integrates with Context7 MCP for up-to-date documentation and supports tools like Read, Write, Bash, Git operations, and web search capabilities.

Quick Install

Claude Code

Recommended
Plugin CommandRecommended
/plugin add https://github.com/modu-ai/moai-adk
Git CloneAlternative
git clone https://github.com/modu-ai/moai-adk.git ~/.claude/skills/moai-change-logger

Copy and paste this command in Claude Code to install this skill

Documentation

moai-change-logger

Change Logger

Primary Agent: alfred
Secondary Agents: none
Version: 4.0.0
Keywords: change, logger, auth, test, git


πŸ“– Progressive Disclosure

Level 1: Quick Reference (Core Concepts)

What It Does

Advanced change tracking and audit logging system that monitors all file modifications, code changes, and project evolution. Provides comprehensive audit trails, change analytics, and project insights for team collaboration and compliance requirements.

Core capabilities:

  • βœ… Real-time file change monitoring and logging
  • βœ… Git integration for commit and branch tracking
  • βœ… Change significance assessment and categorization
  • βœ… Developer activity tracking and productivity metrics
  • βœ… Project evolution analysis and trend identification
  • βœ… Audit trail generation for compliance requirements
  • βœ… Change impact analysis and dependency tracking
  • βœ… Automated change reports and summaries


Level 2: Practical Implementation (Common Patterns)

When to Use

  • βœ… When tracking project history and evolution
  • βœ… During code reviews and change analysis
  • βœ… For compliance audit and documentation requirements
  • βœ… When analyzing team productivity and patterns
  • βœ… Before major releases or deployments
  • βœ… When investigating issues or regressions
  • βœ… For project retrospectives and improvement planning


Change Monitoring Systems

1. File-Level Monitoring

def monitor_file_changes():
    """Track individual file modifications"""
    changes = {
        "timestamp": datetime.now().isoformat(),
        "files_modified": [],
        "files_created": [],
        "files_deleted": [],
        "significance_score": 0.0,
        "categories": []
    }

    # Monitor file system changes
    for file_path in get_modified_files():
        change = {
            "path": file_path,
            "type": "modified",
            "size_delta": calculate_size_change(file_path),
            "lines_added": count_added_lines(file_path),
            "lines_removed": count_removed_lines(file_path),
            "significance": assess_file_significance(file_path)
        }
        changes["files_modified"].append(change)

    return changes

2. Git Integration

def track_git_activity():
    """Monitor Git repository activity"""
    git_activity = {
        "current_branch": get_current_branch(),
        "last_commit": get_last_commit_info(),
        "uncommitted_changes": get_git_status(),
        "branch_history": get_recent_commits(limit=10),
        "merge_activity": track_merge_activity(),
        "tag_activity": track_tag_releases()
    }

    return git_activity

3. Developer Activity Tracking

def track_developer_activity():
    """Monitor developer productivity patterns"""
    activity = {
        "session_duration": calculate_session_duration(),
        "files_touched": count_files_touched(),
        "lines_written": count_lines_written(),
        "tools_used": track_tool_usage(),
        "commands_executed": track_command_history(),
        "productivity_score": calculate_productivity_score()
    }

    return activity


Change Analytics

1. Development Patterns

def analyze_development_patterns():
    """Analyze team development patterns"""
    patterns = {
        "peak_development_hours": find_peak_activity_hours(),
        "most_active_days": find_most_active_days(),
        "change_frequency": calculate_change_frequency(),
        "batch_size_distribution": analyze_commit_sizes(),
        "file_type_distribution": analyze_file_type_changes(),
        "collaboration_patterns": analyze_collaboration_patterns()
    }

    return patterns

2. Productivity Metrics

def calculate_productivity_metrics():
    """Calculate team and individual productivity metrics"""
    metrics = {
        "code_velocity": calculate_code_velocity(),
        "change_success_rate": calculate_change_success_rate(),
        "rework_percentage": calculate_rework_percentage(),
        "test_to_code_ratio": calculate_test_coverage_ratio(),
        "documentation_to_code_ratio": calculate_documentation_ratio(),
        "bug_fix_time": calculate_bug_fix_time()
    }

    return metrics

3. Quality Indicators

def assess_code_quality_trends():
    """Assess code quality trends over time"""
    quality_trends = {
        "code_complexity": track_complexity_changes(),
        "technical_debt": track_technical_debt(),
        "test_coverage": track_test_coverage_changes(),
        "code_duplication": track_duplication_changes(),
        "security_vulnerabilities": track_security_issues(),
        "performance_trends": track_performance_changes()
    }

    return quality_trends


Integration Examples

Example 1: Real-Time Change Monitoring

def monitor_project_changes():
    """Real-time monitoring of project changes"""
    while monitoring_active:
        changes = detect_recent_changes()

        if changes:
            Skill("moai-change-logger")

            for change in changes:
                significance, factors = assess_change_significance(change.path, change)
                category = determine_change_category(change)

                log_change({
                    "timestamp": change.timestamp,
                    "file": change.path,
                    "type": change.type,
                    "significance": significance,
                    "category": category,
                    "factors": factors
                })

                # Notify for significant changes
                if significance > 0.7:
                    notify_significant_change(change, category)

        sleep(60)  # Check every minute

Example 2: Pre-Commit Change Analysis

def analyze_commit_changes():
    """Analyze changes before commit"""
    staged_changes = get_staged_changes()

    Skill("moai-change-logger")

    analysis = {
        "total_files": len(staged_changes),
        "categories": categorize_changes(staged_changes),
        "impact": analyze_change_impact(staged_changes),
        "quality_checks": run_quality_checks(staged_changes),
        "recommendations": generate_commit_recommendations(staged_changes)
    }

    display_commit_analysis(analysis)

    return analysis

Example 3: Release Change Summary

def generate_release_summary():
    """Generate comprehensive release change summary"""
    Skill("moai-change-logger")

    # Get changes since last release
    changes = get_changes_since_last_release()

    summary = {
        "release_version": get_next_version(),
        "changes_count": len(changes),
        "categories": categorize_changes(changes),
        "significance_distribution": analyze_significance_distribution(changes),
        "contributors": identify_contributors(changes),
        "risk_assessment": assess_release_risks(changes),
        "testing_coverage": assess_testing_coverage(changes),
        "documentation_updates": check_documentation_updates(changes)
    }

    generate_release_notes(summary)
    save_change_archive(summary)

    return summary


Storage and Retrieval

1. Change Storage Format

def store_change_record(change_record):
    """Store change record in structured format"""
    change_data = {
        "id": generate_change_id(),
        "timestamp": change_record.timestamp,
        "file_path": change_record.file_path,
        "change_type": change_record.type,
        "significance": change_record.significance,
        "category": change_record.category,
        "author": change_record.author,
        "commit_hash": change_record.commit_hash,
        "metadata": {
            "lines_added": change_record.lines_added,
            "lines_removed": change_record.lines_removed,
            "file_size_delta": change_record.size_delta,
            "tags": change_record.tags
        }
    }

    # Store in change log database
    save_to_change_log(change_data)

    # Update indexes
    update_search_indexes(change_data)
    update_category_indexes(change_data)

2. Change Retrieval

def query_changes(query_params):
    """Query changes based on various criteria"""
    filters = []

    if query_params.get("date_range"):
        filters.append(date_range_filter(query_params["date_range"]))

    if query_params.get("categories"):
        filters.append(category_filter(query_params["categories"]))

    if query_params.get("significance_threshold"):
        filters.append(significance_filter(query_params["significance_threshold"]))

    if query_params.get("file_pattern"):
        filters.append(file_pattern_filter(query_params["file_pattern"]))

    if query_params.get("author"):
        filters.append(author_filter(query_params["author"]))

    results = apply_filters(filters)
    return sort_results(results, query_params.get("sort_by", "timestamp"))


Usage Examples

Example 1: Track Specific File Changes

# User wants to track changes to authentication system
Skill("moai-change-logger")

auth_changes = query_changes({
    "file_pattern": "*auth*",
    "date_range": "last_7_days",
    "categories": ["feature_development", "security", "bug_fixes"]
})

# Display authentication system evolution
display_change_timeline(auth_changes)

Example 2: Compliance Audit

# Generate compliance audit for last month
Skill("moai-change-logger")

compliance_report = generate_compliance_report()
audit_trail = generate_audit_log("monthly")

# Check for compliance issues
issues = identify_compliance_issues(compliance_report, audit_trail)

if issues:
    display_compliance_alerts(issues)
else:
    display_compliance_status("compliant")

Example 3: Project Health Analysis

# Analyze project health based on recent changes
Skill("moai-change-logger")

recent_changes = get_changes_for_period("last_30_days")
health_analysis = {
    "code_quality": assess_code_quality_trends(recent_changes),
    "development_velocity": calculate_velocity_trends(recent_changes),
    "risk_indicators": identify_risk_patterns(recent_changes),
    "team_productivity": assess_productivity_patterns(recent_changes)
}

display_project_health_dashboard(health_analysis)

End of Skill | Comprehensive change tracking for audit, analysis, and project management


Level 3: Advanced Patterns (Expert Reference)

Note: Advanced patterns for complex scenarios.

Coming soon: Deep dive into expert-level usage.


🎯 Best Practices Checklist

Must-Have:

  • βœ… [Critical practice 1]
  • βœ… [Critical practice 2]

Recommended:

  • βœ… [Recommended practice 1]
  • βœ… [Recommended practice 2]

Security:

  • πŸ”’ [Security practice 1]

πŸ”— Context7 MCP Integration

When to Use Context7 for This Skill:

This skill benefits from Context7 when:

  • Working with [change]
  • Need latest documentation
  • Verifying technical details

Example Usage:

# Fetch latest documentation
from moai_adk.integrations import Context7Helper

helper = Context7Helper()
docs = await helper.get_docs(
    library_id="/org/library",
    topic="change",
    tokens=5000
)

Relevant Libraries:

LibraryContext7 IDUse Case
[Library 1]/org/lib1[When to use]

πŸ“Š Decision Tree

When to use moai-change-logger:

Start
  β”œβ”€ Need change?
  β”‚   β”œβ”€ YES β†’ Use this skill
  β”‚   └─ NO β†’ Consider alternatives
  └─ Complex scenario?
      β”œβ”€ YES β†’ See Level 3
      └─ NO β†’ Start with Level 1

πŸ”„ Integration with Other Skills

Prerequisite Skills:

  • Skill("prerequisite-1") – [Why needed]

Complementary Skills:

  • Skill("complementary-1") – [How they work together]

Next Steps:

  • Skill("next-step-1") – [When to use after this]

πŸ“š Official References

Primary Documentation:

Best Practices:


πŸ“ˆ Version History

v4.0.0 (2025-11-12)

  • ✨ Context7 MCP integration
  • ✨ Progressive Disclosure structure
  • ✨ 10+ code examples
  • ✨ Primary/secondary agents defined
  • ✨ Best practices checklist
  • ✨ Decision tree
  • ✨ Official references

Generated with: MoAI-ADK Skill Factory v4.0
Last Updated: 2025-11-12
Maintained by: Primary Agent (alfred)

GitHub Repository

modu-ai/moai-adk
Path: src/moai_adk/templates/.claude/skills/moai-change-logger
agentic-aiagentic-codingagentic-workflowclaudeclaudecodevibe-coding

Related Skills

web-cli-teleport

Design

This skill helps developers choose between Claude Code Web and CLI interfaces based on task complexity and workflow needs. It enables seamless teleportation of sessions between environments to maintain context and optimize productivity. Use it for session management and to determine the best interface for coding tasks requiring different levels of iteration or back-and-forth interaction.

View skill

requesting-code-review

Design

This skill dispatches a code-reviewer subagent to analyze code changes against requirements before proceeding. It should be used after completing tasks, implementing major features, or before merging to main. The review helps catch issues early by comparing the current implementation with the original plan.

View skill

executing-plans

Design

Use the executing-plans skill when you have a complete implementation plan to execute in controlled batches with review checkpoints. It loads and critically reviews the plan, then executes tasks in small batches (default 3 tasks) while reporting progress between each batch for architect review. This ensures systematic implementation with built-in quality control checkpoints.

View skill

receiving-code-review

Design

This skill helps developers process code review feedback by emphasizing technical verification over immediate agreement. It provides a structured workflow for understanding, evaluating, and responding to suggestions, especially when feedback is unclear or technically questionable. The core principle is to ensure technical correctness through rigorous analysis before implementing any changes.

View skill