ecc-harness-patterns
Skill12 starsChanged 29 days agoMITView on GitHub
Cross-harness agent patterns — standardize agent execution across different coding assistants
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/verification.mdcCursor rule
- agentic-agileSkill
- agentic-portfolioSkill
- client-onboardingSkill
- cooldown-resumeSkill
- drillSkill
- fabric-patternsSkill
- graphiti-temporalSkill
- managed-agents-dreamsSkill
- model-catalogue-updateSkill
- platform-setupSkill
- repowise-intelligenceSkill
- risky-module-reviewSkill
- seo-audit-reportSkill
- user-researchSkill
- video-contextSkill
The file
Files
ECC Harness Patterns Skill
Inspired by: ECC — the definitive cross-harness agent orchestration system
Purpose: Integrate multi-harness patterns from ECC into local-llm-server's agent orchestration layer.
What's Unique About ECC
ECC is a production-grade system supporting 7+ agent harnesses (Claude Code, Cursor, Codex, OpenCode, Gemini, Zed, GitHub Copilot) with:
- Harness abstraction layer — normalize API differences
- Hook lifecycle — session start/pause/stop/resume
- Memory persistence — skills learned across sessions
- Cross-harness routing — intelligent model/capability selection
- 182K+ stars — battle-tested in real workflows
Patterns to Adopt
1. Harness Detection & Adaptation
# agents/harness_adapter.py
class HarnessAdapter:
HARNESSES = {
"claude_code": {"context_key": "workspace", "supports": ["streaming"]},
"cursor": {"context_key": "editor", "supports": ["streaming", "streaming_chunks"]},
"codex": {"context_key": "project", "supports": ["completion"]},
}
def normalize_request(self, harness_id: str, request: dict) -> dict:
"""Convert harness-native request to local-llm-server format"""2. Session Lifecycle Hooks
ECC's /hooks/session-* pattern applied to local-llm-server:
.claude/hooks/
├── session-start/
│ ├── 10-detect-harness.sh # Identify active harness
│ ├── 20-load-harness-prefs.sh # Load harness-specific settings
│ └── 30-emit-telemetry.sh # Send harness telemetry
├── session-pause/
│ └── 10-checkpoint-state.sh
└── session-stop/
└── 10-summarize-session.sh3. Cross-Harness Model Selection
Extend router/model_router.py to consider harness capabilities:
class CrossHarnessRouter(ModelRouter):
def select_model(self, task: TaskRequest, harness: str) -> str:
"""Route considering harness limits and preferences"""
# Claude Code + reasoning task → deepseek-r1 (powerful)
# Cursor + quick fix → qwen3-coder (fast)
# Codex + completion → fastest available4. Persistent Harness Registry
Track which harnesses are active and their performance:
# .claude/state/harness-registry.json
{
"active_harnesses": ["claude_code", "cursor"],
"session_history": [
{
"harness": "claude_code",
"session_id": "sess_123",
"model": "deepseek-r1:32b",
"duration_sec": 1847,
"tasks_completed": 12,
"success_rate": 0.92
}
]
}Implementation Plan
- Create
agents/harness_adapter.py— adapter pattern for harness differences - Extend
.claude/hooks/— add session lifecycle management - Update
router/model_router.py— add cross-harness routing logic - Create
services/harness_registry.py— track active harnesses and performance - Update
backend/server.py— emit harness metadata in responses - Add tests —
tests/test_harness_adapter.py,tests/test_cross_harness_router.py
Files to Create/Modify
- ✅
.claude/skills/ecc-harness-patterns/SKILL.md(this file) agents/harness_adapter.py(new)services/harness_registry.py(new).claude/hooks/session-start/10-detect-harness.sh(new)router/model_router.py(extend)docs/architecture/cross-harness-support.md(new)
References
- ECC GitHub: https://github.com/affaan-m/ECC
- ECC Cross-Harness Docs: https://github.com/affaan-m/ECC/blob/main/docs/architecture/cross-harness.md
- Local-llm-server Agent Orchestration:
docs/architecture/agent-orchestration.md - Local-llm-server Router:
docs/adr/010-model-routing.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

