code-quality
Skill36 starsChanged 2 months agoApache-2.0View on GitHub
Deep code review and quality analysis for the edda Rust project
77 other projects use a version of this.
Adopted by
Most recently taken up by
- magnusrodseth/dotfilestheir own version, first seen Nov 8, 2026
- KadirHarmanc/nazar-skilltheir own version, first seen Nov 8, 2026
- AndersonAndrad/skillstheir own version, first seen Nov 8, 2026
- Mehul72/skillstheir own version, first seen Nov 8, 2026
- eea/eea.agent.skillstheir own version, first seen Nov 8, 2026
- notque/vexjoy-agenttheir own version, first seen Nov 7, 2026
Used with
Projects with it also use spring-boot, logging-patterns and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ffsshhttiikkSkillspring-boot
Spring Boot framework and Java enterprise patterns
Also in 3 projects that use this
DIL8654Skilllogging-patterns
Keep logs structured, correlated, low-noise, and safe for production support. Use when adding operational logging, reviewing observability, or improving diagnostics in .NET services.
Also in 3 projects that use this
mstuder-slalomSkilljpa-patterns
JPA/Hibernate patterns for entity design, relationships, query optimization, transactions, auditing, indexing, pagination, and pooling in Spring Boot.
Also in 3 projects that use this
ffsshhttiikkSkilldesign-patterns
Practical application and coding skills for Design Patterns
Also in 4 projects that use this
glommerSkillpr-workflow
General guidelines for Commits, formatting, CI, dependencies, security
Also in 4 projects that use this
vm0-aiSkillcli-design
Design patterns and conventions for the Okou CLI user experience
Also in 3 projects that use this
Other versions77 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 77
- tursodatabase/turso★ 25ksame name
- superdesigndev/treg★ 7.7ksame name
- doorkeeper-gem/doorkeeper★ 5.5ksame name
- static-web-server/static-web-server★ 2.4ksame name
- piomin/claude-ai-spring-boot★ 1.4ksame name
- microsoft/winappCli★ 1.4ksame name
- glommer/pgmicro★ 1.2ksame name
- vm0-ai/vm0★ 1.2ksame name
- rommapp/argosy-launcher★ 710same name
- waybarrios/opencode-power-pack★ 547same name
67 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agent-browserSkill
- arch-specSkill
- code-reviewSkill
- commitSkill
- coord-delegateSkill
- coord-handoffSkill
- coord-orchestrateSkill
- coord-requestSkill
- coord-reviewSkill
- coord-runSkill
- coord-syncSkill
- dispatchSkill
- edda-releaseSkill
- fleet-epic-splitSkill
- fleet-managerSkill
- fleet-orchestrateSkill
- fleet-pr-loopSkill
- fleet-reviewSkill
- fleet-triadSkill
- fleet-workerSkill
- ground-checkSkill
- health-checkSkill
- intel-scanSkill
- issue-actionSkill
- issue-compactSkill
- issue-createSkill
- issue-intakeSkill
- issue-pipelineSkill
- issue-planSkill
- issue-scanSkill
- parallel-waveSkill
- path-forwardSkill
- plan-decomposeSkill
- plan-validateSkill
- pr-checkSkill
- project-planSkill
- Project PrinciplesSkill
- pr-review-loopSkill
- pr-reviewSkill
- pull-requestSkill
- regression-guardSkill
- skill-aliasSkill
- skill-craftSkill
- skill-testSkill
- spec-review-modesSkill
- tech-debtSkill
- testingSkill
- tracking-issueSkill
- verifiable-goal-loopSkill
- fleet-orchestrateSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
62 rules. 0 are common, 36 are distinctive, and 26 are very specific to this project.
0
Common
Most of the 71 edited versions we read keep these.
36
Distinctive
This author's own choices. Worth a look.
26
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
cleanup: - Remove unnecessary error suppression and dead code
- Distinctive: line 38
If input is a PR number (digits only), fetch commits from GitHub PR
- Very specific: line 39
If input is a commit range (contains ..), use git rev-list
- Distinctive: line 40
If input is a single commit hash, review just that commit
- Distinctive: line 41
If input is natural language, review commits from the last week
- Very specific: line 44
Create directory: codereviews/YYYYMMDD (based on current date)
- Distinctive: line 45
All review files will be stored in this directory
- Very specific: line 48
Create codereviews/YYYYMMDD/commit-list.md with checkboxes for each commit
- Distinctive: line 50
Add review criteria section
- Very specific: line 54
Create individual review file: codereviews/YYYYMMDD/review-{short-hash}.md
- Very specific: line 61
Check for mocking internal code (only mock external HTTP with wiremock)
- Very specific: line 62
Verify real database usage with sqlx::test (not mock pools)
- Very specific: line 63
Verify real filesystem usage with tempfile (not mock fs)
- Distinctive: line 64
Check test initialization follows production flow
- Distinctive: line 66
Check for implementation detail testing
- Distinctive: line 77
Verify safety invariants are documented
- Distinctive: line 84
Check for commented-out code blocks
- Very specific: line 85
Verify #[cfg(test)] is used correctly
- Very specific: line 91
Verify domain types use the newtype pattern (e.g., SessionId(Uuid))
- Distinctive: line 113
Verify environment variables are used for configuration
- Distinctive: line 114
Check for hardcoded secrets or API keys
- Very specific: line 136
Verify parameterized queries with $1, $2 syntax
- Very specific: line 137
Check for query! vs query_as usage consistency
- Very specific: line 138
Verify sqlx::FromRow derive on all model structs
- Distinctive: line 144
Verify tests cover error paths, not just happy paths
- Distinctive: line 148
Check import grouping (std → external → internal)
- Distinctive: line 153
Create individual review file for each commit with this structure:
- Distinctive: line 224
Add summary section to commit-list.md:
- Very specific: line 272
Use gh pr view {pr-id} --json commits --jq '.commits[].oid' to fetch PR commits
- Very specific: line 273
Use git rev-list {range} --reverse for commit ranges
- Very specific: line 274
Use git log --since="1 week ago" --pretty=format:"%H" for natural language
- Very specific: line 275
Use git show --stat {commit} for change summary
- Very specific: line 276
Use git show {commit} to analyze actual code changes
- Very specific: line 293
Search in crates/ directory for these patterns:
- Distinctive: line 334
No side effects in error handling path
- Distinctive: line 336
No cleanup logic (DB rollback, file handles)
- Very specific: line 351
Remove #[allow(...)] and fix the underlying clippy warning
- Very specific: line 353
Remove log-and-return patterns, use ?
- Distinctive: line 354
Remove dead code entirely
- Very specific: line 365
Create feature branch: refactor/code-cleanup-YYYYMMDD
- Distinctive: line 366
Commit with conventional commit message:
- Distinctive: line 390
Check if failure is related to changes
- Distinctive: line 391
If related: fix and push
- Distinctive: line 392
If unrelated (flaky test): note in report and retry
- Very specific: line 426
Use Grep to find #[allow( patterns in crates/ directory
- Very specific: line 427
Use Grep to find .unwrap() in non-test src/ files
- Distinctive: line 429
Test thoroughly after each change
- Distinctive: line 430
Create atomic commits for easier review
- Distinctive: line 438
Don't add functionality until needed
- Distinctive: line 439
Start with simplest solution
- Very specific: line 443
Use ? operator for error propagation
- Distinctive: line 444
Only handle errors when you can meaningfully recover
- Distinctive: line 448
Use newtypes for domain concepts
- Distinctive: line 449
Use enums for state machines
- Very specific: line 450
Use thiserror for library errors, anyhow for binaries
- Very specific: line 453
Never add #[allow(...)] attributes
- Distinctive: line 454
Never suppress clippy lints
- Distinctive: line 464
Use markdown formatting for readability
- Distinctive: line 469
If GitHub CLI fails, fall back to git commands
- Distinctive: line 470
If commit doesn't exist, report and continue with others
- Distinctive: line 471
If file is too large, summarize key points
- Distinctive: line 472
Always complete the review even if some steps fail
“Common” is measured: kept by at least 6 in 10 of the 71 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Quality Specialist
You are a code quality specialist for the edda project. Your role is to perform comprehensive code reviews and clean up code quality issues in Rust code.
Operations
This skill supports two operations:
- review - Comprehensive code review with bad smell detection
- cleanup - Remove unnecessary error suppression and dead code
Parse the operation from the args parameter:
review <pr-id|commit-id|description>- Review code changescleanup- Clean up code quality issues
Operation 1: Code Review
Perform comprehensive code reviews that analyze commits and generate detailed reports.
Usage Examples
review 123 # Review PR #123
review abc123..def456 # Review commit range
review abc123 # Review single commit
review "authentication changes" # Review by descriptionWorkflow
- Parse Input and Determine Review Scope
- If input is a PR number (digits only), fetch commits from GitHub PR
- If input is a commit range (contains
..), use git rev-list - If input is a single commit hash, review just that commit
- If input is natural language, review commits from the last week
- Create Review Directory Structure
- Create directory:
codereviews/YYYYMMDD(based on current date) - All review files will be stored in this directory
- Create directory:
- Generate Commit List
- Create
codereviews/YYYYMMDD/commit-list.mdwith checkboxes for each commit - Include commit metadata: hash, subject, author, date
- Add review criteria section
- Create
- Review Each Commit Against Bad Smells
- For each commit, analyze code changes against all code quality issues
- Create individual review file:
codereviews/YYYYMMDD/review-{short-hash}.md
Review Criteria (Bad Smell Analysis)
Analyze each commit for these Rust code quality issues:
Testing Patterns (refer to
.claude/skills/testing/SKILL.md)- Check for mocking internal code (only mock external HTTP with
wiremock) - Verify real database usage with
sqlx::test(not mock pools) - Verify real filesystem usage with
tempfile(not mock fs) - Check test initialization follows production flow
- Evaluate test quality and completeness
- Check for implementation detail testing
Error Handling (Bad Smell #1)
- Identify unnecessary
.unwrap()calls in non-test code - Flag
#[allow(unused)]or other suppression attributes - Identify log-and-return-error patterns (should just propagate with
?) - Flag
.unwrap_or_default()hiding real errors - Suggest
?propagation and properthiserror/anyhowusage
Unsafe Code (Bad Smell #2)
- Flag all
unsafeblocks - Verify safety invariants are documented
- Suggest safe alternatives where possible
- Zero tolerance for
unsafewithout justification
Dead Code (Bad Smell #3)
- Identify
#[allow(dead_code)]attributes - Flag unused functions, structs, enums, and modules
- Check for commented-out code blocks
- Verify
#[cfg(test)]is used correctly
Type System Violations (Bad Smell #4)
- Flag raw primitive types where newtypes should be used (
Stringfor IDs) - Flag
ascasts that could lose precision - Flag
.clone()without justification - Verify domain types use the newtype pattern (e.g.,
SessionId(Uuid))
Unwrap Usage (Bad Smell #5)
- Flag
.unwrap()in non-test code - Flag
.expect()without meaningful messages - Suggest
.ok_or(),.map_err(), or?operator - Exception:
.unwrap()is acceptable in tests and after infallible operations
Clippy Suppressions (Bad Smell #6)
- Flag all
#[allow(clippy::...)]attributes - Zero tolerance for suppressions
- Require fixing the underlying code
- Flag
#[allow(warnings)],#[allow(unused)]
Panic-prone Code (Bad Smell #7)
- Flag
panic!(),todo!(),unimplemented!()in production code - Flag array indexing without bounds checking
- Suggest
Option/Resultalternatives - Exception:
unreachable!()after exhaustive checks is acceptable
Hardcoded Configuration (Bad Smell #8)
- Flag hardcoded URLs, ports, and connection strings
- Verify environment variables are used for configuration
- Check for hardcoded secrets or API keys
Unnecessary Cloning (Bad Smell #9)
- Flag
.clone()where references would suffice - Flag
Stringparameters where&strwould work - Flag
Vec<T>parameters where&[T]would work - Suggest borrowing patterns
Over-Engineering (Bad Smell #10)
- Flag traits with only one implementation
- Flag excessive generics where concrete types suffice
- Flag builder patterns for simple structs
- Flag premature abstractions (YAGNI violations)
Async Anti-Patterns (Bad Smell #11)
- Flag
tokio::spawnwithout error handling - Flag blocking operations in async context
- Flag unnecessary
asyncon functions that don't.await - Flag
block_oninside async runtime
SQL Query Issues (Bad Smell #12)
- Flag string concatenation in SQL queries
- Verify parameterized queries with
$1, $2syntax - Check for
query!vsquery_asusage consistency - Verify
sqlx::FromRowderive on all model structs
Test Quality (Bad Smell #13)
- Flag tests that only check
is_ok()without verifying values - Flag tests that duplicate implementation logic
- Flag tests without meaningful assertions
- Verify tests cover error paths, not just happy paths
Import Organization (Bad Smell #14)
- Flag wildcard imports (
use module::*) - Check import grouping (std → external → internal)
- Flag unused imports
- Check for mocking internal code (only mock external HTTP with
Generate Review Files
Create individual review file for each commit with this structure:
# Code Review: {short-hash} ## Commit Information **Hash:** `{full-hash}` **Subject:** {commit-subject} **Author:** {author-name} <{author-email}> **Date:** {commit-date} ## Changes Summary ```diff {git show --stat output}Bad Smell Analysis
1. Error Handling (#1, #5)
- Unwrap usage: [locations]
- Error propagation issues: [locations]
- Assessment: [detailed analysis]
2. Type Safety (#4)
- Raw primitives for domain types: [locations]
- Unsafe casts: [locations]
- Recommendations: [improvements]
3. Code Quality (#3, #6, #9, #10)
- Dead code: [locations]
- Clippy suppressions: [locations]
- Unnecessary clones: [locations]
- Over-engineering: [locations]
4. Safety (#2, #7)
- Unsafe blocks: [locations]
- Panic-prone code: [locations]
- Recommendations: [alternatives]
5. Async & SQL (#11, #12)
- Async anti-patterns: [locations]
- SQL query issues: [locations]
- Recommendations: [improvements]
6. Test Quality (#13)
- Test files modified: [list]
- Quality assessment: [analysis]
- Missing scenarios: [list]
7. Import & Style (#14)
- Wildcard imports: [locations]
- Organization issues: [locations]
Files Changed
{list of files}
Recommendations
- [Specific actionable recommendations]
- [Highlight concerns]
- [Note positive aspects]
Review completed on: {date}
- Update Commit List with Links
- Replace checkboxes with links to review files
- Mark commits as reviewed with [x]
Generate Summary
Add summary section to commit-list.md:
## Review Summary **Total Commits Reviewed:** {count} ### Key Findings by Category #### Critical Issues (Fix Required) - [List P0 issues found across commits] #### High Priority Issues - [List P1 issues found across commits] #### Medium Priority Issues - [List P2 issues found across commits] ### Bad Smell Statistics - Error handling issues: {count} - Unsafe code: {count} - Dead code: {count} - Type safety violations: {count} - Unwrap usage: {count} - Clippy suppressions: {count} - Panic-prone code: {count} - [etc for all 14 categories] ### Architecture & Design - Adherence to YAGNI: [assessment] - Error propagation quality: [assessment] - Type safety quality: [assessment] - Over-engineering concerns: [list] - Good design decisions: [list] ### Action Items - [ ] Priority fixes (P0): [list with file:line references] - [ ] Suggested improvements (P1): [list] - [ ] Follow-up tasks (P2): [list]- Final Output
- Display summary of review findings
- Provide path to review directory
- Highlight critical issues requiring immediate attention
Implementation Notes for Review Operation
- Use
gh pr view {pr-id} --json commits --jq '.commits[].oid'to fetch PR commits - Use
git rev-list {range} --reversefor commit ranges - Use
git log --since="1 week ago" --pretty=format:"%H"for natural language - Use
git show --stat {commit}for change summary - Use
git show {commit}to analyze actual code changes - Generate review files in date-based directory structure
Operation 2: Code Cleanup
Automatically find and fix code quality issues that violate project principles.
Usage
cleanupWorkflow
Search for Code Quality Issues
Search in
crates/directory for these patterns:Pattern A: Unnecessary
#[allow(...)]Attributes#[allow(dead_code)] fn unused_function() { ... } #[allow(clippy::too_many_arguments)] fn complex_function(...) { ... }Pattern B: Unwrap in Non-Test Code
// In src/ (not tests/) let value = result.unwrap(); let item = option.expect("should exist");Pattern C: Log-and-Return-Error
match operation() { Ok(val) => Ok(val), Err(e) => { tracing::error!("Operation failed: {e}"); Err(e) } }DO NOT remove patterns that have:
- Meaningful error recovery (retry, fallback with different strategy)
- Resource cleanup (file handles, database transactions)
- Error type transformation (converting domain errors to HTTP responses)
- Security-critical contexts (auth, crypto)
Target: Find up to 10 fixable issues
Validate Safety
For each identified issue, verify:
- No side effects in error handling path
- Framework has global error handler (Axum's error handling)
- No cleanup logic (DB rollback, file handles)
- Not security-critical code
Create summary table:
| File | Lines | Pattern | Safe to Fix | Reason | |------|-------|---------|-------------|--------| | crates/edda-bridge-claude/src/lib.rs | 45-52 | Log + Return Err | Yes | No recovery logic | | ... | ... | ... | ... | ... |Modify Code
For each validated issue:
- Remove
#[allow(...)]and fix the underlying clippy warning - Replace
.unwrap()with?or proper error handling - Remove log-and-return patterns, use
?propagation - Remove dead code entirely
Run verification:
cargo fmt cargo clippy -- -D warnings cargo test- Remove
Create Pull Request
- Create feature branch:
refactor/code-cleanup-YYYYMMDD - Commit with conventional commit message:
refactor(scope): clean up code quality issues Remove unnecessary #[allow()] attributes, replace .unwrap() with proper error handling, and remove dead code. Files modified: - crates/edda-bridge-claude/src/lib.rs (unwrap → ?) - crates/edda-store/src/lib.rs (removed dead_code allow) All clippy warnings resolved without suppressions. - Scope examples:
api,auth,db,cli,runner,sandbox,storage,contract,core - Push and create PR with summary table
- Create feature branch:
Monitor CI Pipeline
Monitor CI checks:
gh pr checks <PR_NUMBER> --watch --interval 20If CI fails:
- Check if failure is related to changes
- If related: fix and push
- If unrelated (flaky test): note in report and retry
Report to User
Provide summary report:
## Code Cleanup Summary ### Files Modified | File | Changes | Pattern Fixed | |------|---------|---------------| | ... | ... | ... | ### Validation Results - Issues identified: {count} - Issues fixed: {count} - Issues skipped: {count} (with reasons) ### CI Status - Format: [PASS/FAIL] - Clippy: [PASS/FAIL] - Tests: [PASS/FAIL] ### PR Link https://github.com/... ### Next Steps - [ ] Merge PR (if approved) - [ ] Address review comments (if any)
Implementation Notes for Cleanup Operation
- Use Grep to find
#[allow(patterns in crates/ directory - Use Grep to find
.unwrap()in non-testsrc/files - Validate each fix manually before applying
- Test thoroughly after each change
- Create atomic commits for easier review
- Reference CLAUDE.md principles
General Guidelines
Code Quality Principles from CLAUDE.md
- YAGNI (You Aren't Gonna Need It)
- Don't add functionality until needed
- Start with simplest solution
- Avoid premature abstractions
- Let Errors Propagate
- Use
?operator for error propagation - Only handle errors when you can meaningfully recover
- Trust Axum's error handling for HTTP responses
- Use
- Strict Type System
- Use newtypes for domain concepts
- Use enums for state machines
- Use
thiserrorfor library errors,anyhowfor binaries
- Zero Tolerance for Clippy Warnings
- Never add
#[allow(...)]attributes - Never suppress clippy lints
- Fix underlying issues
- Never add
Review Communication Style
- Be specific and actionable in recommendations
- Reference exact file paths and line numbers
- Cite relevant bad smell categories by number
- Prioritize issues by severity (P0 = critical, P1 = high, P2 = medium)
- Highlight both problems AND good practices
- Use markdown formatting for readability
Error Handling in Reviews
When encountering errors:
- If GitHub CLI fails, fall back to git commands
- If commit doesn't exist, report and continue with others
- If file is too large, summarize key points
- Always complete the review even if some steps fail
Example Usage
# Review a pull request
args: "review 123"
# Review commit range
args: "review abc123..def456"
# Clean up code quality issues
args: "cleanup"Output Structure
For Review Operation
codereviews/
└── YYYYMMDD/
├── commit-list.md # Master checklist with summary
├── review-abc123.md # Individual commit review
├── review-def456.md # Individual commit review
└── ...For Cleanup Operation
- Branch:
refactor/code-cleanup-YYYYMMDD - PR with detailed summary table
- Individual commits for each file modified
References
- Project principles:
.claude/skills/project-principles/SKILL.md - Testing patterns:
.claude/skills/testing/SKILL.md - CLAUDE.md project guidelines
- Conventional commits: https://www.conventionalcommits.org/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

