
Quickdup
- 16 installs
- 466 repo stars
- Updated July 25, 2026
- managedcode/dotnet-skills
Helps with ai & agent building tasks.
About
quickdup is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- quickdup
- AI & Agent Building
- AI-coding skill
Quickdup by the numbers
- 16 all-time installs (skills.sh)
- +1 installs in the week ending Aug 2, 2026 (Skillselion tracking)
- Ranked #11,068 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 3, 2026 (Skillselion catalog sync)
npx skills add https://github.com/managedcode/dotnet-skills --skill quickdupAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 16 |
|---|---|
| repo stars | ★ 466 |
| Last updated | July 25, 2026 |
| Repository | managedcode/dotnet-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
QuickDup for .NET
Trigger On
- the repo wants
QuickDup - the team needs repeatable duplicate-code scans for C#
- the user asks about DRY cleanup, copy-paste detection, clone detection, or duplicate logic removal in a .NET repo
Value
- produce a concrete project delta: code, docs, config, tests, CI, or review artifact
- reduce ambiguity through explicit planning, verification, and final validation skills
- leave reusable project context so future tasks are faster and safer
Do Not Use For
- formatting-only work
- repos that intentionally use a different clone detector and do not want overlap
- generated-code churn where duplication findings would mostly be noise
Inputs
- the nearest
AGENTS.md - target solution, project, or source subtree
- current duplication hotspots and generated-code boundaries
Quick Start
1. Read the nearest AGENTS.md and confirm scope and constraints. 2. Run this skill's Workflow through the Ralph Loop until outcomes are acceptable. 3. Return the Required Result Format with concrete artifacts and verification evidence.
Workflow
1. Choose the scan target deliberately:
- whole solution for broad discovery
- bounded folders for targeted cleanup
2. Scan C# with .cs only unless the repo explicitly wants Razor, generated XML, or other extensions too. 3. Exclude generated and transient paths before trusting the results:
bin/obj/Migrations/when scaffold churn dominates*.g.cs*.generated.cs*.Designer.cs
4. Review the top patterns before refactoring anything. 5. Classify duplication before changing code:
- real structural duplication worth extraction
- domain-shape duplication that documents intent
- generated or acceptable duplication that should be ignored
6. Prefer small extractions, named helpers, shared value objects, or focused abstractions over flag-heavy merge methods. 7. Re-run QuickDup after the refactor and then run the repo's normal quality pass.
Bootstrap When Missing
If QuickDup is not available yet:
1. Detect current state:
command -v quickdupgo versionrg --files -g '.quickdup/ignore.json' -g '.quickdup/results.json'
2. Choose the install path deliberately:
- preferred when Go is available:
go install github.com/asynkron/Asynkron.QuickDup/cmd/quickdup@latest - official macOS/Linux fallback:
curl -sSL https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.sh | bash - official Windows fallback:
iwr -useb https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.ps1 | iex
3. Verify the installed CLI resolves correctly:
quickdup -h
4. Record exact duplication commands in AGENTS.md, for example:
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs"quickdup -path src -ext .cs -top 20quickdup -path . -ext .cs -select 0..5
5. If the repo wants stable suppressions, create .quickdup/ignore.json and review each ignored pattern intentionally. 6. Run one bounded scan and return status: configured or status: improved. 7. If the repo already standardizes on another clone detector and does not want QuickDup, return status: not_applicable.
Deliver
- repeatable duplicate-code detection for C#
- explicit exclude and suppression strategy
- concrete refactoring candidates instead of vague maintainability advice
Validate
- the scan target and excludes match the repo's real source boundaries
- generated-code noise is filtered before acting on findings
- duplication cleanup preserves behavior and is backed by relevant tests
QuickDupoutput is used as input to review, not as an automatic rewrite authority
Ralph Loop
Use the Ralph Loop for every task, including docs, architecture, testing, and tooling work.
1. Plan first (mandatory):
- analyze current state
- define target outcome, constraints, and risks
- write a detailed execution plan
- list final validation skills to run at the end, with order and reason
2. Execute one planned step and produce a concrete delta. 3. Review the result and capture findings with actionable next fixes. 4. Apply fixes in small batches and rerun the relevant checks or review steps. 5. Update the plan after each iteration. 6. Repeat until outcomes are acceptable or only explicit exceptions remain. 7. If a dependency is missing, bootstrap it or return status: not_applicable with explicit reason and fallback path.
Required Result Format
status:complete|clean|improved|configured|not_applicable|blockedplan: concise plan and current iteration stepactions_taken: concrete changes madevalidation_skills: final skills run, or skipped with reasonsverification: commands, checks, or review evidence summaryremaining: top unresolved items ornone
For setup-only requests with no execution, return status: configured and exact next commands.
Load References
- references/commands.md
- references/examples.md
- references/quickdup.md
Example Requests
- "Find duplicate C# logic in this solution."
- "Add QuickDup to this .NET repo."
- "Review the top QuickDup patterns before we refactor."
- "Set up a repeatable duplicate-code scan for CI or local cleanup."
{
"version": "1.0.0",
"category": "Metrics",
"packages": [
"QuickDup"
]
}
QuickDup CLI Commands
Basic Syntax
quickdup [options]Core Options
| Option | Description | Default |
|---|---|---|
-path <dir> | Root directory to scan | . (current directory) |
-ext <extensions> | File extensions to include | .cs |
-exclude <patterns> | Comma-separated glob patterns to exclude | none |
-top <n> | Show top N duplicate groups | all |
-select <range> | Select specific duplicate groups for detail | none |
-min-lines <n> | Minimum lines for a clone to be reported | 6 |
-min-tokens <n> | Minimum tokens for a clone to be reported | 50 |
-output <format> | Output format: text, json, html | text |
-o <file> | Write results to file | stdout |
Scanning Commands
Full Solution Scan
quickdup -path . -ext .csTargeted Folder Scan
quickdup -path src/Domain -ext .csMultiple Extensions
quickdup -path . -ext ".cs,.razor"With Exclusions
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs"Migration-Heavy Projects
quickdup -path . -ext .cs -exclude "bin/*,obj/*,Migrations/*,*.g.cs,*.generated.cs"Filtering Commands
Top N Duplicates
quickdup -path . -ext .cs -top 20Select Specific Groups
quickdup -path . -ext .cs -select 0..5Minimum Clone Size
quickdup -path . -ext .cs -min-lines 10 -min-tokens 100Output Commands
JSON Output
quickdup -path . -ext .cs -output json -o results.jsonHTML Report
quickdup -path . -ext .cs -output html -o duplicates.htmlStore Results for Suppression
quickdup -path . -ext .cs -output json -o .quickdup/results.jsonHelp and Version
quickdup -h
quickdup --help
quickdup --versionExit Codes
| Code | Meaning |
|---|---|
| 0 | Success, no duplicates found |
| 1 | Success, duplicates found |
| 2 | Error during scan |
Environment Variables
| Variable | Description |
|---|---|
QUICKDUP_CONFIG | Path to configuration file |
QUICKDUP_CACHE_DIR | Directory for cached parse results |
QuickDup Usage Examples
Scenario 1: Initial Discovery in a Large Solution
Goal: Find the worst duplication hotspots across an entire .NET solution.
# Step 1: Broad scan with standard exclusions
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -top 20
# Step 2: Review the top 5 patterns in detail
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -select 0..4
# Step 3: Export findings for team review
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -output html -o duplicates-report.htmlScenario 2: Domain Layer Audit
Goal: Focus on duplication within the Domain or Core project only.
# Scan the domain layer specifically
quickdup -path src/MyApp.Domain -ext .cs -top 10
# Compare with infrastructure layer
quickdup -path src/MyApp.Infrastructure -ext .cs -top 10Scenario 3: Pre-Refactoring Assessment
Goal: Identify extraction candidates before a planned refactoring sprint.
# Generate JSON for tooling integration
quickdup -path src -ext .cs -exclude "bin/*,obj/*,Migrations/*" -output json -o .quickdup/baseline.json
# Focus on larger clones that justify extraction
quickdup -path src -ext .cs -exclude "bin/*,obj/*,Migrations/*" -min-lines 15 -min-tokens 150 -top 10Scenario 4: CI Pipeline Integration
Goal: Fail the build when significant new duplication is introduced.
# GitHub Actions example
- name: Check for duplicate code
run: |
quickdup -path src -ext .cs -exclude "bin/*,obj/*,*.g.cs" -min-lines 10 -output json -o duplicates.json
# Fail if duplicates exceed threshold (custom script)
python scripts/check-duplicates.py duplicates.json --max-groups 5# Local CI simulation
quickdup -path src -ext .cs -exclude "bin/*,obj/*" -min-lines 10
if [ $? -eq 1 ]; then
echo "Warning: Duplicates detected"
fiScenario 5: Incremental Cleanup Workflow
Goal: Clean up duplication incrementally over multiple sprints.
# Sprint 1: Establish baseline and suppress known acceptable duplicates
quickdup -path . -ext .cs -exclude "bin/*,obj/*" -output json -o .quickdup/results.json
# Review and create .quickdup/ignore.json for acceptable patterns
# Sprint 2: Check for new duplicates only
quickdup -path . -ext .cs -exclude "bin/*,obj/*" -top 10
# Refactor the top 3 patterns
# Sprint 3: Re-scan and verify reduction
quickdup -path . -ext .cs -exclude "bin/*,obj/*" -top 10Scenario 6: Razor and C# Combined Scan
Goal: Detect duplication across both C# code and Razor views.
# Scan both file types
quickdup -path src -ext ".cs,.razor" -exclude "bin/*,obj/*,wwwroot/*"
# Focus on Razor views only
quickdup -path src -ext .razor -exclude "bin/*,obj/*"Scenario 7: Test Code Audit
Goal: Find duplicate test setup or assertion patterns.
# Scan test projects specifically
quickdup -path tests -ext .cs -exclude "bin/*,obj/*" -top 15
# Look for larger duplicates that suggest missing test helpers
quickdup -path tests -ext .cs -min-lines 20 -top 10Scenario 8: Migration-Heavy EF Core Project
Goal: Scan while excluding EF Core migration noise.
# Standard exclusion for EF Core projects
quickdup -path src -ext .cs -exclude "bin/*,obj/*,Migrations/*,**/Migrations/*,*.Designer.cs"
# If using multiple DbContexts with separate migration folders
quickdup -path src -ext .cs -exclude "bin/*,obj/*,**/Migrations/*,*.Designer.cs,*.Snapshot.cs"Scenario 9: Monorepo with Multiple Solutions
Goal: Scan specific bounded contexts in a large monorepo.
# Scan only the Orders bounded context
quickdup -path src/Orders -ext .cs -exclude "bin/*,obj/*" -top 10
# Compare duplication across contexts
quickdup -path src/Orders -ext .cs -exclude "bin/*,obj/*" -output json -o orders-dups.json
quickdup -path src/Inventory -ext .cs -exclude "bin/*,obj/*" -output json -o inventory-dups.jsonScenario 10: Quick Health Check
Goal: Fast sanity check before a code review or PR merge.
# Fast check with strict thresholds
quickdup -path src -ext .cs -exclude "bin/*,obj/*,*.g.cs" -min-lines 15 -top 5
# If clean, proceed; if not, investigate before mergingCommon Refactoring Patterns After Detection
Pattern: Repeated Null Checks
Before: Multiple files with identical null-checking logic.
After: Extract to a guard helper or use a validation library.
Pattern: Similar LINQ Queries
Before: Duplicate filtering and projection logic across services.
After: Extract to a shared query specification or repository method.
Pattern: Copy-Paste DTOs
Before: Identical DTO definitions in multiple projects.
After: Move to a shared contracts project or use record inheritance.
Pattern: Repeated Configuration Builders
Before: Similar builder patterns across integration tests.
After: Extract to a test fixture base class or builder helper.
QuickDup for .NET Repositories
What It Is
QuickDup is a fast clone detector that surfaces structural duplication candidates. Treat its output as a review queue, not as proof that two blocks should always be merged.
Installation Paths
Use the official upstream install paths and keep the chosen command in AGENTS.md:
- preferred when Go is available:
go install github.com/asynkron/Asynkron.QuickDup/cmd/quickdup@latest- official macOS/Linux fallback:
curl -sSL https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.sh | bash- official Windows fallback:
iwr -useb https://raw.githubusercontent.com/asynkron/Asynkron.QuickDup/main/install.ps1 | iexVerify the CLI after installation:
quickdup -hGood Default Scan Commands
Scan the whole repository:
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs"Show the top 20 patterns:
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -top 20Inspect a bounded set of patterns:
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -select 0..5Compare a feature branch against main:
quickdup -path . -ext .cs -exclude "bin/*,obj/*,*.g.cs,*.generated.cs,*.Designer.cs" -compare origin/main..HEADCommon Excludes for C#
Start with these when the repo has a lot of generated files:
bin/*obj/**.g.cs*.generated.cs*.Designer.csMigrations/*when migration scaffolding dominates
Only exclude real source folders when the team consciously accepts that duplication there is not actionable.
How to Review Findings
For each candidate:
1. Confirm the code is hand-written and still active. 2. Confirm the duplication is not documenting domain shape on purpose. 3. Check whether the repeated block differs only by injected behavior, parameter bundles, or tiny wrappers. 4. Decide whether the fix belongs in:
- a helper method
- a value object
- a shared service
- a small generic abstraction
- an ignore rule because the duplication is intentional
5. Re-run the relevant tests after each small cleanup.
Refactoring Patterns That Usually Fit
Structural Duplication with Small Variations
Signal:
- same control flow
- same loop or branch shape
- only the inner behavior changes
Typical fix:
- extract the shared structure
- pass the varying behavior explicitly
Avoid:
- giant helper methods controlled by flags
Repeated Parameter Bundles
Signal:
- the same 4+ values travel together through multiple calls
Typical fix:
- create a named context object or value type
Repeated Argument Unpacking
Signal:
- many methods repeat the same guards and argument extraction logic
Typical fix:
- create a small parsing or validation helper
Structural Switch Duplication
Signal:
- repeated
switchor pattern matching on the same domain type
Keep it when:
- the switch documents the domain shape clearly
- each case is trivial
Refactor it when:
- the same switch grows across several sites
- behavior starts drifting between copies
Suppression
If a pattern is intentionally duplicated, suppress it in .quickdup/ignore.json:
{
"description": "Intentional duplication that should not reappear in review output",
"ignored": ["56c2f5f9b27ed5a0"]
}Do not suppress findings just to make a report look cleaner. Suppress only when the team has reviewed and accepted the duplication.
CI Guidance
QuickDup is best used as:
- an advisory report in CI
- a scheduled maintainability check
- a local cleanup aid before or during refactors
It is usually a poor primary gate unless the team already trusts the excludes, thresholds, and suppression set.
Recommended Verification After Cleanup
After refactoring from QuickDup findings:
1. run the relevant automated tests 2. run the repo's formatter and analyzer pass 3. re-run the same QuickDup command 4. compare findings and ensure the cleanup actually reduced meaningful duplication