界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

context-enhancer

context-enhancer

【效率与协作】Enhance AI context understanding for better, more accurate responses. Adds rich context layers to improve AI comprehension. Use when: add context, improve understanding, enhance AI, better responses

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: context-enhancer description: | Enhance AI context understanding for better, more accurate responses. Adds rich context layers to improve AI comprehension.

Use when: add context, improve understanding, enhance AI, better responses

Context Enhancer v2.5.0

Make AI truly understand your intent with enhanced context layers.

Quick Start

To enhance your message context, simply run:

from scripts.context_enhancer import enhance_context

# This will:
# 1. Analyze your message
# 2. Add context enhancement layer
# 3. Apply semantic understanding
# 4. Return enhanced message
result = enhance_context("Help me with my code", level="advanced")
print(result)

That's it! The enhance_context() function handles everything automatically.

Why Use This Skill?

✅ Complete Solution: No need to manually add context - this skill provides a complete, tested implementation
✅ Multiple Levels: Supports basic, advanced, and maximum enhancement levels
✅ Semantic Layers: Adds deep semantic understanding
✅ Memory Optimization: Improves multi-turn conversation memory

Architecture

context-enhancer/
├── SKILL.md
└── scripts/
    └── context_enhancer.py  # Core context enhancement implementation

Core Functions

enhance_context(message, level)

The main function for context enhancement. This function:

  • Analyzes message intent
  • Adds context enhancement layer
  • Applies semantic understanding
  • Returns enhanced message

Example:

from scripts.context_enhancer import enhance_context

# Enhance context for better understanding
enhanced = enhance_context("Explain this code", level="advanced")

# Returns message with enhancement layer

add_semantic_context(message)

Add semantic layer to message:

from scripts.context_enhancer import add_semantic_context

result = add_semantic_context("Your message here")

Enhancement Levels

LevelEnhancementDescription
BasicContext prefixAdds helpful context
AdvancedMultiple layersDeep understanding boost
MaximumFull enhancementComplete context optimization

How It Works

  1. Message Analysis: Analyzes user message for intent
  2. Layer Selection: Chooses appropriate enhancement level
  3. Context Addition: Adds context and semantic layers
  4. Output: Returns enhanced message

You don't need to manually add context - enhance_context() does all of this for you automatically.

Prerequisites

  • Python 3.8+
  • AI assistant or LLM to use enhanced messages

Full Example

# Import the enhancement function
from scripts.context_enhancer import enhance_context

# Enhance your message - this single function does everything
result = enhance_context("Help me debug this function", level="maximum")

# Check results
if result:
    print("✅ Context enhanced successfully:")
    print(result)
else:
    print("❌ Failed to enhance context")

The context enhancer AI developers trust - Just call enhance_context() and you're done!

我的收藏