Token导航 LogoToken导航

Agent Skill · 研究检索

contextual-pattern-learning(情境模式学习)

contextual-pattern-learning 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 Codex、Claude、Cursor、Gemini CLI 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

contextual-pattern-learning 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 70,604。

总安装 210周安装 9GitHub Stars 22下载 73核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:contextual-pattern-learning(情境模式学习)
来源仓库:https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude
仓库路径:skills/contextual-pattern-learning
安装命令:
npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skill contextual-pattern-learning
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skill contextual-pattern-learning

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

contextual-pattern-learning 识别跨项目的可迁移模式与架构特征。适合在 Codex、Claude、Cursor、Gemini CLI 中进行代码相似性分析与最佳实践复用。支持技术栈检测、架构模式分类和团队协作惯例提取等多维度指纹构建。输出为结构化清单,便于后续自动化检查或知识沉淀集成。

适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

来源仓库内路径:skills/contextual-pattern-learning

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-cla…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

contextual-pattern-learning 怎么安装?

在终端执行 npx skills add https://github.com/bejranonda/llm-autonomous-agent-plugin-for-claude --skil…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

contextual-pattern-learning 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

contextual-pattern-learning 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

contextual-pattern-learning 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

contextual-pattern-learning 用的人多吗?

公开数据是累计安装 210 次,近一周安装 9 次,下载 73 次,GitHub 22 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

contextual-pattern-learning 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
contextual-pattern-learning

情境模式学习 · 本页

21022调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Contextual Pattern Learning Skill

Provides advanced pattern recognition capabilities that understand project context, compute semantic similarities, and identify transferable patterns across different codebases and domains.

Core Capabilities

Project Fingerprinting

Multi-dimensional Project Analysis:

  • Technology Stack Detection: Languages, frameworks, libraries, build tools
  • Architectural Patterns: MVC, microservices, monolith, serverless, etc.
  • Code Structure Analysis: Module organization, dependency patterns, coupling metrics
  • Team Patterns: Coding conventions, commit patterns, testing strategies
  • Domain Classification: Business domain, problem space, user type

Fingerprint Generation:

project_fingerprint = {
    "technology_hash": sha256(sorted(languages + frameworks + libraries)),
    "architecture_hash": sha256(architectural_patterns + structural_metrics),
    "domain_hash": sha256(business_domain + problem_characteristics),
    "team_hash": sha256(coding_conventions + workflow_patterns),
    "composite_hash": combine_all_hashes_with_weights()
}

Context Similarity Analysis

Multi-factor Similarity Calculation:

  1. Technology Similarity (40%): Language/framework overlap
  2. Architectural Similarity (25%): Structure and design patterns
  3. Domain Similarity (20%): Business context and problem type
  4. Scale Similarity (10%): Project size and complexity
  5. Team Similarity (5%): Development practices and conventions

Semantic Context Understanding:

  • Intent Recognition: What the code is trying to accomplish
  • Problem Space Analysis: What category of problem being solved
  • Solution Pattern Matching: How similar problems are typically solved
  • Contextual Constraints: Performance, security, maintainability requirements

Pattern Classification System

Primary Classifications:

  • Implementation Patterns: Feature addition, API development, UI components
  • Refactoring Patterns: Code cleanup, optimization, architectural changes
  • Debugging Patterns: Bug fixing, issue resolution, problem diagnosis
  • Testing Patterns: Test creation, coverage improvement, test maintenance
  • Integration Patterns: Third-party services, databases, external APIs
  • Security Patterns: Authentication, authorization, vulnerability fixes

Secondary Attributes:

  • Complexity Level: Simple, moderate, complex, expert
  • Risk Level: Low, medium, high, critical
  • Time Sensitivity: Quick fix, planned work, research task
  • Collaboration Required: Solo, pair, team, cross-team

Cross-Domain Pattern Transfer

Pattern Transferability Assessment:

def calculate_transferability(pattern, target_context):
    technology_match = calculate_tech_overlap(pattern.tech, target_context.tech)
    domain_similarity = calculate_domain_similarity(pattern.domain, target_context.domain)
    complexity_match = assess_complexity_compatibility(pattern.complexity, target_context.complexity)

    transferability = (
        technology_match * 0.4 +
        domain_similarity * 0.3 +
        complexity_match * 0.2 +
        pattern.success_rate * 0.1
    )

    return transferability

Adaptation Strategies:

  • Direct Transfer: Pattern applies without modification
  • Technology Adaptation: Same logic, different implementation
  • Architectural Adaptation: Same approach, different structure
  • Conceptual Transfer: High-level concept, complete reimplementation

Pattern Matching Algorithm

Context-Aware Similarity

Weighted Similarity Scoring:

def calculate_contextual_similarity(source_pattern, target_context):
    # Technology alignment (40%)
    tech_score = calculate_technology_similarity(
        source_pattern.technologies,
        target_context.technologies
    )

    # Problem type alignment (30%)
    problem_score = calculate_problem_similarity(
        source_pattern.problem_type,
        target_context.problem_type
    )

    # Scale and complexity alignment (20%)
    scale_score = calculate_scale_similarity(
        source_pattern.scale_metrics,
        target_context.scale_metrics
    )

    # Domain relevance (10%)
    domain_score = calculate_domain_relevance(
        source_pattern.domain,
        target_context.domain
    )

    return (
        tech_score * 0.4 +
        problem_score * 0.3 +
        scale_score * 0.2 +
        domain_score * 0.1
    )

Pattern Quality Assessment

Multi-dimensional Quality Metrics:

  1. Outcome Quality: Final result quality score (0-100)
  2. Process Efficiency: Time taken vs. expected time
  3. Error Rate: Number and severity of errors encountered
  4. Reusability: How easily the pattern can be applied elsewhere
  5. Adaptability: How much modification was needed for reuse

Quality Evolution Tracking:

  • Initial Quality: Quality when first captured
  • Evolved Quality: Updated quality after multiple uses
  • Context Quality: Quality in specific contexts
  • Time-based Quality: How quality changes over time

Learning Strategies

Progressive Pattern Refinement

1. Pattern Capture:

def capture_pattern(task_execution):
    pattern = {
        "id": generate_unique_id(),
        "timestamp": current_time(),
        "context": extract_rich_context(task_execution),
        "execution": extract_execution_details(task_execution),
        "outcome": extract_outcome_metrics(task_execution),
        "insights": extract_learning_insights(task_execution),
        "relationships": extract_pattern_relationships(task_execution)
    }

    return refine_pattern_with_learning(pattern)

2. Pattern Validation:

  • Immediate Validation: Check pattern completeness and consistency
  • Cross-validation: Compare with similar existing patterns
  • Predictive Validation: Test pattern predictive power
  • Temporal Validation: Monitor pattern performance over time

3. Pattern Evolution:

def evolve_pattern(pattern_id, new_execution_data):
    existing_pattern = load_pattern(pattern_id)

    # Update success metrics
    update_success_rates(existing_pattern, new_execution_data)

    # Refine context understanding
    refine_context_similarity(existing_pattern, new_execution_data)

    # Update transferability scores
    update_transferability_assessment(existing_pattern, new_execution_data)

    # Generate new insights
    generate_new_insights(existing_pattern, new_execution_data)

    save_evolved_pattern(existing_pattern)

Relationship Mapping

Pattern Relationships:

  • Sequential Patterns: Patterns that often follow each other
  • Alternative Patterns: Different approaches to similar problems
  • Prerequisite Patterns: Patterns that enable other patterns
  • Composite Patterns: Multiple patterns used together
  • Evolutionary Patterns: Patterns that evolve into other patterns

Relationship Discovery:

def discover_pattern_relationships(patterns):
    relationships = {}

    for pattern_a in patterns:
        for pattern_b in patterns:
            if pattern_a.id == pattern_b.id:
                continue

            # Sequential relationship
            if often_sequential(pattern_a, pattern_b):
                relationships[f"{pattern_a.id} -> {pattern_b.id}"] = {
                    "type": "sequential",
                    "confidence": calculate_sequential_confidence(pattern_a, pattern_b)
                }

            # Alternative relationship
            if are_alternatives(pattern_a, pattern_b):
                relationships[f"{pattern_a.id} <> {pattern_b.id}"] = {
                    "type": "alternative",
                    "confidence": calculate_alternative_confidence(pattern_a, pattern_b)
                }

    return relationships

Context Extraction Techniques

Static Analysis Context

Code Structure Analysis:

  • Module Organization: How code is organized into modules/packages
  • Dependency Patterns: How modules depend on each other
  • Interface Design: How components communicate
  • Design Patterns: GoF patterns, architectural patterns used
  • Code Complexity: Cyclomatic complexity, cognitive complexity

Technology Stack Analysis:

def extract_technology_context(project_root):
    technologies = {
        "languages": detect_languages(project_root),
        "frameworks": detect_frameworks(project_root),
        "databases": detect_databases(project_root),
        "build_tools": detect_build_tools(project_root),
        "testing_frameworks": detect_testing_frameworks(project_root),
        "deployment_tools": detect_deployment_tools(project_root)
    }

    return analyze_technology_relationships(technologies)

Dynamic Context Analysis

Runtime Behavior Patterns:

  • Performance Characteristics: Speed, memory usage, scalability
  • Error Patterns: Common errors and their contexts
  • Usage Patterns: How the code is typically used
  • Interaction Patterns: How components interact at runtime

Development Workflow Patterns:

def extract_workflow_context(git_history):
    return {
        "commit_patterns": analyze_commit_patterns(git_history),
        "branching_strategy": detect_branching_strategy(git_history),
        "release_patterns": analyze_release_patterns(git_history),
        "collaboration_patterns": analyze_collaboration(git_history),
        "code_review_patterns": analyze_review_patterns(git_history)
    }

Semantic Context Analysis

Domain Understanding:

  • Business Domain: E-commerce, finance, healthcare, education
  • Problem Category: Data processing, user interface, authentication, reporting
  • User Type: End-user, admin, developer, system
  • Performance Requirements: Real-time, batch, high-throughput, low-latency

Intent Recognition:

def extract_intent_context(task_description, code_changes):
    intent_indicators = {
        "security": detect_security_intent(task_description, code_changes),
        "performance": detect_performance_intent(task_description, code_changes),
        "usability": detect_usability_intent(task_description, code_changes),
        "maintainability": detect_maintainability_intent(task_description, code_changes),
        "functionality": detect_functionality_intent(task_description, code_changes)
    }

    return rank_intent_by_confidence(intent_indicators)

Adaptation Learning

Success Pattern Recognition

What Makes Patterns Successful:

  1. Context Alignment: How well the pattern fits the context
  2. Execution Quality: How well the pattern was executed
  3. Outcome Quality: The quality of the final result
  4. Efficiency: Time and resource usage
  5. Adaptability: How easily the pattern can be modified

Success Factor Analysis:

def analyze_success_factors(pattern):
    factors = {}

    # Context alignment
    factors["context_alignment"] = calculate_context_fit_score(pattern)

    # Execution quality
    factors["execution_quality"] = analyze_execution_process(pattern)

    # Team skill match
    factors["skill_alignment"] = analyze_team_skill_match(pattern)

    # Tooling support
    factors["tooling_support"] = analyze_tooling_effectiveness(pattern)

    # Environmental factors
    factors["environment_fit"] = analyze_environmental_fit(pattern)

    return rank_factors_by_importance(factors)

Failure Pattern Learning

Common Failure Modes:

  1. Context Mismatch: Pattern applied in wrong context
  2. Skill Gap: Required skills not available
  3. Tooling Issues: Required tools not available or not working
  4. Complexity Underestimation: Pattern more complex than expected
  5. Dependency Issues: Required dependencies not available

Failure Prevention:

def predict_pattern_success(pattern, context):
    risk_factors = []

    # Check context alignment
    if calculate_context_similarity(pattern.context, context) < 0.6:
        risk_factors.append({
            "type": "context_mismatch",
            "severity": "high",
            "mitigation": "consider alternative patterns or adapt context"
        })

    # Check skill requirements
    required_skills = pattern.execution.skills_required
    available_skills = context.team_skills
    missing_skills = set(required_skills) - set(available_skills)
    if missing_skills:
        risk_factors.append({
            "type": "skill_gap",
            "severity": "medium",
            "mitigation": f"acquire skills: {', '.join(missing_skills)}"
        })

    return {
        "success_probability": calculate_success_probability(pattern, context),
        "risk_factors": risk_factors,
        "recommendations": generate_mitigation_recommendations(risk_factors)
    }

Pattern Transfer Strategies

Technology Adaptation

Language-Agnostic Patterns:

  • Algorithmic Patterns: Logic independent of language syntax
  • Architectural Patterns: Structure independent of implementation
  • Process Patterns: Workflow independent of technology
  • Design Patterns: Object-oriented design principles

Technology-Specific Adaptation:

def adapt_pattern_to_technology(pattern, target_technology):
    adaptation_rules = load_adaptation_rules(pattern.source_technology, target_technology)

    adapted_pattern = {
        "original_pattern": pattern,
        "target_technology": target_technology,
        "adaptations": [],
        "confidence": 0.0
    }

    for rule in adaptation_rules:
        if rule.applicable(pattern):
            adaptation = rule.apply(pattern, target_technology)
            adapted_pattern.adaptations.append(adaptation)
            adapted_pattern.confidence += adaptation.confidence_boost

    return validate_adapted_pattern(adapted_pattern)

Scale Adaptation

Complexity Scaling:

  • Pattern Simplification: Reduce complexity for simpler contexts
  • Pattern Enhancement: Add complexity for more demanding contexts
  • Pattern Modularity: Break complex patterns into reusable components
  • Pattern Composition: Combine simple patterns for complex solutions

Scale Factor Analysis:

def adapt_pattern_for_scale(pattern, target_scale):
    current_scale = pattern.scale_context
    scale_factor = calculate_scale_factor(current_scale, target_scale)

    if scale_factor > 2.0:  # Need to scale up
        return enhance_pattern_for_scale(pattern, target_scale)
    elif scale_factor < 0.5:  # Need to scale down
        return simplify_pattern_for_scale(pattern, target_scale)
    else:  # Scale is compatible
        return pattern.with_scale_adjustments(target_scale)

Continuous Improvement

Learning Feedback Loops

1. Immediate Feedback:

  • Pattern quality assessment
  • Success/failure recording
  • Context accuracy validation
  • Prediction accuracy tracking

2. Short-term Learning (Daily/Weekly):

  • Pattern performance trending
  • Context similarity refinement
  • Success factor correlation
  • Failure pattern identification

3. Long-term Learning (Monthly):

  • Cross-domain pattern transfer
  • Technology evolution adaptation
  • Team learning integration
  • Best practice extraction

Meta-Learning

Learning About Learning:

def analyze_learning_effectiveness():
    learning_metrics = {
        "pattern_accuracy": measure_pattern_prediction_accuracy(),
        "context_comprehension": measure_context_understanding_quality(),
        "adaptation_success": measure_pattern_adaptation_success_rate(),
        "knowledge_transfer": measure_cross_project_knowledge_transfer(),
        "prediction_improvement": measure_prediction_accuracy_over_time()
    }

    return generate_learning_insights(learning_metrics)

Adaptive Learning Strategies:

  • Confidence Adjustment: Adjust prediction confidence based on accuracy
  • Context Weighting: Refine context importance weights
  • Pattern Selection: Improve pattern selection algorithms
  • Feedback Integration: Better integrate user feedback

Usage Guidelines

When to Apply This Skill

Trigger Conditions:

  • Starting a new task in an unfamiliar codebase
  • Need to understand project context quickly
  • Looking for similar solutions in other projects
  • Adapting patterns from one technology to another
  • Estimating task complexity based on historical patterns

Optimal Contexts:

  • Multi-language or multi-framework projects
  • Large codebases with established patterns
  • Teams working on multiple similar projects
  • Projects requiring frequent adaptation of solutions
  • Knowledge sharing across teams or organizations

Expected Outcomes

Primary Benefits:

  • Faster Context Understanding: Quickly grasp project structure and conventions
  • Better Pattern Matching: Find more relevant solutions from past experience
  • Improved Adaptation: More successful adaptation of patterns to new contexts
  • Cross-Project Learning: Leverage knowledge from previous projects
  • Predictive Insights: Better predictions of task complexity and success

Quality Metrics:

  • Context Similarity Accuracy: >85% accurate context matching
  • Pattern Transfer Success: >75% successful pattern adaptation
  • Prediction Accuracy: >80% accurate outcome predictions
  • Learning Velocity: Continuous improvement in pattern quality

Integration with Other Skills

Complementary Skills

code-analysis:

  • Provides detailed code structure analysis for context extraction
  • Helps identify design patterns and architectural decisions
  • Contributes to technology stack detection

quality-standards:

  • Provides quality metrics for pattern assessment
  • Helps establish quality thresholds for pattern selection
  • Contributes to best practice identification

pattern-learning (basic):

  • Provides foundation pattern storage and retrieval
  • Enhanced by contextual understanding and similarity analysis
  • Benefits from advanced classification and relationship mapping

Data Flow

# Context extraction
context = code_analysis.extract_structure() + contextual_pattern_learning.extract_semantic_context()

# Pattern matching
matches = contextual_pattern_learning.find_similar_patterns(context, code_analysis.get_quality_metrics())

# Quality assessment
quality_score = quality_standards.assess_pattern_quality(matches)

# Learning integration
contextual_pattern_learning.capture_pattern_with_context(execution_data, context, quality_score)

This skill creates a comprehensive contextual understanding system that dramatically improves pattern matching, adaptation, and learning capabilities by considering the rich context in which patterns are created and applied.

平台分布

Codex

35.27%
按下载量换算26

Claude

30.86%
按下载量换算23

Cursor

22.01%
按下载量换算16

Gemini CLI

9.83%
按下载量换算7

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills