shared-context

Loads project conventions and learned patterns into every agent session for consistent multi-agent output.

1|Updated Jul 23, 2026
One-click install
npx skills add https://github.com/sanjanb/my-agent-harness --skill shared-context-sanjanb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shared-context
Source: https://github.com/sanjanb/my-agent-harness/tree/main/skills/shared-context
Command: npx skills add https://github.com/sanjanb/my-agent-harness --skill shared-context-sanjanb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? When multiple AI agents work on the same project independently, they guess conventions separately and produce inconsistent output: different naming styles, duplicated utilities, and conflicting patterns. This Skill eliminates that divergence by loading a shared layer of project conventions, coding standards, and architecture decisions into every agent session. ## Core Features & Use Cases - Static Shared Context: Maintains an orchestrator-managed .opencode/shared-context.json file containing project structure, naming conventions, existing patterns, and architecture decisions that every agent reads before starting work. - Learned Conventions Memory: Agents append project-specific discoveries to an append-only .opencode/conventions.jsonl file with dedup, tagging, and supersede rules, so knowledge persists across sessions. - Multi-Agent Coordination: Defines read/write responsibilities for coder, designer, researcher, reviewer, explorer, and orchestrator agents, plus conflict resolution rules and automatic consolidation when entries exceed limits. - Use Case: A team runs parallel coder and designer agents on a Next.js project. Each session loads the shared context, so both agents use kebab-case files, Tailwind styling, and existing utilities instead of inventing divergent patterns. ## Quick Start Load the shared project context and learned conventions from the .opencode directory before starting this agent session.

Frequently Asked Questions about shared-context

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep multiple AI agents consistent on the same project?

Load a shared context file into every agent session containing naming conventions, project structure, existing patterns, and architecture decisions. Agents read it before starting work and append newly discovered project-specific conventions to a shared JSONL memory file.

What is the difference between shared-context.json and conventions.jsonl?

shared-context.json is orchestrator-managed and read-only for agents, holding static project structure and decisions. conventions.jsonl is agent-writable and append-only, storing learned project-specific patterns as one JSON object per line for atomic writes and clean git diffs.

Why use JSONL instead of JSON or Markdown for agent memory?

JSONL supports atomic append-only writes without file locks, produces clean line-based git diffs, survives partial writes without corrupting prior entries, and allows grep-based filtering and deduplication without parsing the entire file.

When should an agent write a new convention to memory?

Write when discovering a non-obvious project-specific pattern, fixing a bug caused by a wrong assumption, receiving a human correction, or finding an existing utility. Skip generic programming knowledge, language defaults, one-off situations, and temporary workarounds.

How are conflicting conventions between agents resolved?

Conflicts follow a priority order: code-philosophy rules override conventions, conventions override existing code that may be tech debt, and between two conventions the most recent by date wins. Unresolvable conflicts are flagged for human decision or AutoDream consolidation.