💡 摘要
AI准备技能分析存储库的准备情况,涵盖八个关键方面,并生成分阶段的改进路线图。
🎯 适合人群
🤖 AI 吐槽: “看起来很能打,但别让配置把人劝退。”
风险:Medium。建议检查:是否执行 shell/命令行指令;是否发起外网请求(SSRF/数据外发);文件读写范围与路径穿越风险;依赖锁定与供应链风险。以最小权限运行,并在生产环境启用前审计代码与依赖。
ai-ready-skill
A Claude Code skill for analyzing repository AI-readiness.
Scores 8 key aspects from 1-100 with ASCII progress bars, highlights problems by severity, and creates a phased refactoring roadmap.
╔══════════════════════════════════════════════════════════════════════╗
║ AI-READINESS REPORT ║
║ Repository: my-project ║
╠══════════════════════════════════════════════════════════════════════╣
║ OVERALL GRADE: B SCORE: 76/100 ↑+12 from last run ║
╠══════════════════════════════════════════════════════════════════════╣
║ 1. Documentation ████████░░ 82/100 ↑+5 ║
║ 2. Architecture ███████░░░ 71/100 →0 ║
║ 3. Testing ██████░░░░ 65/100 ↑+8 ║
║ 4. Type Safety ████████░░ 84/100 ↑+2 ║
║ 5. Agent Instructions █████░░░░░ 52/100 ↑+15 ║
║ 6. File Structure ████████░░ 78/100 →0 ║
║ 7. Context Optimization██████░░░░ 63/100 ↑+3 ║
║ 8. Security █████████░ 91/100 →0 ║
╚══════════════════════════════════════════════════════════════════════╝
Features
- 8 Aspect Analysis - Documentation, Architecture, Testing, Type Safety, Agent Instructions, File Structure, Context Optimization, Security
- 95 Sub-criteria - Deep analysis with 10-15 checks per aspect
- ASCII Dashboard - Visual progress bars and overall A-F grade
- Severity Classification - Critical / Warning / Info issue grouping
- Interactive Survey - Choose which issues to address
- Phased Roadmap - Quick Wins → Foundation → Advanced
- Template Generation - CLAUDE.md, ARCHITECTURE.md, llms.txt
- Progress Tracking - Delta comparison between runs (↑+5, ↓-3)
- Language Agnostic - Works with any programming language
Installation
Via skills.sh (recommended)
npx skills add viktor-silakov/ai-ready
skills.sh — universal skills manager for AI agents
Via npx
npx ai-ready-skill
Via npm
npm install -g ai-ready-skill ai-ready-skill install
Usage
After installation, use in Claude Code:
# Analyze current directory /ai-ready # Analyze specific repository /ai-ready /path/to/repo
CLI Commands
npx ai-ready-skill install # Install skill (default) npx ai-ready-skill check # Check if installed npx ai-ready-skill update # Update to latest version npx ai-ready-skill remove # Remove skill npx ai-ready-skill help # Show help
Workflow
- Discovery - Detects language, framework, existing files
- Analysis - Evaluates all 8 aspects with sub-criteria
- Scoring - Calculates weighted scores and overall grade
- Dashboard - Displays ASCII progress bars
- Problems - Lists issues grouped by severity
- Survey - Asks which issues to fix (Critical=Y, others=N)
- Plan Mode - Creates phased implementation roadmap
- Templates - Generates missing files from templates
- Report - Saves AI-READINESS-REPORT.md with history
Aspects & Weights
| Aspect | Weight | Key Checks | |--------|--------|------------| | Documentation | 15% | README, JSDoc, ADRs, ARCHITECTURE.md | | Architecture | 15% | Modularity, boundaries, coupling, cohesion | | Testing | 12% | Coverage, co-location, naming, CI integration | | Type Safety | 12% | Strict mode, any usage, null safety | | Agent Instructions | 15% | CLAUDE.md completeness and quality | | File Structure | 10% | 150-500 LOC, nesting ≤5, files per dir ≤15 | | Context Optimization | 11% | llms.txt, chunking-friendly, why-comments | | Security | 10% | .aiignore, secrets, PII, NEVER rules |
Grade Scale
| Grade | Score | Description | |-------|-------|-------------| | A | 90-100 | Excellent - AI-ready | | B | 75-89 | Good - Minor improvements needed | | C | 60-74 | Moderate - Notable gaps | | D | 45-59 | Poor - Significant work needed | | F | 0-44 | Critical - Major overhaul required |
Severity Levels
Critical (blocks AI effectiveness)
- Missing CLAUDE.md
- Missing README.md
- Files over 1000 LOC
- Hardcoded secrets
Warning (impacts efficiency)
- Files 500-1000 LOC
- Missing ARCHITECTURE.md
- Test coverage <50%
- Deep nesting (>5 levels)
Info (optimization opportunities)
- Files 400-500 LOC
- Missing llms.txt
- Minor documentation gaps
Generated Templates
The skill can generate these files:
- CLAUDE.md - AI assistant guide with project context, commands, conventions, ALWAYS/NEVER rules
- ARCHITECTURE.md - C4-style documentation with diagrams and design decisions
- llms.txt - LLM-optimized project index for quick context loading
Output Files
After running, the skill creates:
your-repo/
└── AI-READINESS-REPORT.md # Full report with history tracking
Requirements
- Claude Code CLI
- Node.js >= 18.0.0
License
MIT License - see LICENSE
Links
优点
- 对多个方面进行全面分析
- 生成可操作的改进路线图
- 使用ASCII仪表板进行可视化进度跟踪
缺点
- 需要Node.js和Claude Code CLI
- 可能需要针对特定语言进行调整
- 依赖外部技能管理器
相关技能
免责声明:本内容来源于 GitHub 开源项目,仅供展示和评分分析使用。
版权归原作者所有 viktor-silakov.
