Skip to content

Conversation

@modernchina123
Copy link

🎯 Overview

This PR introduces a complete AI-powered multi-language changelog generation system with automated weekly runs and comprehensive security validation for AIOK skills.

✨ Key Features

1. AI-Powered Changelog Generation

  • πŸ€– Claude Sonnet 4.5 Integration for natural language generation
  • 🌍 Multi-language Support: English, Chinese (δΈ­ζ–‡), Korean (ν•œκ΅­μ–΄)
  • πŸ“… Cumulative Architecture: 3 growing files (changelog_EN/ZH/KO.mdx)
  • 🏷️ Semantic Versioning: AI-powered version bump analysis (Major/Minor/Patch)
  • πŸ“‘ 22 Repository Coverage: Fetches merged PRs from Codatta ecosystem

2. Automated Weekly Runs

  • ⏰ GitHub Actions: Runs every Wednesday at 10:00 UTC
  • πŸ”„ Auto-Detection: Finds latest version from existing changelogs
  • πŸ›‘οΈ Duplicate Prevention: Prevents running twice with --force override
  • πŸ‘€ Manual Intervention: Respects human edits to version numbers

3. Security System (5 Layers)

  • βœ… Pre-execution Validation: Scans skills before execution
  • πŸ”’ Tool Restriction: SAFE/MODERATE/HIGH-RISK/BLOCKED categorization
  • 🚨 Pattern Detection: Blocks API key theft, command injection, data exfiltration
  • 🌐 Network Control: Whitelist-based domain access
  • πŸ“Š Security Scripts: validate_skill.py + scan_skills_security.py

πŸ“ File Structure

Core Scripts (5 Active)

  • scripts/fetch_github_prs.py - Fetches merged PRs from 22 repositories
  • scripts/generate_weekly_changelog.py - Main weekly automation (cumulative)
  • scripts/generate_mintlify_changelog_v2.py - AI generation engine
  • scripts/validate_skill.py - Single skill security validator
  • scripts/scan_skills_security.py - Batch security scanner

Configuration

  • config/repos.json - 22 monitored repositories
  • config/2025_version_mapping.json - Historical version data (33 versions)
  • skills/security/config.json - Security rules and patterns

Documentation

  • scripts/README.md - Complete script usage guide
  • skills/SECURITY.md - Comprehensive security system documentation
  • skills/SECURITY_QUICKSTART.md - 5-minute security setup

GitHub Actions

  • .github/workflows/weekly-changelog.yml - Weekly automation workflow
  • .github/SETUP.md - GitHub Actions configuration guide

πŸš€ Usage

Quick Start

# Generate weekly changelog
export ANTHROPIC_API_KEY="your_key"
export GITHUB_TOKEN="your_token"
python3 scripts/generate_weekly_changelog.py

# Validate skills
python3 scripts/scan_skills_security.py

GitHub Actions Setup

  1. Add secrets: ANTHROPIC_API_KEY, GITHUB_TOKEN
  2. Enable workflow permissions: Settings β†’ Actions β†’ Read and write permissions
  3. Workflow runs automatically every Wednesday

πŸ”’ Security Highlights

Detected Patterns:

  • API key access: $ANTHROPIC_API_KEY, $TOKEN, os.environ
  • Command injection: &&, ||, ;, $(...), backticks
  • Code evaluation: eval(), exec(), __import__()
  • Data exfiltration: Suspicious URLs, curl patterns
  • Network access: Non-whitelisted domains

Tool Categories:

  • βœ… SAFE: Read, Grep, Glob, WebFetch
  • ⚠️ MODERATE: Write, Edit, NotebookEdit
  • πŸ”₯ HIGH-RISK: Bash, Task, Skill
  • ❌ BLOCKED: Exec, System, Shell, Eval

πŸ“Š Impact

Code Optimization

  • Reduced scripts: 15 β†’ 5 (67% reduction)
  • Archived deprecated files: 10 scripts moved to scripts/archived/
  • Documentation cleanup: 12 redundant docs deleted

Changelog Data

  • 2025 Historical: 33 versions (3.3.0 β†’ 4.3.0)
  • 2026+ Weekly: Automated cumulative growth
  • Output Format: Mintlify-compatible MDX with month filters
  • Multi-language: 3 files generated (EN, ZH, KO) each run

πŸ§ͺ Testing

All scripts tested:

  • βœ… Weekly changelog generation with duplicate detection
  • βœ… Version auto-detection from existing files
  • βœ… Security validation on existing skills
  • βœ… Git workflow (branch, commit, push, rebase)

πŸ“š Related Documentation

βš™οΈ Configuration Required

After merging, configure these GitHub secrets:

  1. ANTHROPIC_API_KEY - For Claude Sonnet 4.5 API access
  2. GITHUB_TOKEN - For PR fetching and automation (auto-provided or custom)

🎯 Next Steps

  1. βœ… Merge this PR
  2. βš™οΈ Configure GitHub Secrets
  3. πŸ”§ Enable workflow permissions
  4. ⏰ First automated run: Next Wednesday at 10:00 UTC
  5. πŸ“Š Monitor PR creation and changelog updates

Co-Authored-By: Claude Sonnet 4.5 noreply@anthropic.com

modernchina123 and others added 5 commits January 16, 2026 07:17
- Claude Sonnet 4.5 integration for natural language generation
- Multi-language support (English, Chinese, Korean)
- Semantic versioning with AI analysis (Major/Minor/Patch)
- Context-aware changelog formatting

- Weekly automated changelog generation (Every Wednesday)
- PR creation to mintlify-docs repository
- Configurable schedule and triggers
- Complete CI/CD integration

- 34 pre-generated versions for 2025 (v3.3.0 β†’ v4.3.0)
- Week-by-week PR data collection
- Cumulative changelog architecture
- Version mapping and tracking

- Pre-execution skill validation
- Tool restriction (SAFE/MODERATE/HIGH-RISK/BLOCKED)
- Sensitive data protection (API keys, tokens)
- Command injection prevention
- Network access control with domain whitelist
- Automated security scanning
- Malicious skill detection and quarantine

- 12 core Codatta repositories monitored
- Flexible configuration (core-only, default, all)
- Multi-repo PR aggregation
- Configurable lookback period

- `scripts/` - 5 core Python scripts for generation
- `config/` - Repository and version configuration
- `data/` - Historical PR data and changelog cache
- `.github/` - GitHub Actions workflows and setup guides
- `skills/` - Agent skills with security validation
- `docs/` - Comprehensive English documentation

- Multi-layer skill validation system
- API key theft prevention
- Command injection detection
- Data exfiltration blocking
- Automated security scanning tools
- Incident response procedures

- 5 active Python scripts (1,554 lines)
- 2 GitHub Actions workflows
- 6 core documentation files
- 34 historical versions (2025)
- 12 monitored repositories
- 3 languages supported

- `validate_skill.py` - Single skill security validator
- `scan_skills_security.py` - Batch security scanner
- `generate_weekly_changelog.py` - Main automation script
- `fetch_github_prs.py` - PR data collector
- `preview_2025_aligned.py` - Version preview tool

All documentation in English:
- README.md - Project overview
- AUTOMATION_COMPLETE.md - Setup completion guide
- scripts/README.md - Script usage documentation
- config/README.md - Configuration guide
- skills/SECURITY.md - Security guidelines
- skills/SECURITY_QUICKSTART.md - 5-min security setup

- Code structure optimized (67% reduction in scripts)
- All documentation in English
- Security validated on existing skills
- Tested with real Codatta repositories
- Production-ready automation

Integrates with:
- Codatta GitHub organization (12 repos)
- mintlify-docs (changelog.mdx updates)
- Anthropic Claude API (changelog generation)
- GitHub API (PR data fetching)

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
- Changed repository count from 12 to 22 (accurate)
- Modified generate_weekly_changelog.py to generate 3 languages: EN, ZH, KO
- Each language gets its own cumulative file (changelog_EN/ZH/KO.mdx)
- Updated README.md and PR_TEMPLATE.md to reflect changes
- All three changelogs grow cumulatively with each weekly run
- Workflow now automatically creates PR after generating changelogs
- PR includes all 3 language files (EN, ZH, KO)
- Detailed PR description with version info and next steps
- Uploads artifacts with 90-day retention
- Updated SETUP.md with PR creation documentation
- Visual flowchart of entire weekly automation process
- Step-by-step breakdown from trigger to PR creation
- Key features, configuration, and metrics
- Error handling and human touch points
- Detailed breakdown of Claude API costs
- Monthly cost: $0.32 (yearly: $4.20)
- Scenario analysis for different PR volumes
- Cost optimization strategies
- ROI analysis: 1,250x return (99.92% savings vs manual)
- Infrastructure costs (GitHub Actions, storage)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants