Agent SkillsHouseofmvps/ultraship › clone-patterns

clone-patterns

GitHub

分析任意代码库的最佳实践模式,对比当前项目,生成采纳计划并协助实施,帮助开发者学习优秀架构与规范。

skills/clone-patterns/SKILL.md Houseofmvps/ultraship

Trigger Scenarios

用户希望借鉴其他仓库的最佳实践 用户想要比较代码质量或结构差异 用户需要制定代码重构或规范升级计划

Install

npx skills add Houseofmvps/ultraship --skill clone-patterns -g -y
More Options

Use without installing

npx skills use Houseofmvps/ultraship@clone-patterns

指定 Agent (Claude Code)

npx skills add Houseofmvps/ultraship --skill clone-patterns -a claude-code -g -y

安装 repo 全部 skill

npx skills add Houseofmvps/ultraship --all -g -y

预览 repo 内 skill

npx skills add Houseofmvps/ultraship --list

SKILL.md

Frontmatter
{
    "name": "clone-patterns",
    "description": "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.",
    "allowed-tools": "Bash, Read, Grep, Glob",
    "argument-hint": "<repo-url-or-path>"
}

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.

Version History

  • ed232cb Current 2026-07-24 16:15

Same Skill Collection

skills/a11y/SKILL.md
skills/architecture/SKILL.md
skills/brainstorming/SKILL.md
skills/canary/SKILL.md
skills/code-review/SKILL.md
skills/compete/SKILL.md
skills/cost/SKILL.md
skills/demo/SKILL.md
skills/deploy/SKILL.md
skills/dispatching-parallel-agents/SKILL.md
skills/evals/SKILL.md
skills/executing-plans/SKILL.md
skills/finishing-a-development-branch/SKILL.md
skills/frontend-design/SKILL.md
skills/grow/SKILL.md
skills/guard/SKILL.md
skills/index-fix/SKILL.md
skills/investigate/SKILL.md
skills/launch/SKILL.md
skills/learn/SKILL.md
skills/onboard/SKILL.md
skills/pentest/SKILL.md
skills/perf-audit/SKILL.md
skills/receiving-code-review/SKILL.md
skills/release/SKILL.md
skills/requesting-code-review/SKILL.md
skills/rescue/SKILL.md
skills/retro/SKILL.md
skills/revise-claude-md/SKILL.md
skills/security-audit/SKILL.md
skills/seo-audit/SKILL.md
skills/seo-strategy/SKILL.md
skills/ship-gate/SKILL.md
skills/sprint/SKILL.md
skills/staying-current/SKILL.md
skills/subagent-driven-development/SKILL.md
skills/systematic-debugging/SKILL.md
skills/test-driven-development/SKILL.md
skills/using-git-worktrees/SKILL.md
skills/using-ultraship/SKILL.md
skills/verification-before-completion/SKILL.md
skills/visual-diff/SKILL.md
skills/writing-plans/SKILL.md
skills/writing-skills/SKILL.md

Metadata

Files
0
Version
ed232cb
Hash
f97eb7b3
Indexed
2026-07-24 16:15

inicio - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-17 00:39
浙ICP备14020137号-1 $mapa de visitantes$