agentleFS
HouseofmvpsHouseofmvps/ultraship/skills/clone-patterns/SKILL.md

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.

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
  1. Distinctive:

    Ask for the source project directory (must be cloned locally):

    line 16
  2. Distinctive:

    Create a prioritized adoption plan:

    line 69
  3. Distinctive:

    Add linting/formatting config

    line 73
  4. Distinctive:

    Add test framework and initial tests

    line 77
  5. Distinctive:

    Create custom error classes

    line 78
  6. Distinctive:

    Only apply patterns the user explicitly approves.

    line 96

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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
  • any count

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:

  1. TypeScript strict mode — update tsconfig.json, fix resulting errors
  2. Test framework — install vitest/jest, create first test, add test script
  3. Error handling — create base error class, add error middleware
  4. CI pipeline — create .github/workflows/ci.yml with lint, test, build
  5. 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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.