Agent skill

Architecture

by sd0xdev in sd0xdev/sd0x-harness

Architecture design and documentation. An agent skill from sd0xdev/sd0x-harness.

MITAuto-check passedDevelopment

Install Architecture

skills CLI
$ npx skills add sd0xdev/sd0x-harness --skill architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sd0xdev/sd0x-harness architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sd0xdev/sd0x-harness.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/architecture .claude/skills/architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
architecture
GitHub stars
192
Token cost
~3.6k tokens
SKILL.md length
1,355 words
Files
3 (incl. references)
Skills in repo
91
Repo updated
First seen
Licence
MIT

At a glance

Architecture design and documentation. An agent skill from sd0xdev/sd0x-harness.

  • Works in 5 steps: Context Resolution → Architecture Research (parallel) → Architecture Design → …
  • : designing system architecture
  • SKILL.md covers Trigger, When NOT to Use, Usage and Workflow, plus 9 more sections
  • Calls node and git

What it does

Architecture is an agent skill from sd0xdev/sd0x-harness. Architecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and architecture decisions. Reads existing tech-spec as input. Use when: designing system architecture, documenting component interactions, creating architecture docs, producing 3-architecture.md. Not for: tech spec writing (use tech-spec), code implementation (use feature-dev), architecture consulting only (use codex-architect).

Its SKILL.md is about 3.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 3 other files, including reference files (for example `references/codex-prompt.md` and `references/template.md`).

It sits in Development, covering Diagrams. The repository describes itself as: The harness layer for Claude Code — a reference implementation of harness engineering with hook-enforced dual review, state-machine gates that survive context compaction, and… The licence is MIT.

When your agent uses it

  • : designing system architecture
  • Documenting component interactions
  • Creating architecture docs
  • Producing 3-architecture.md

Example prompts

  • “/architecture”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob, Bash(git:*), Bash(node:*), Bash(bash:*), Write, Agent, Skill, AskUserQuestion

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Context Resolution
  2. Architecture Research (parallel)
  3. Architecture Design
  4. Verification (conditional)
  5. Output

What it can do on your machine

Read from SKILL.md and the folder at commit c9a2036. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob
    • Bash(git:*)
    • Bash(node:*)
    • Bash(bash:*)
    • Write
    • Agent
    • Skill
    • AskUserQuestion

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • node
    • git

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Architecture loads about 3.6k tokens when it runs, and up to ~5.4k if it reads all its reference files. Until then it costs about 117 tokens; SKILL.md has 1,355 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~117
When it runs · the whole SKILL.md, loaded when a task matches
~3.6k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~5.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sd0xdev/sd0x-harness at commit c9a2036, republished under its MIT licence (© sd0xdev). 1,355 words, ~3,594 tokens.

Download SKILL.mdSave it as .claude/skills/architecture/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.
name
architecture
description
Architecture design and documentation. Produces 3-architecture.md with component diagrams, data flow, integration points, and architecture decisions. Reads existing tech-spec as input. Use when: designing system architecture, documenting component interactions, creating architecture docs, producing 3-architecture.md. Not for: tech spec writing (use tech-spec), code implementation (use feature-dev), architecture consulting only (use codex-architect).
allowed-tools
Read, Grep, Glob, Bash(git:*), Bash(node:*), Bash(bash:*), Write, Agent, Skill, AskUserQuestion

Architecture Design Skill

Trigger

  • Keywords: architecture, architecture design, architecture doc, component diagram, 3-architecture, system design, document architecture

When NOT to Use

  • Tech spec writing (use /tech-spec)
  • Code implementation (use /feature-dev)
  • Architecture consulting only (use /codex-architect)
  • Implementation roadmap (use /deep-analyze)

Usage

bash
/architecture                          # Auto-detect feature, create/update
/architecture <feature-keyword>        # Specify feature
/architecture --skip-debate            # Skip Phase 3 adversarial debate

Workflow

mermaid
sequenceDiagram
    participant U as User
    participant C as Claude
    participant E as Explore Agent
    participant X as Codex
    participant D as Architecture Designer
    participant B as /codex-brainstorm

    C->>C: Phase 0: Context Resolution
    par Phase 1: Research
        C->>E: Track A: Code pattern analysis (background)
        C->>C: Track B: Read tech-spec (inline)
    end
    E-->>C: Component list + dependencies
    C->>X: Track C: Architecture advice
    X-->>C: Independent recommendations
    C->>D: Phase 2: Architecture Design
    D-->>C: Component + flow + decisions
    C->>B: Phase 3: Verification (debate)
    B-->>C: Equilibrium conclusion
    C->>C: Phase 4: Write 3-architecture.md
    C->>U: Auto-trigger /codex-review-doc

Phase 0: Context Resolution

Detect the target feature using the 5-level cascade.

See @skills/create-request/references/feature-context-resolution.md for the full algorithm.

bash
# The wrapper, not the CLI directly: it owns the failure payload, so the full shape with
# `scan_error: true` arrives however the CLI fails — nonzero exit, signal, partial write, or a
# payload that is not the agreed shape. (Not when `node` itself is unavailable: nothing running
# under node survives that.) `|| echo '{}'` would produce a payload the gate cannot see as failure.
node scripts/resolve-feature.js

scan_error gate. Gate on scan_error !== false, not on scan_error === true. When it is not exactly false the four source sets are unknown, not empty — the corpus could not be enumerated (unreadable directory, broken taxonomy, no repository), or the resolver never ran and a shell fallback supplied a payload with no such field at all. {} is the shape that made the stricter test useless: it has no scan_error, so === true is false and the gate passes a payload that contains nothing. Do not proceed as though the feature has no authority documents — report and take the ⚠️ Need Human exit. A key may still be present, so a non-null key is not evidence the sets are complete.

StateMode
3-architecture.md existsUpdate (incremental)
3-architecture.md absent + a tech spec resolvesCreate (tech-spec-informed)
3-architecture.md absent + no tech spec resolvesCreate (code-only research)
Feature not resolvedGate: Need Human

"A tech spec resolves" means design_records holds an entry of type: tech-spec — the same resolution Track B uses.

design_records is an array, and more than one entry can be a tech spec, so "the entry" needs a rule rather than an assumption. docs/features/auto-loop-evolution/ is the live case: a split spec contributes 2-tech-spec/2-tech-spec.md and its sub-document 2-tech-spec/1-phase-d-hook-hardening.md, both type: tech-spec design records. Select in this order, and stop at the first that answers:

Filter first, then choose — every later rule reads the filtered list, never the whole set. Candidates are the design_records entries whose type is tech-spec; a requirements or architecture record is not a candidate at any step, and a rule phrased over "entries" rather than over candidates will select one. docs/features/codex-review-spec/ and docs/features/harness-engineering-rebrand/ are the live proof: neither has a tech-spec design record, each has exactly one canonical requirements record, and a canonicality test applied to the unfiltered set picks it.

#Candidates (design_records where type: tech-spec)Result
1noneNo tech spec resolves — the ordinary code-only row of the table above. Not an exit: a feature that has not been specced is a normal state, and Track C is given (none — do not read a spec)
2exactly onethat one
3two or more, exactly one with is_canonical: truethat one — a split spec's main file keeps the canonical filename, which is what makes it the main file
4two or more, and none or several canonicalGate: Need Human, naming the candidates

Rows 1 and 4 are different answers and must not be collapsed: "there is no spec" is a fact the skill acts on, "there are two and I cannot tell which" is an ambiguity it must not resolve by picking. The set decides, and the set also names the file. canonical_docs is role-blind: it selects the tech spec from doc_inventory whatever role that document resolves to, so a spec that has declared itself History record or Work record is still non-null there while being absent from design_records. Reading the alias as evidence of design authority is exactly the confusion the source sets replace — and it is no better as a path selector: it is chosen across the whole inventory by type and canonicality, so a historical canonical 2-tech-spec.md beside a design-record variant 2-tech-spec-v2.md makes the set and the alias name different files. Take both the decision and the path from the design_records entry's own file; do not rejoin through the alias for either. Testing for the literal filename 2-tech-spec.md would read a split spec (2-tech-spec/2-tech-spec.md) or a variant (2-tech-spec-v2.md) as "no tech spec" and silently drop to code-only mode.

Scope Gate

For small features (tech-spec WBS has only 1 task, or no tech-spec and < 3 related files), suggest keeping architecture in tech-spec Section 3 instead of creating a separate document. Use AskUserQuestion to confirm.

Phase 1: Architecture Research (parallel)

Launch research tracks. Tracks A and B run in parallel; Track C runs after both complete.

Track A: Code Pattern Analysis (background)
Agent({
  description: "Analyze architecture patterns for <feature>",
  subagent_type: "Explore",
  run_in_background: true,
  prompt: "Analyze the codebase architecture for feature <key>:
    1. Trace execution paths of related modules
    2. Map component dependencies (imports, calls)
    3. Identify integration points with other features
    4. Read docs/architecture.md for global context
    Output: component list + dependency graph + integration points"
})

Fallback: subagent_type: "general-purpose" if Explore unavailable.

Track B: Tech-spec Extraction (inline)

The tech spec is a design record (design_records in the resolver output), which is exactly what this track wants: the intent, not the current behaviour. Track A supplies what the code actually does, and where the two disagree the code wins and the disagreement is worth stating in the architecture doc.

Resolve the file from design_records rather than assuming the name — a split spec lives at 2-tech-spec/2-tech-spec.md and a variant may be 2-tech-spec-v2.md, both of which the resolver classifies and a hard-coded filename misses. Use that entry's own file — do not rejoin through canonical_docs. The alias is selected independently from the whole inventory by type and canonicality (scripts/lib/doc-classifier.js § pickCanonicalDocs), so with a historical canonical 2-tech-spec.md beside a design-record variant 2-tech-spec-v2.md the set returns the variant and the alias returns the historical file. Filtering by role and then resolving the path through the alias silently swaps one for the other.

If a tech spec is present:

  • Read Section 3 (Technical Solution) — architecture diagram, data model, API design
  • Read Section 4 (Risks) — constraints, dependencies
  • Read Section 7 (Open Questions) — unresolved design decisions

If no tech-spec: skip (code-only mode).

Show full SKILL.md (459 more words)Show less
Track C: Codex Architecture Advice (after A+B)

Dispatch references/codex-prompt.md per @skills/codex-code-review/references/codex-transport.md § Start. The transport pins the sandbox and approval policy, so nothing is chosen here.

Provide feature context metadata only — never feed Claude's conclusions (per @rules/codex-invocation.md).

Save threadId for potential follow-up — a continuation goes through that reference's § Resume.

Graceful degradation is per outcome, subordinate to @skills/codex-code-review/references/codex-transport.md § Completion state machine — a single "Codex unavailable" rule flattened four different states into one action:

OutcomeAction
setup-required (adapter not located) or exit 2 (configuration/usage)Surface it to the operator and fix the setup. This is not a Codex failure and nothing degrades on it
exit 1 (codex_fail)Proceed without the third perspective and say so in the output — this advice is not a gate, so there is no fallback carrier to dispatch
Completion unknown (a launch with no consumed result)Wait for it. A launch is not a verdict, and an unknown completion is not an absence
exit 0Integrate the advice as normal

Phase 2: Architecture Design

Dispatch architecture-designer agent with merged research results:

Agent({
  description: "Design architecture for <feature>",
  subagent_type: "architecture-designer",
  prompt: `Design the architecture for <feature>.

  ## Input Context
  ${TECH_SPEC_SUMMARY}
  ${CODE_ANALYSIS}
  ${CODEX_ADVICE}

  ## Required Output
  Follow the output template at @skills/architecture/references/template.md:
  1. Component diagram (Mermaid flowchart)
  2. Component responsibility table
  3. Data flow (Mermaid sequence diagram)
  4. Integration points with existing systems
  5. Architecture decisions (AD-N: context → options → decision → rationale)
  6. Deployment considerations (if applicable)

  ## Constraints
  - Follow @rules/docs-writing.md conventions
  - Reference actual code (file:line, not invented)
  - Mark assumptions explicitly
  - Redact credentials/secrets per @rules/security.md`
})

Fallback: if architecture-designer agent unavailable, use solution-architect agent.

Phase 3: Verification (conditional)

Invoke /codex-brainstorm via Skill tool:

Skill("codex-brainstorm", `Evaluate the proposed architecture for <feature>.

Focus: scalability, maintainability, integration complexity, testability.

Constraints:
- Component diagram from Phase 2
- Tech-spec constraints from Phase 1
- Known risks`)

Must produce: threadId + equilibrium conclusion.

Skip Conditions
ConditionAction
--skip-debate flagSkip Phase 3
Scope gate triggered (small feature)Skip Phase 3
Update mode (incremental change)Skip Phase 3

Graceful degradation: /codex-brainstorm timeout → record timeout in Verification section, still output document.

Phase 4: Output

Write docs/features/<key>/3-architecture.md using the output template.

See references/template.md for the full template.

Cross-References

Auto-insert links:

  • > **Source**: [Tech Spec](./<design_records tech-spec entry .file>) — that entry's own file, never canonical_docs, and not the literal 2-tech-spec.md; a split spec lives one directory deeper and the hard-coded link is dead
  • > **Request**: [Request](./requests/YYYY-MM-DD-*.md) (if active request found)
Auto-Trigger

After Write completes, auto-trigger /codex-review-doc per @rules/auto-loop.md.

Arguments

ArgumentDefaultDescription
<feature-keyword>auto-detectTarget feature
--skip-debatefalseSkip Phase 3 adversarial debate

Verification

  • Feature context resolved (create/update mode determined)
  • Code research completed; the resolved tech spec read when one exists (§ Phase 0 says what "resolved" means, and a feature with no spec has none to read)
  • Codex advice integrated — or its absence recorded as the exit 1 degradation of § Phase 1 Track C, which is this skill's only path to a design without it. There is no flag that skips Track C: --skip-debate skips Phase 3, and the no-tech-spec mode still dispatches Track C with (none — do not read a spec). Integrated or recorded, never neither — an unrecorded absence is indistinguishable from a dispatch nobody made
  • Architecture design includes all required sections
  • Mermaid diagrams are valid
  • Architecture decisions use AD-N format with rationale
  • Cross-references to tech-spec and request docs included
  • /codex-review-doc passed (auto-triggered)
  • No git add/commit/push executed

References

  • references/template.md — Output template for 3-architecture.md
  • references/codex-prompt.md — Codex independent architecture research prompt
  • @skills/create-request/references/feature-context-resolution.md — 5-level feature detection

Examples

Input: /architecture
Action: Auto-detect feature → research (code + spec + Codex) → design → debate → write 3-architecture.md → /codex-review-doc

Input: /architecture statusline-config
Action: Resolve "statusline-config" → read tech-spec → research code → design → write → review

Input: /architecture --skip-debate
Action: Auto-detect → research → design → skip debate → write → review

© sd0xdev, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 2 other files (references) in skills/architecture of sd0xdev/sd0x-harness.

  • SKILL.md
  • references/codex-prompt.md
  • references/template.md

Open the folder on GitHubat commit c9a2036

Compare with similar skills

Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Architecture this skillsd0xdev/sd0x-harness192—~3.6kAutomated safety check: PassMIT
JSON Canvasheyitsnoah/claudesidian2.6k18 repos~3.5kAutomated safety check: PassMIT
Archify Diagramstt-a1i/archify79k—~2.9kAutomated safety check: PassMIT
Diagram Designcathrynlavery/diagram-design44k1 repos~7.5kAutomated safety check: PassMIT
Fireworks Tech Graphtisfeng/Easydict15k1 repos~1.4kAutomated safety check: PassMIT
Excalidraw Diagramcoleam00/excalidraw-diagram-skill4.9k2 repos~6.1kAutomated safety check: PassNone

Similar skills

  • JSON Canvas

    heyitsnoah/claudesidian

    Create and edit JSON Canvas files (.canvas) with nodes, edges, groups, and connections.

    2.6k GitHub starsUsed in 18 repos~3.5k tokens
    DevelopmentAuto-check passed
  • Archify Diagrams

    tt-a1i/archify

    Creates interactive architecture, workflow, sequence, data-flow and lifecycle diagrams as standalone HTML with inline SVG, themes and image or video export.

    79k GitHub stars~2.9k tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Diagram Design

    cathrynlavery/diagram-design

    Creates branded diagrams, from architecture, flowchart and sequence to charts and maps, as self-contained HTML with inline SVG, with import from draw.io, Mermaid and Excalidraw.

    44k GitHub starsUsed in 1 repo~7.5k tokens
    DevelopmentAuto-check passed
  • Fireworks Tech Graph

    tisfeng/Easydict

    Create precise SVG technical diagrams, export PNG or offline HTML, and animate supported semantic SVGs to GIF.

    15k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Excalidraw Diagram

    coleam00/excalidraw-diagram-skill

    Create Excalidraw diagram JSON files that make visual arguments.

    4.9k GitHub starsUsed in 2 repos~6.1k tokens
    DevelopmentAuto-check passed
  • Draw.io Diagram Studio

    Agents365-ai/drawio-skill

    Creates and edits editable draw.io diagrams from descriptions, code, infrastructure files, SQL and API schemas, with sync, review, test and export tools.

    10k GitHub stars~2.4k tokensUpdated 5 days ago
    DevelopmentAuto-check: notes

More from sd0xdev/sd0x-harness

All 91 skills in this repo
  • Adr

    sd0xdev/sd0x-harness

    Write an Architecture Decision Record (ADR) for a feature — Context / Decision / Status / Consequences / Alternatives, filed as docs/features/<feature/adr-<NNN-<title.md with a 3-digit zero-padded…

    192 GitHub stars~4.8k tokensUpdated yesterday
    Auto-check passed
  • Load PR Review

    sd0xdev/sd0x-harness

    Load GitHub PR review comments into AI session — analyze, triage, plan.

    192 GitHub stars~4.4k tokensUpdated yesterday
    Auto-check passed
  • Next Step

    sd0xdev/sd0x-harness

    Change-aware next step advisor. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Obsidian CLI

    sd0xdev/sd0x-harness

    Obsidian vault integration via official CLI. An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • Orchestrate

    sd0xdev/sd0x-harness

    Agent-driven workflow orchestration (v1 report-only). An agent skill from sd0xdev/sd0x-harness.

    192 GitHub stars~2.5k tokensUpdated yesterday
    Auto-check passed
  • PR Comment

    sd0xdev/sd0x-harness

    Post friendly review comments to a GitHub PR — prepare locally, preview, then submit as atomic review.

    192 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Categories

Questions about Architecture

What does Architecture do?

Architecture design and documentation. An agent skill from sd0xdev/sd0x-harness. Architecture is an agent skill from sd0xdev/sd0x-harness. Architecture design and documentation.

When should I use Architecture?

Architecture fits situations like: : designing system architecture; documenting component interactions; creating architecture docs; producing 3-architecture.md.

How do I install Architecture in Claude Code?

Run `npx skills add sd0xdev/sd0x-harness --skill architecture -a claude-code`. Or copy the skill folder (skills/architecture in sd0xdev/sd0x-harness) into .claude/skills/architecture in your project. Claude Code loads it when a task matches its description.

How do I install Architecture in Codex?

Run `npx skills add sd0xdev/sd0x-harness --skill architecture -a codex`. Or copy the skill folder (skills/architecture in sd0xdev/sd0x-harness) into .agents/skills/architecture in your project. Codex loads it when a task matches its description.

Can I use Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sd0xdev/sd0x-harness --skill architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/architecture, .gemini/skills/architecture, .github/skills/architecture and .opencode/skills/architecture in your project.

What does Architecture need to run?

Going by SKILL.md and its folder, Architecture needs the command-line tools its instructions call (node and git). Its frontmatter pre-approves these tools: Read, Grep, Glob, Bash(git:*), Bash(node:*), Bash(bash:*), Write, Agent, Skill, AskUserQuestion.

Does Architecture access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Architecture use?

Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Architecture use?

About 3.6k tokens (SKILL.md is roughly 14k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Architecture?

Skills that share tags, products or a category with Architecture: JSON Canvas (heyitsnoah/claudesidian, 2.6k stars), Archify Diagrams (tt-a1i/archify, 79k stars), Diagram Design (cathrynlavery/diagram-design, 44k stars) and Fireworks Tech Graph (tisfeng/Easydict, 15k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Architecture?

sd0xdev (a GitHub user) maintains it in sd0xdev/sd0x-harness, which has 192 GitHub stars. The repository holds 91 skills in this directory. The repository was last updated on October 6, 2026.

Source: sd0xdev/sd0x-harness on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.