认知灵活性

cognitive-flexibility

by alpha963852

|

4.2k其他未扫描2026年4月13日

安装

claude skill add --url https://github.com/openclaw/skills

文档

Cognitive Flexibility Skill

Overview

This Skill implements four cognitive modes based on human cognitive science:

ModeNameDriverScenarioCore Ability
OOAExperience ModeMemory-drivenFamiliar scenariosPattern matching
OODAReasoning ModeKnowledge-drivenComplex problemsChain reasoning
OOCACreative ModeAssociation-drivenInnovation needsAnalogy generation
OOHADiscovery ModeHypothesis-drivenExplorationHypothesis generation

Quick Start

Basic Usage

python
from scripts.cognitive_controller import CognitiveController

# Create controller
controller = CognitiveController(confidence_threshold=0.7)

# Execute task (auto mode selection)
task = "Analyze user feedback data"
result = await controller.process(task, tools=tools)

# View result
print(f"Mode: {result['mode']}")
print(f"Answer: {result['answer']}")
print(f"Confidence: {result['assessment']['overall_score']:.2f}")

Manual Mode Selection

python
# OODA reasoning mode
from scripts.chain_reasoner import OODAReasoner
reasoner = OODAReasoner()
result = await reasoner.process(task, tools=tools)

# OOA experience mode
from scripts.pattern_matcher import PatternMatcher
matcher = PatternMatcher()
result = await matcher.match(task, tools=tools)

# OOCA creative mode
from scripts.creative_explorer import CreativeExplorer
explorer = CreativeExplorer()
result = await explorer.explore(task)

# OOHA discovery mode
from scripts.hypothesis_generator import HypothesisGenerator
generator = HypothesisGenerator()
result = await generator.discover(task)

Features

  • 4 Cognitive Modes: OOA/OODA/OOCA/OOHA
  • Auto Mode Switching: Cognitive Controller selects best mode
  • Metacognitive Monitoring: Self-assessment and confidence scoring
  • Usage Tracking: Complete usage logs and statistics
  • 100% Test Coverage: All tests passing

File Structure

code
cognitive-flexibility/
├── scripts/
│   ├── __init__.py
│   ├── chain_reasoner.py       # OODA reasoning
│   ├── pattern_matcher.py      # OOA pattern matching
│   ├── self_assessor.py        # Metacognitive monitoring
│   ├── cognitive_controller.py # Mode switching
│   ├── creative_explorer.py    # OOCA creative mode
│   ├── hypothesis_generator.py # OOHA discovery mode
│   └── usage_monitor.py        # Usage tracking
├── references/
│   └── ooda-guide.md
├── tests/
│   └── test_cognitive_skills.py
├── SKILL.md
├── README.md
└── MONITORING-GUIDE.md

Testing

bash
# Run tests
python tests/test_cognitive_skills.py

# Expected output: 6/6 tests passed (100%)

Monitoring

python
from scripts.usage_monitor import UsageMonitor

monitor = UsageMonitor()

# Get usage stats
stats = monitor.get_stats(days=7)

# Generate report
report = monitor.generate_report(days=7)
print(report)

Requirements

  • Python >= 3.8
  • OpenClaw >= 2026.3.28
  • No external dependencies

License

MIT License

Support

  • Documentation: See README.md and MONITORING-GUIDE.md
  • Issues: GitHub Issues
  • Community: Discord #skills-feedback

DaoShi · Cognitive Flexibility Skill v2.1.0

相关 Skills

Claude API

by anthropic

热门

Build, debug, and optimize Claude API / Anthropic SDK apps. Apps built with this skill should include prompt caching. TRIGGER when: code imports anthropic/@anthropic-ai/sdk; user asks to use the Claude API, Anthropic SDKs, or Managed Agents (/v1/agents, /v1/sessions, /v1/environments). DO NOT TRIGGER when: code imports `openai`/other AI SDK, general programming, or ML/data-science tasks.

其他
安全119.1k

并行代理

by axelhu

热门

Use when facing 2 or more independent tasks that can be worked on without shared state - dispatches parallel subagents using sessions_spawn for concurrent investigation and execution, adapted for OpenClaw

其他
未扫描4.2k

思否热榜

by codekungfu

热门

注册“SegmentFault”热门技能;当需要访问或自动化SegmentFault相关内容时调用。

其他
未扫描4.2k

评论