conpera

OrgClaw - OpenClaw Skill

- Issues: https://github.com/conpera/orgclaw/issues

conpera 0 Updated 4mo ago

Resources

18
GitHub

Install

npx skillscat add conpera/orgclaw

Install via the SkillsCat registry.

SKILL.md

OrgClaw - OpenClaw Skill

Name: orgclaw
Version: 0.1.0
Author: Conpera Team
License: MIT

Description

Organization knowledge federation system for OpenClaw. Automatically extracts, scores, and stores reusable experiences from Agent tasks.

Features

  • Auto-Extract: Automatically capture experience on task completion
  • Quality Scoring: 4-dimension quality assessment (completeness, specificity, actionability, reusability)
  • Smart Storage: Save high-quality experiences to personal knowledge base
  • Pattern Linking: Connect with conpera-patterns knowledge base
  • Semantic Search: Vector-based experience retrieval

Installation

Method 1: One-line Install (Recommended)

curl -fsSL https://raw.githubusercontent.com/conpera/orgclaw/main/install.py | python3

Method 2: OpenClaw CLI

openclaw skill install conpera/orgclaw

Method 3: Manual

git clone https://github.com/conpera/orgclaw.git ~/.openclaw/skills/orgclaw
cd ~/.openclaw/skills/orgclaw
python3 install.py

Configuration

Default configuration in ~/.openclaw/config.yaml:

skills:
  orgclaw:
    enabled: true
    auto_extract: true
    quality_threshold: 0.4
    min_lines_changed: 5
    personal_dir: ~/.orgclaw/personal
    enable_patterns: true

Usage

Automatic (Recommended)

Once installed, OrgClaw automatically extracts experience when OpenClaw tasks complete:

[OpenClaw] Task completed successfully!
[OrgClaw] โœ… Experience auto-saved (quality: 0.51)
  ๐Ÿ’พ Saved to: ~/.orgclaw/personal/exp-xxx.json

Manual Commands

# View statistics
orgclaw stats

# Search experiences
orgclaw search "memory leak"

# Search patterns
orgclaw patterns "api" --category coding

# Manual extract
orgclaw extract task-001 --description "Fixed bug in..."

How It Works

  1. Task Completion: OpenClaw completes an Agent task
  2. Hook Trigger: post_task.py is called automatically
  3. Experience Extraction: Parse task description, detect patterns
  4. Quality Scoring: Score on 4 dimensions (each 25% weight)
  5. Storage Decision: Save if quality >= threshold (default 0.4)
  6. Pattern Linking: Suggest related patterns from conpera-patterns

Architecture

Agent Task
    โ†“
OpenClaw Hook (post_task.py)
    โ†“
ExperienceExtractor
    โ”œโ”€โ”€ Pattern Detection (bug_fix/refactor/feature/optimization)
    โ”œโ”€โ”€ Solution Extraction
    โ””โ”€โ”€ Lesson Generation
    โ†“
ExperienceScorer
    โ”œโ”€โ”€ Completeness (25%)
    โ”œโ”€โ”€ Specificity (25%)
    โ”œโ”€โ”€ Actionability (25%)
    โ””โ”€โ”€ Reusability (25%)
    โ†“
Decision Gate (quality >= 0.4?)
    โ”œโ”€โ”€ Yes โ†’ ~/.orgclaw/personal/
    โ””โ”€โ”€ No โ†’ Discard + Suggestions

Data Flow

  • Input: Task description, git diff, changed files
  • Process: Extract โ†’ Score โ†’ Decide โ†’ Store
  • Output: Structured experience JSON
  • Storage: ~/.orgclaw/personal/*.json

File Locations

Type Path
Skill Code ~/.openclaw/skills/orgclaw/
Configuration ~/.openclaw/config.yaml
Personal Data ~/.orgclaw/personal/
Hook ~/.openclaw/skills/orgclaw/hooks/post_task.py

Integration

With conpera-patterns

OrgClaw automatically links with conpera-patterns:

  • Extracted experiences suggest relevant patterns
  • High-quality experiences can be promoted to patterns
  • Bidirectional knowledge flow

With OpenClaw

Required OpenClaw support:

  • post_task hook system
  • Task result metadata (description, commit, changes)

Development

# Clone
git clone https://github.com/conpera/orgclaw.git
cd orgclaw

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Type check
mypy orgclaw/

Troubleshooting

Issue: Hook not called

Solution: Check if OpenClaw supports post_task hook. Use manual extraction:

orgclaw extract <task-id> --description "..."

Issue: Import errors

Solution: Reinstall dependencies:

pip install -r ~/.openclaw/skills/orgclaw/requirements.txt --force-reinstall

Issue: Permission denied

Solution: Use user installation:

python3 install.py --user

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes
  4. Submit PR

See CONTRIBUTING.md for details.

Roadmap

  • Auto-extract from tasks
  • Quality scoring
  • Pattern linking
  • Web UI for browsing
  • Team/organization sharing
  • LLM-enhanced extraction
  • Feedback learning

License

MIT License - see LICENSE

Links