code-analyzer
БесплатноБез исполняемых скриптовНе проверенAnalyzes code for quality and best practices
от dexhorthy★ 44 звезды на GitHubОб этом скилле
Code Analyzer Skill
A comprehensive skill for analyzing code quality, detecting issues, and suggesting improvements.
Overview
This skill provides tools to analyze code files for:
- Code quality issues
- Best practice violations
- Security vulnerabilities
- Performance problems
- Style inconsistencies
Instructions
When using this skill to analyze code:
- Understand Context: Ask about the project type and language
- Analyze Thoroughly: Check for bugs, security issues, and performance
- Provide Actionable Feedback: Give specific, helpful suggestions
- Prioritize Issues: Focus on critical issues first
- Be Constructive: Frame feedback positively
Tools
analyze
Analyzes a single code file for quality and best practices.
async function analyze(
filePath: string,
language: string,
config?: AnalysisConfig
): Promise<AnalysisReport>
Parameters:
filePath: Path to the file to analyzelanguage: Programming language (javascript, typescript, python, java, etc.)config: Optional configuration for analysis rules
Returns:
AnalysisReport: Detailed analysis results with issues and suggestions
scan
Scans a directory for code files to analyze.
async function scan(
directory: string,
options?: ScanOptions
): Promise<string[]>
Parameters:
directory: Directory to scanoptions: Optional scan configuration (recursive, file patterns, etc.)
Returns:
- Array of file paths found
report
Generates a formatted report from analysis results.
async function report(
results: AnalysisReport[],
format: 'text' | 'json' | 'html'
): Promise<string>
Parameters:
results: Array of analysis reportsformat: Output format (text, json, or html)
Returns:
- Formatted report string
Configuration
The skill can be configured with custom rules and settings:
name: code-analyzer
config:
severity: warning # Minimum severity to report (info, warning, error)
rules:
no-console: warning
no-eval: error
no-var: warning
max-complexity: 10
max-lines: 500
excludePatterns:
- '**/*.test.ts'
- '**/*.spec.ts'
- '**/node_modules/**'
Examples
Analyze a Single File
const result = await analyze('./src/main.ts', 'typescript');
console.log(await report([result], 'text'));
Scan and Analyze Directory
const files = await scan('./src', { recursive: true });
const results = await Promise.all(
files.map(file => analyze(file, detectLanguage(file)))
);
console.log(await report(results, 'html'));
With Custom Configuration
const config = {
severity: 'error',
rules: {
maxComplexity: 5,
maxLines: 200,
},
};
const result = await analyze('./src/main.ts', 'typescript', config);
Supported Languages
- JavaScript (ES5, ES6+)
- TypeScript
- Python 2 and 3
- Java
- Go
- Rust
- C/C++
- Ruby
- PHP
Limitations
- Large files (>1MB) may be slow to analyze
- Some language-specific features may not be detected
- Accuracy depends on code clarity and structure
- Does not execute code, only static analysis
Best Practices
When using this skill:
- Start Small: Analyze individual files before entire projects
- Configure Appropriately: Adjust rules for your project's needs
- Review Results: Not all suggestions may apply to your context
- Iterative Improvement: Fix critical issues first, then refine
- Combine with Tests: Use alongside automated testing
Attribution
Original skill from Claude Skills Library.
Установить code-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл code-analyzer?
Analyzes code for quality and best practices
Как установить скилл code-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл code-analyzer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic