global/skills/harness/SKILL.md
Design and build domain-specific agent team harnesses. Analyzes project domains, selects architecture patterns (Pipeline, Fan-out/Fan-in, Expert Pool, Producer-Reviewer, Supervisor, Hierarchical, Generator-Evaluator, Long-Running Session), defines specialized agents (.claude/agents/), and generates skills (.claude/skills/) with orchestration. Use when building new agent teams, designing multi-agent workflows, creating domain harnesses, restructuring agent architectures, setting up long-running multi-session projects, or configuring agent frontmatter (tools, memory, permissions).
npx skillsauth add kcenon/claude-config harnessInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A meta-skill for designing domain/project-specific harnesses: defining each agent's role and generating the skills each agent will use.
Core principles:
.claude/agents/) and skills (.claude/skills/).The default is agent teams. When two or more agents collaborate, prefer agent teams. Team members coordinate via direct communication (SendMessage) and shared task lists (TaskCreate), enabling discovery sharing, conflict discussion, and gap coverage that improve result quality.
Use sub-agents only when there is a single agent, or when inter-agent communication is unnecessary (only result passing is needed).
See
reference/agent-design-patterns.mdfor the comparison table and decision tree.
reference/agent-design-patterns.md for details):
Evaluate along 4 axes: specialization, parallelism, context, and reusability. See reference/agent-design-patterns.md for the detailed criteria table.
All agents must be defined as project/.claude/agents/{name}.md files. Never put the role directly into the Agent tool's prompt parameter without an agent definition file. Reasons:
Even when using built-in types (general-purpose, Explore, Plan), create an agent definition file. Specify the built-in type via the Agent tool's subagent_type parameter, and include role, principles, and protocols in the definition file.
Model configuration: All agents use model: "opus" by default. Always include model: "opus" when invoking the Agent tool. Harness quality depends directly on agent reasoning capability, and opus provides the highest quality. This is configurable -- substitute a different model if cost or speed constraints require it.
Team reconstitution: Only one agent team can be active per session, but you can disband a team between phases and create a new one. For pipeline patterns requiring different specialist combinations per phase, save previous team outputs to files, clean up the team, then create a new team.
Define each agent in project/.claude/agents/{name}.md. Required sections: core role, working principles, input/output protocol, error handling, collaboration. In agent team mode, add a ## Team Communication Protocol section specifying message send/receive targets and task request scope.
Agent frontmatter fields: Beyond name and description, agent definitions support 13+ optional fields including tools, model, permissionMode, memory, maxTurns, skills, mcpServers, hooks, background, effort, isolation, color, and initialPrompt. Use these fields to precisely control each agent's capabilities, security posture, and execution behavior. See reference/agent-frontmatter-spec.md for the complete specification and field-by-field guidance.
Agent memory: For agents that build knowledge across sessions, specify the memory field in frontmatter. Three scopes are available:
project: Version-controlled and team-shareable (.claude/agent-memory/<name>/). Best for patterns the whole team benefits from.user: Cross-project and private (~/.claude/agent-memory/<name>/). Best for personal workflow preferences.local: Project-specific, not version-controlled (.claude/agent-memory-local/<name>/). Best for machine-specific environment details.Memory is curated automatically (200 lines / 25KB limit in context). Include initialPrompt: "Check your memory for established patterns before starting." to ensure agents consult prior knowledge.
See
reference/agent-design-patterns.mdfor agent definition structure,reference/agent-frontmatter-spec.mdfor the complete frontmatter specification, andreference/team-examples.mdfor full file examples.
When including a QA agent:
general-purpose type (Explore is read-only and cannot run verification scripts).reference/qa-agent-guide.md for the detailed guide.Generate skills for each agent at project/.claude/skills/{name}/SKILL.md. See reference/skill-writing-guide.md for detailed writing guidance.
skill-name/
SKILL.md (required: YAML frontmatter with name + description, then markdown body)
scripts/ (optional: executable code for repetitive/deterministic tasks)
references/ (optional: conditionally loaded reference documents)
assets/ (optional: output files such as templates, images)
The description is the skill's only trigger mechanism. Claude tends to be conservative about triggering, so write descriptions aggressively ("pushy").
Bad: "A skill that processes PDF documents"
Good: "Read PDF files, extract text/tables, merge, split, rotate, watermark, encrypt, OCR, and all other PDF operations. Use this skill whenever a .pdf file is mentioned or a PDF output is requested."
Key: describe what the skill does + specific trigger situations, and distinguish from similar but non-triggering cases.
| Principle | Description |
|-----------|-------------|
| Explain the why | Instead of "ALWAYS/NEVER" directives, convey reasons. LLMs judge edge cases correctly when they understand the rationale. |
| Keep it lean | The context window is a shared resource. Target under 500 lines for SKILL.md; move non-essential content to references/. |
| Generalize | Explain principles rather than narrow rules that only fit specific examples. Avoid overfitting. |
| Bundle repetitive code | When agents commonly write the same helper scripts during testing, pre-bundle them in scripts/. |
| Use imperative voice | Write in directive style: "Do X", "Use Y". |
Skills manage context through a 3-tier loading system:
| Tier | Loaded when | Size target | |------|------------|-------------| | Metadata (name + description) | Always in context | ~100 words | | SKILL.md body | On skill trigger | <500 lines | | references/ | On demand only | Unlimited (scripts can be executed without loading) |
Size management rules:
The orchestrator is a specialized skill that weaves individual agents and skills into a single workflow, coordinating the entire team. While Phase 4 skills define "what each agent does and how", the orchestrator defines "who collaborates in what order and when". See reference/orchestrator-template.md for concrete templates.
Agent team mode (default):
The orchestrator creates a team with TeamCreate, assigns tasks via TaskCreate. Members coordinate via SendMessage. The leader monitors progress and synthesizes results.
Sub-agent mode:
The orchestrator calls sub-agents directly via the Agent tool. Sub-agents return results only to the main agent.
| Strategy | Method | Execution mode | Best for |
|----------|--------|---------------|----------|
| Message-based | SendMessage between team members | Agent team | Real-time coordination, feedback exchange, lightweight state |
| Task-based | TaskCreate/TaskUpdate for shared state | Agent team | Progress tracking, dependency management, task requests |
| File-based | Write/read at agreed paths | Both | Large data, structured artifacts, audit trails |
Recommended combination for agent teams: task-based (coordination) + file-based (artifacts) + message-based (real-time communication).
File-based passing rules:
_workspace/ folder under the working directory for intermediate artifacts.{phase}_{agent}_{artifact}.{ext} (e.g., 01_analyst_requirements.md)._workspace/ for auditing.Include error handling policies in the orchestrator. Core principle: retry once, then proceed without that result on re-failure (note the gap in the report); for conflicting data, keep both with source attribution.
See
reference/orchestrator-template.mdfor error type strategy tables and implementation details.
For long-running harnesses that span multiple context windows, prefer context reset (clear window + hand off structured state via files) over automatic compaction. Compaction is lossy -- each summarization round loses detail. Context reset preserves full fidelity by writing all intermediate state to _workspace/ files before clearing the window.
Reset protocol: When approaching context limits, write intermediate state to _workspace/ (progress.txt, features.json, current_state.md), commit current work, then start a fresh session that reads state files to resume.
Session continuity: Each session must end in a "merge-ready state" -- no major bugs in completed features, all tests passing, clear documentation of the next action. This ensures any session can be the last without leaving broken code.
See
reference/long-running-harness-guide.mdfor the full context reset protocol, session continuity patterns, sprint contracts, and the Generator-Evaluator architecture.
| Work scope | Recommended team size | Tasks per member | |-----------|----------------------|-----------------| | Small (5-10 tasks) | 2-3 members | 3-5 | | Medium (10-20 tasks) | 3-5 members | 4-6 | | Large (20+ tasks) | 5-7 members | 4-5 |
More members means more coordination overhead. Three focused members outperform five unfocused ones.
Validate the generated harness. See reference/skill-testing-guide.md for the detailed testing methodology.
run_in_background settings.scripts/.Validate that each skill's description triggers correctly:
Near-miss key insight: obviously unrelated queries ("write a Fibonacci function") have no test value. Good test cases are ambiguous boundary queries like "extract charts from this Excel file as PNG" (spreadsheet skill vs image conversion).
Also check for trigger collisions with existing skills.
## Test Scenarios section to the orchestrator skill.After generation, confirm:
project/.claude/agents/ -- agent definition files created (even for built-in types)project/.claude/skills/ -- skill files (SKILL.md + references/)model: "opus" parameter.claude/commands/ -- nothing createdreference/agent-design-patterns.mdreference/agent-frontmatter-spec.md -- complete 13+ field reference for .claude/agents/ definitions, including tools, model, permissionMode, memory, and morereference/long-running-harness-guide.md -- Generator-Evaluator architecture, session continuity, context reset strategy, sprint contracts, harness evolutionreference/team-examples.mdreference/orchestrator-template.mdreference/skill-writing-guide.md -- writing patterns, examples, data schema standardsreference/skill-testing-guide.md -- testing/evaluation/iterative improvement methodologyreference/qa-agent-guide.md -- for including a QA agent in build harnesses; covers integration coherence verification, boundary bug patterns, and QA agent definition templates based on 7 real-world bug casesdevelopment
Generate and validate the bidirectional traceability matrix linking requirements, design, code, tests, risk records, and standard clauses. Consumes docs/.index/{manifest,bundles,graph,router}.yaml plus an optional compliance/ directory and produces docs/.index/traceability.yaml (machine-readable) and docs/.index/traceability.md (human-readable). Read-mostly: writes only the two trace artifacts and never mutates source documents. Opt-in — no-op when docs/.index/graph.yaml is absent so non-regulated repos are unaffected.
development
Maintain a SOUP (Software Of Unknown Provenance) register for every third-party software item the project depends on. Discovers candidates from lockfiles (package-lock.json, go.sum, Cargo.lock, requirements.txt, pyproject.toml, pom.xml, packages.lock.json), enriches with human-supplied risk class and verification refs, validates against a license allow-list and the requirements catalogue, and emits a per-supplier report. Outputs docs/.index/soup.yaml plus docs/.index/soup.md. Subcommands: discover | enrich | validate | list | report. Bidirectional linking with traceability via the soup_ids[] field on requirement rows. Opt-in: no-op when no lockfile is detected and docs/.index/soup.yaml is absent. Atomic writes (*.tmp + rename); idempotent (records sorted by id). Implements IEC 62304 sections 5.3.3 (SOUP requirements) and 8.1.1 (configuration items).
devops
Parse sonarcloud[bot] PR comments, classify findings, codify whitelisted auto-fixes, escalate the rest.
testing
Manage Hazard and Risk records for projects on the regulated-industry track. Maintains a single normalized risk file (docs/.index/risk-file.yaml) holding hazard identification, initial and residual risk estimates, control measures with verification links, and bidirectional Risk<->Requirement linking via the requirements[] field. Subcommands: add | edit | evaluate | validate | list. Output is consumed by the traceability skill (matrix risk_ids[] field) and the evidence-pack skill (risk_file kind). Opt-in: no-op when docs/.index/manifest.yaml is absent so non-regulated repos are unaffected. Atomic writes via *.tmp + rename; idempotent for diffability. Implements ISO 14971 sections 5-9 operationally.