Skip to content
OpenAgentSkill
Browsing is open · Catalog captured 2026-11-21 · Automatic updates and account services are paused.
Development

setup

Claude Code infrastructure + agent team setup — rules, hooks, memory, routing, and agent installation from a guided interview. Combines infrastructure + agent team into one flow. Not project scaffolding (CLAUDE.md/ROADMAP/.gitignore/.env.example) — use project-init for that. Triggers: /setup, setup, harness setup, agent team setup.

AlexZio00 · AI review on file

Installation

Read the source and dependencies before running a command. Copying does not install or execute anything.

npx skills add AlexZio00/sovereign-skills --skill setup

About this skill


skill_type: infrastructure tools: Read, Write, Edit, Bash, WebFetch, Agent triggers:

  • "/setup"
  • "setup"
  • "rules 만들어"
  • "harness 설정"
  • "harness setup" name: setup description: "Claude Code infrastructure + agent team setup — rules, hooks, memory, routing, and agent installation from a guided interview. Combines infrastructure + agent team into one flow. Not project scaffolding (CLAUDE.md/ROADMAP/.gitignore/.env.example) — use project-init for that. Triggers: /setup, setup, harness setup, agent team setup." user_invocable: true concurrency_profile: read_only: false concurrency_safe: false destructive: low not_for:
  • "Existing harness audit -> project-check"
  • "Single rule addition -> edit the rule file directly"
  • "Project scaffolding (CLAUDE.md/ROADMAP/.gitignore/.env.example) -> project-init" see_also:
  • skill: project-check relation: "setup=new project, project-check=existing audit"
  • skill: project-init relation: "setup=AI harness/agent team setup, project-init=project scaffolding (separate skill)"

Setup — Claude Code Infrastructure + Agent Team

Dominant Variable

Does the initialized harness work immediately? — rules/hooks/memory/routing must be applied from the first session after installation. If "installed but not working" occurs, that is failure.

Purpose

Set up the full Claude Code harness layer — rules, hooks, memory, agent routing. Not project scaffolding (use /project-init for that). This is the AI orchestration layer.

Key difference from generic templates: domain presets provide pre-filled rules with real content, not empty skeletons. Every harness includes reject-by-default and violation testing.

Dominant variable: Do the generated project rules' Tier 0 rules pass violation testing? — Rules without tests are decoration. Discard if: A complete harness already exists and only a single rule addition is needed — edit that rule file directly.

Trigger

  • /setup
  • "rules 만들어"
  • "harness 설정"
  • "harness setup"

Key Assumptions

  1. Write permission on ~/.claude/ directory — If broken: guide on permissions.
  2. No existing rules/hooks, or overwrite is approved — If broken: resolve conflicts, then proceed.

Phase 0: Prerequisites

Existing File Check (overwrite protection)

Check each target file before generating:

FileIf exists
~/.claude/rules/project rulesRead it. Offer: update (extend) or replace. Default: update.
~/.claude/rules/agents.mdRead it. Merge new agent definitions, never replace existing ones.
~/.claude/rules/output-style.mdRead it. Offer: update or replace.
~/.claude/settings.json (hooks)Always merge — append to existing arrays, never overwrite.
memory/MEMORY.mdRead it. Append new sections, preserve existing entries.
tasks/lessons.mdIf exists → read it. Contains AI behavior correction rules from past sessions.

Merge algorithm for hooks (settings.json):

1. Read existing settings.json
2. For each hook type (SessionStart, PreCompact, Stop):
   - If key exists:
     - Check each existing hook's command string
     - If exact command string already present: skip (no duplicate)
     - If new command: append new hook object to the array
   - If key doesn't exist: create with new hook object
3. Write merged result back

Never replace the entire hooks object. Never delete existing hook entries.

Check if CLAUDE.md exists in the project root.

  • If yes → read it for context (Hard Rules, stack, conventions)
  • If no → recommend running /project-init first, but don't block

Hard Rules conflict check (if both CLAUDE.md and ~/.claude/rules/project rules exist):

  1. Extract Hard Rules from CLAUDE.md
  2. Compare with Tier-0 rules in project rules
  3. If divergent:
    • Rules in CLAUDE.md not in project rules → propose adding them to project rules
    • Rules in CLAUDE.md weaker than project rules → flag: "CLAUDE.md has a weaker version, remove it"
  4. If identical or CLAUDE.md just has a reference link → no action needed
  5. Recommended outcome: CLAUDE.md contains only Hard Rules → see [.claude/rules/project rules](.claude/rules/project rules), actual rules live only in project rules

Check if ~/.claude/ global structure exists.

  • Read existing rules to detect conflicts before generating.
  • If no global rules exist → this will be the first setup.

Phase 1: Domain Selection (determines everything else)

Q1 — Domain Preset

What kind of system are you building?

1. Trading / Finance — no-action default, no fabrication, paper-only
2. Web Application — secrets protection, input validation, auth-first
3. CLI Tool / Automation — idempotent operations, dry-run default
4. Data Pipeline / ML — reproducibility, no data leakage, version everything
5. General — start minimal, add rules as needed
6. Custom — describe your domain

Your choice determines which hard rules are pre-loaded.
You can add, modify, or remove any of them afterward.

After Q1, load the matching preset (see Presets section below). Show the user what's pre-loaded and ask: "Anything to add, change, or remove?"

Q2 — Agent Complexity (adapts based on Q1)

How complex is your AI agent setup?

- Minimal: rules + memory only. No agent routing.
  → Generates: rules/, memory/, hooks. Done.

- Standard: review agents (code review, testing, verification).
  → Generates: + agent routing, review gates

- Orchestrated: multi-agent with routing, sub-agents, parallel execution.
  → Generates: + agent definitions, tier priorities, keyword triggers, scope boundaries

If Q2 = Minimal → skip Q3. Go to Phase 2. If Q2 = Standard → ask Q3 simplified. If Q2 = Orchestrated → ask Q3 full.

Q3 — Review Gates (only if Q2 >= Standard)

Standard version:

Which review steps before code ships?

- Basic: code review only
- Standard: code review + verification checklist
- Strict: code review + security + v
Read the complete source ↗