clone-patterns

Analyze patterns in any codebase and apply them to your project to learn from best practices. Intended for borrowing best practices from other repositories, comparing code quality, or studying top project structures.

Last repository push
GitHub Stars
124
Forks
13
Issues / PRs
1

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "clone-patterns" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-9c0eab1a14a7b8889ab08271c67a57bfe2d2864454ea08b19d201bea875b3eb5. Verify the upstream source and version against https://github.com/Houseofmvps/ultraship before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Analyze patterns in any codebase and apply them to your project to learn from best practices. Intended for borrowing best practices from other repositories, comparing code quality, or studying top project structures.

0 Downloads

Introduction source: third_party · Houseofmvps · 0.0.1 Reference

SkillPi interpretation

Tasks
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.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
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."
argument-hint: "<repo-url-or-path>"
allowed-tools: Bash, Read, Grep, Glob

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

  1. v2.5.0 GitHub ↗
    Original release notes

    ## Elite SEO Intelligence — Top 1% Operator Patterns Based on real top 1% SEO operator methodology. Every feature is designed to provide technical foundation to ruthlessly help rank sites and get cited in AI search (ChatGPT, Perplexity, Copilot, Gemini, AI Overviews). ### New Commands **keyword-intelligence.mjs** (12 commands, was 10) - `anomalies` — Detects low-position high-CTR keywords (Google flags these as strongest opportunities) + high-position low-CTR underperformers - `cross-reference` — Joins GSC page data with GA4 conversions to find 4 critical buckets: converting-but-underexposed (highest ROI), ranking-but-not-converting (funnel problem), scalable pages (double down), CTR problems - `--brand=term1,term2` — Separates brand vs non-brand queries across ALL commands. Non-brand is all that matters for SEO growth. - Position band % distribution (1-3, 4-10, 11-20, 21+) in analyze output **ga4-client.mjs** (12 commands, was 10) - `ai-traffic` — Tracks ChatGPT (utm_source=chatgpt.com), Perplexity, Microsoft Copilot, Gemini, Claude, and You.com referral traffic with conversion rates - `organic` — Organic-only overview with key event rates per landing page - `--organic` flag — Filters top-pages and landing-pages to organic search only - Key event rate per session + average engagement time per page **bing-webmaster.mjs** (11 commands, was 6) - `indexnow` — Instant IndexNow push for changed URLs (Bing + Yandex + partners) - `keyword-research` — Keyword suggestions from Bing - `backlinks` — Backlink counts and sample link data - `site-scan` — Bing's technical SEO scan - `url-inspection` — Crawl/index status from Bing **seo-scanner.mjs** - Snippet restriction detection: `nosnippet`, `max-snippet`, `data-nosnippet` — Google says restrictive preview controls limit AI feature eligibility ### Updated SEO Strategy SKILL - AI Traffic Measurement phase - CTR Anomaly Analysis framework - Non-Brand Position Band Tracking (weekly KPIs) - GSC ↔ GA4 Cross-Reference (the "money move") - IndexNow for instant Bing/Copilot discovery - AI Slop Prevention guardrails - Ruthless weekly KPI stack (14 metrics, not 50) ### Install ``` npm install -g ultraship ```

  2. v2.3.2 GitHub ↗
    Original release notes

    ## Security Fixes ### CRITICAL — IPv6-Mapped IPv4 SSRF Bypass `validateUrl()` in `tools/lib/security.mjs` only matched IPv4 dotted-decimal patterns. Addresses like `::ffff:127.0.0.1` and `::ffff:169.254.169.254` bypassed all SSRF protection. Now detects and blocks IPv6-mapped IPv4 addresses in both dotted and hex formats. ### HIGH — Redirect-Based SSRF in health-check.mjs `health-check.mjs` followed HTTP redirects without re-validating the target URL. A public URL redirecting to an internal IP would bypass SSRF protection. Now validates every redirect hop. ### MEDIUM — Guard Hook Bypass Hardening `guard-bash.sh` now blocks additional evasion techniques: - Base64-encoded commands piped to shell (`base64 -d | bash`) - Remote scripts piped to shell (`curl ... | sh`, `wget ... | sh`) - Python/Perl destructive one-liners (`python3 -c "shutil.rmtree(...)"`) - xargs chaining destructive commands (`xargs rm -rf`, `xargs git push --force`) ### LOW — MCP Server Version Pinning Pinned `@upstash/[email protected]` and `@playwright/[email protected]` (previously `@latest`), eliminating supply chain risk from automatic upgrades. ## Stats - 180 tests passing - 0 dependencies with known vulnerabilities - All IPv6 SSRF bypass vectors verified blocked (9/9 test cases) **Full install:** `npm install -g [email protected]`

  3. v2.3.0 GitHub ↗
    Original release notes

    ## What's New 6 new features inspired by analyzing [gstack](https://github.com/garrytan/gstack) and adapting the best patterns for indie SaaS builders. ### New Skills (6) | Skill | Command | Description | |---|---|---| | **Sprint Workflow** | `/sprint` | Structured pipeline: plan → build → test → review → ship → verify. Skills chain into each other with artifacts. | | **Safety Guardrails** | `/guard` | PreToolUse hooks block destructive commands (`rm -rf`, `DROP TABLE`, `git push --force`, `git reset --hard`). Optional directory freeze restricts edits. | | **Investigation** | `/investigate` | Root cause debugging with module freeze. Iron law: no fixes without investigation. Scoped analysis, evidence-based hypotheses. | | **Project Learnings** | `/learn` | Save, search, prune, export structured knowledge that compounds across sessions. Debugging insights, deployment gotchas, architecture decisions. | | **Sprint Retrospective** | `/retro` | Analyzes git velocity, commit patterns (features vs fixes), test health, hot files, shipping cadence. Generates insights and recommendations. | | **Canary Monitoring** | `/canary` | Post-deploy health verification. Checks HTTP status, response time, error patterns. Compares against baseline for regression detection. | ### New Tools (3) - `learnings-manager.mjs` — CRUD for project learnings (save/search/list/prune/export) - `canary-monitor.mjs` — Post-deploy canary with baseline regression detection - `retro-analyzer.mjs` — Sprint retrospective analyzer (git velocity, patterns, test health) ### New Agent (1) - `canary-monitor` — Dispatched by `/canary` for post-deploy verification ### New Hooks (2) - `guard-bash.sh` — PreToolUse hook for blocking destructive Bash commands - `guard-edit.sh` — PreToolUse hook for directory freeze enforcement ### Numbers | | Before | After | |---|---|---| | Skills | 33 | **39** | | Tools | 30 | **33** | | Agents | 10 | **11** | | Commands | 28 | **34** | | Tests | 155 | **180** | All 180 tests passing. 1 dependency. Node.js ESM. MIT. ```bash claude plugin install ultraship # or npm install -g ultraship ```

  4. v2.1.2 GitHub ↗
    Original release notes

    README rewritten as standard developer tool documentation. Removed: narrative "your week without Ultraship" section, marketing taglines, pitch framing, dramatic copy. Added: structured tool reference tables (29 tools in 7 categories), full command reference (27), skill categorization (32), architecture section with directory layout, inline security summary. Motivated by PR feedback on awesome-claude-code-toolkit: "comes across as marketing-heavy rather than a grounded technical tool." The README now reads like ESLint or Turborepo documentation — what it is, how to install, what every tool/command/skill does, how it's built, how to contribute.

  5. v2.1.1 GitHub ↗
    Original release notes

    ## Frontend Design Skill Upgraded to Product Designer + UI/UX Expert Level The `frontend-design` skill now combines three disciplines: ### Product Design Thinking (new) - User intent analysis (what is the ONE primary action?) - Information hierarchy (5-second test) - Conversion design (CTA placement, social proof, value proposition above fold) - User psychology (cognitive load, loss aversion, anchoring, social proof, progress indication) ### UX Discipline (new) - Interaction design (4 states for every element: default, hover, active, disabled) - Form design (single column, labels above fields, inline validation on blur, descriptive submit buttons) - Accessibility (WCAG AA contrast, keyboard nav, screen readers, 44px touch targets, prefers-reduced-motion) - Responsive design (mobile-first, 4 breakpoints, touch vs hover, fluid typography) - Performance as UX (1s = instant, 3s = slow, skeleton screens, lazy loading) - Navigation patterns (breadcrumbs, max 7 items, mobile thumb zone) ### Industry-Specific Design Rules (new) 10 product types with specific tone guidance and anti-patterns: - SaaS/DevTools, Fintech/Banking, Healthcare, E-commerce, Education, Creative/Portfolio, Enterprise/B2B, Social/Community, Legal/Government, Kids/Gaming - Example: banking apps get "trust, stability, clarity" — NEVER playful design or AI purple gradients ### Design System Specifics (new) - Complete 14-token color architecture (primary through destructive, with on-* contrast pairs) - Animation timing: 200-300ms enter, 120-200ms exit, 30-50ms stagger, spring physics over cubic-bezier - GPU-composited properties only (opacity + transform — never animate width/height/margin) - 8px spacing grid for all margins, padding, and gaps - Line height rules: 1.5 body, 1.2-1.3 headings ### Expanded Quality Checklist 25 items across 5 categories (Functionality, Accessibility, Responsiveness, Visual Consistency, Production Readiness) — up from 10 items. ### Page-Specific UX Patterns Landing pages, dashboards, settings pages, onboarding flows, pricing pages — each with specific design rules a top product designer would apply. All knowledge is inline in the skill file. No Python scripts. No CSV databases. No new dependencies. Pure design expertise, zero bloat.

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供代码库模式分析与最佳实践迁移能力,适用于开发者学习优秀项目结构、提升代码质量
  • 具有广泛受众的实用能力,属于明确场景的通用工具
Trigger Precision85/100

Highlights

  • description 明确描述使用场景(借鉴最佳实践、比较代码质量、学习项目结构)
  • argument-hint 提供参数格式,覆盖合理
Structure and Standards95/100

Highlights

  • Phase/步骤清晰(5个阶段),有出口条件(用户显式批准才应用)
  • 含端到端示例(Bash 命令、JSON 解析、具体实现项),frontmatter 完整
Execution Reliability85/100

Areas to improve

  • pattern-analyzer.mjs 缺失或执行失败未处理 Reported severity: Minor

    Phase 1 依赖 pattern-analyzer.mjs 工具,但未显式处理该工具缺失或执行失败的情况

    Recommendation: 建议添加工具存在性检查与错误处理逻辑,如工具缺失时提示用户或提供替代方案

Highlights

  • 工具来源明确(pattern-analyzer.mjs),参数正确(source-directory, compare)
  • 覆盖主要异常(需用户确认不可逆操作)
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.