A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
GitHub Action that analyzes codebases and generates AI agent context documentation (CLAUDE.md/AGENTS.md) to optimize AI
A GitHub Action that automatically analyzes your codebase and generates focused AI agent context documentation recommendations (CLAUDE.md, AGENTS.md, or similar) for AI coding assistants. The action provides detailed analysis with concrete examples and language-specific suggestions displayed directly in GitHub Actions step summaries.
This action uses Claude AI to:
Create .github/workflows/analyze-claude-md.yml:
name: Analyze AI Context Documentation
on:
push:
branches: [main]
workflow_dispatch:
jobs:
analyze-codebase:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run AI Agent Context Optimizer
uses: guyaluk/contextor@v0
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
context-file: 'CLAUDE.md' # or 'AGENTS.md'
# Results will be displayed in the step summary above
CLAUDE_API_KEY in your repository secrets
CLAUDE_API_KEY with your API key as the value| Input | Description | Required | Default |
|---|---|---|---|
claude-api-key | Claude API key for authentication | ✅ Yes | - |
context-file | AI agent context file to analyze (CLAUDE.md or AGENTS.md) | ✅ Yes | - |
The action communicates success/failure via standard exit codes:
The generated recommendations provide insights for these essential AI agent context documentation sections:
🎯 Detected Languages & Standards (New!)
Core Sections:
New Two-Section Format:
Focus on Critical Context Only:
on:
workflow_dispatch:
inputs:
detailed_analysis:
description: 'Run detailed analysis'
required: false
default: true
type: boolean
jobs:
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: guyaluk/contextor@v0
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
context-file: 'CLAUDE.md'
on:
schedule:
- cron: '0 9 * * 1' # Weekly analysis on Mondays at 9 AM UTC
workflow_dispatch:
jobs:
weekly-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Weekly AI Context Analysis
uses: guyaluk/contextor@v0
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
context-file: 'CLAUDE.md'
on:
pull_request:
branches: [main]
jobs:
analyze-pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Analyze codebase for AI agent context recommendations
uses: guyaluk/contextor@v0
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
context-file: 'CLAUDE.md'
Check the examples/ directory for complete workflow examples:
basic-usage.yml - Basic analysis workflow that displays AI agent context recommendations in step summaryThe action uses standard exit codes. You can add steps that run conditionally:
- name: Run AI Agent Context Optimizer
uses: guyaluk/contextor@v0
with:
claude-api-key: ${{ secrets.CLAUDE_API_KEY }}
context-file: 'CLAUDE.md'
- name: Success notification
if: success()
run: echo "✅ Analysis completed successfully! Check step summary above for recommendations"
- name: Failure notification
if: failure()
run: echo "❌ Analysis failed! Check the logs above for details"
This action follows semantic versioning:
@v0 - Latest v0.x.x (current version)@v0.1 - Latest v0.1.x patch@v0.1.0 - Specific version (for maximum control)v0, v1) - Automatically updated to latestv0.1, v0.2) - Updated to latest patchv0.1.0, v0.1.1) - Immutable specific versionsAction fails with API key error:
❌ Error: CLAUDE_API_KEY environment variable is required
CLAUDE_API_KEY to your repository secretsNo recommendations generated:
Python environment errors:
agent/README.md for setup instructionsContributions are welcome! Please:
To test changes locally:
# Build the Docker image
docker build -t contextor .
# Test with a sample repository
docker run --rm -v $(pwd):/github/workspace \
-e CLAUDE_API_KEY=your_key_here \
contextor
I'd love to hear from users about their experience with this action! Whether you have:
Feel free to reach out:
Your input helps make this tool better for everyone using AI-assisted development!
This action helps bridge the gap between human developers and AI assistants by ensuring your project documentation is always current, comprehensive, and AI-friendly.
1000+ skills curated from Anthropic, Vercel, Stripe, and other engineering teams
A Claude Code skill by Hao (駱君昊) that learns your Facebook voice and auto-posts to FB / IG / Threads / X with a 14-day c
Claude Code skill for YouTube creators — channel audits, video SEO, retention scripts, thumbnails, content strategy, Sho
AI image generation skill for Claude Code -- Creative Director powered by Gemini