Agent skill · Design & Presentation

Pattern Extraction

Detect and extract patterns from codebases for template generation

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
npx skills add majiayu000/claude-skill-registry --skill pattern-extraction-lobbi-docs-claude-2 --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 2
SKILL.md size: 23 KB
Bundled scripts: none
Version: 1.0.0
Path: skills/analysis/pattern-extraction-lobbi-docs-claude-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

Review
written from the skill's own SKILL.md · Aug 5, 2026

What it does

Detect and extract patterns from codebases for template generation, including identifying configuration patterns, hardcoded values, naming conventions, and structure to support template metadata and variable schemas.

How it works

The skill provides a framework to: automatically identify IaC frameworks, cloud providers, service types, configuration formats, build systems, and CI/CD platforms; extract patterns from resource definitions, environment-specific configurations, naming and tagging strategies, security policies, network topologies, and deployment workflows; perform intelligent detection of hardcoded values, repeated values, environment indicators, naming patterns, secret patterns, and configuration schemas; analyze file organization, module boundaries, resource hierarchies, and template inclusion patterns. It uses a decision tree to classify patterns (e.g., environment values, resource names, region, version numbers, ports, sizes, CIDR blocks, tags, secret references, feature flags) and outputs variables and templates accordingly. Examples illustrate how inputs are transformed into templates and extracted variables.

When to use it

Use pattern extraction when you need to:

  • Analyze existing infrastructure to create reusable templates
  • Convert hardcoded values into configurable template variables
  • Identify configuration patterns across multiple similar files
  • Detect technology stacks and their conventions
  • Extract naming conventions and structural patterns
  • Generate template metadata from existing code
  • Create variable schemas from inferred types and constraints

What it can touch

The skill mentions touching resource definitions, environment configurations, naming conventions, tagging strategies, security policies, network topologies, deployment workflows, and extracted variables in YAML/JSON-like outputs. It references outputs such as:

  • Template outputs like HCL blocks, YAML, or JSON structures
  • Extracted variables with types, defaults, and constraints
  • Example variables include ami_id, instance_type, project_name, environment, app_name, namespace, replica_count, app_version, container_image, container_port, memory_request, memory_limit, cpu_request, cpu_limit, storage_account_name, location, sku_name, access_tier, min_tls_version, https_only, allow_public_access, environment, cost_center, project_name

Caveats

The material outlines risk areas such as security-sensitive patterns (secret_ref) and environment-related constraints. It also notes allowed values and patterns for variables (e.g., environments like dev, staging, production; version formats; region lists). License and provenance are given as MIT for the skill and it is released under that license.

From the SKILL.md

# Pattern Extraction Skill ## When to Use This Skill Use pattern extraction when you need to: - **Analyze existing infrastructure** to create reusable templates - **Convert hardcoded values** into configurable template variables - **Identify configuration patterns** across multiple similar files - **Detect technology stacks** and their conventions - **Extract naming conventions** and structural patterns - **Generate template metadata** from existing code - **Create variable schemas** from inferred types and constraints Perfect for: - Converting existing IaC to templates - Building template libraries from production code - Standardizing infrastructure patterns - Automating template generation - Identifying refactoring opportunities ## Core Capabilities ### 1. Technology Stack Detection Automatically identify: - **IaC Frameworks**: Terraform, Pulumi, CloudFormation, ARM, Bicep - **Cloud Providers**: AWS, Azure, GCP, multi-cloud patterns - **Service Types**: Kubernetes, Docker, serverless, containers - **Configuration Formats**: YAML, JSON, HCL, TOML - **Build Systems**: Helm, Kustomize, Jsonnet - **CI/CD Platforms**: GitHub Actions, GitLab CI, Jenkins, Harness ### 2. Configuration Pa

What's inside
Steps it walks through
  1. When to Use This Skill
  2. Core Capabilities
  3. 1. Technology Stack Detection
  4. 2. Configuration Pattern Extraction
  5. 3. Variable Identification
  6. 4. Structure Analysis
  7. Pattern Detection Matrix
  8. Variable Inference Rules
  9. Before/After Transformation Examples
  10. Decision Tree
  11. Examples
  12. Example 1: Extract Terraform AWS Pattern
  13. Example 2: Extract Kubernetes Pattern
  14. Example 3: Multi-File Pattern Extraction
Ships with 1 file
  • metadata.json
Commands it runs
extract patterns from ./terraform/aws/ec2-instances.tf
extract patterns from ./k8s/deployments/ --type kubernetes
extract patterns from ./infrastructure/ --recursive --consolidate
Start small
extract patterns from ./terraform/main.tf
Validate and adjust
review template ./templates/main.tf.tmpl
Scale up
extract patterns from ./terraform/ --recursive
Extract initial patterns
More from claude-skill-registry
All skills →
About this skill
What does the Pattern Extraction skill do?

Detect and extract patterns from codebases for template generation

How do I install it?

Run `npx skills add majiayu000/claude-skill-registry --skill pattern-extraction-lobbi-docs-claude-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going