Code quality
Marketplace for AI Agent Skills, Prompts, Agents, and MCP servers. Powered by @skillscraft.
npx -y skills add Pratiyush/agent-catalog --skill code-qualityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Analyze Java source files for code quality issues including style violations, complexity warnings, and common anti-patterns. Use when reviewing Java code, running quality checks, or preparing for code review.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
2.0 KB, as published. Nobody here has run it
Code Quality
When to use this skill
Activate when the user wants to:
- Review Java source files for style and quality issues
- Run pre-commit quality checks on Java code
- Detect common anti-patterns before code review
Instructions
- For style checks, run:
java scripts/CheckStyle.java <source-file-or-directory> - For anti-pattern detection, run:
java scripts/FindPatterns.java <source-file> - Parse the JSON output from each script
- Combine results and present findings sorted by severity (error > warning > info)
- For custom rules, pass the config file:
java scripts/CheckStyle.java --rules assets/default-rules.json <path>
Output format
Scripts output JSON to stdout:
{
"file": "MyClass.java",
"issues": [
{
"line": 15,
"rule": "method-too-long",
"severity": "warning",
"message": "Method 'processData' has 65 lines (max: 50)"
}
],
"summary": { "errors": 0, "warnings": 1, "info": 0 }
}
Default rules
The default ruleset is in assets/default-rules.json. Copy it and modify thresholds to customize. Key defaults:
- Max method length: 50 lines
- Max line width: 120 characters
- Max file length: 500 lines
- Cyclomatic complexity threshold: 10
Gotchas
- Java 17+ is required for single-file source execution (JEP 330)
- Scripts scan
.javafiles only — other file types are skipped - Directory mode scans recursively but skips
build/,target/, and hidden directories - The
assets/default-rules.jsoncan be modified but the schema must remain unchanged