clone-patterns
Skill123 starsChanged 8 months agoMITView on GitHub
Learn From the Best — analyze patterns from any codebase and apply them to yours. Use when user wants to adopt best practices from another repo, compare code quality, or learn how top projects are structured.
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- a11ySkill
- architectureSkill
- brainstormingSkill
- canarySkill
- code-reviewSkill
- competeSkill
- costSkill
- demoSkill
- deploySkill
- dispatching-parallel-agentsSkill
- evalsSkill
- executing-plansSkill
- finishing-a-development-branchSkill
- frontend-designSkill
- growSkill
- guardSkill
- index-fixSkill
- investigateSkill
- launchSkill
- learnSkill
- onboardSkill
- pentestSkill
- perf-auditSkill
- receiving-code-reviewSkill
- releaseSkill
- requesting-code-reviewSkill
- rescueSkill
- retroSkill
- revise-claude-mdSkill
- security-auditSkill
- seo-auditSkill
- seo-strategySkill
- ship-gateSkill
- sprintSkill
- staying-currentSkill
- subagent-driven-developmentSkill
- systematic-debuggingSkill
- test-driven-developmentSkill
- using-git-worktreesSkill
- using-ultrashipSkill
- verification-before-completionSkill
- visual-diffSkill
- writing-plansSkill
- writing-skillsSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 6 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 16
Ask for the source project directory (must be cloned locally):
- Distinctive: line 69
Create a prioritized adoption plan:
- Distinctive: line 73
Add linting/formatting config
- Distinctive: line 77
Add test framework and initial tests
- Distinctive: line 78
Create custom error classes
- Distinctive: line 96
Only apply patterns the user explicitly approves.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Learn From the Best
Analyze any codebase's patterns and apply the best ones to your project.
Process
Phase 1: Analyze Source
Ask for the source project directory (must be cloned locally):
- "Which repo do you want to learn from? Provide the local path."
node ${CLAUDE_PLUGIN_ROOT}/tools/pattern-analyzer.mjs <source-directory> --compare=<your-project-directory>Parse the JSON output.
Phase 2: Pattern Report
Present the source project's patterns:
Project Structure:
- How they organize code (feature-based, layer-based, hybrid)
- Naming conventions
- Key directories
Testing Strategy:
- Framework and location
- Test-to-source ratio
- Integration vs unit separation
Code Quality:
- Average file length
- Export patterns
- Linting and formatting setup
TypeScript Practices:
- Strict mode usage
- Type vs interface preference
anycount
Error Handling:
- Custom error classes
- Middleware patterns
- Global handlers
CI/CD:
- Pipeline setup
- Automated steps
Phase 3: Comparison
Show side-by-side comparison between the source project and yours:
For each area, show:
- What they do vs what you do
- Whether the difference matters
- Specific recommendation
Phase 4: Adoption Plan
Create a prioritized adoption plan:
Priority 1 (High Impact, Low Effort):
- Enable TypeScript strict mode
- Add linting/formatting config
- Adopt naming conventions
Priority 2 (High Impact, Medium Effort):
- Add test framework and initial tests
- Create custom error classes
- Add CI pipeline
Priority 3 (Medium Impact, Higher Effort):
- Restructure project directories
- Add integration tests
- Improve documentation
Phase 5: Apply Patterns
For each pattern the user wants to adopt, implement it:
- TypeScript strict mode — update tsconfig.json, fix resulting errors
- Test framework — install vitest/jest, create first test, add test script
- Error handling — create base error class, add error middleware
- CI pipeline — create .github/workflows/ci.yml with lint, test, build
- Linting — add eslint config matching source project's style
Only apply patterns the user explicitly approves.
Key Principle
Steal like an artist. The best codebases didn't invent their patterns — they borrowed from others and refined them. Learn what works, adapt it to your context, and make it your own.
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.

