Agent skill

Architecture

by techygarg in techygarg/lattice

Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).

MITAuto-check passedDevelopment

Install Architecture

skills CLI
$ npx skills add techygarg/lattice --skill architecture -a claude-code

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

GitHub CLI
$ gh skill install techygarg/lattice 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/techygarg/lattice.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
198
Token cost
~1k tokens
SKILL.md length
438 words
Files
4 (incl. references)
Skills in repo
33
Repo updated
First seen
Licence
MIT

At a glance

Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).

  • Works in 2 steps: Read .lattice/config.yaml in repo root → Check architecture_mode key
  • Generating code
  • SKILL.md covers Config Resolution, Enforcement and Design Mode
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Architecture is an agent skill from techygarg/lattice. Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). Defaults to clean architecture; supports any architecture style via the architecture-refiner. Validates layer responsibilities, dependency direction, and structural constraints using the loaded architecture rules. Use when generating code, reviewing architecture, creating new files, or when the user mentions 'architecture', 'layers', 'structure', 'dependency rules', 'hexagonal architecture'…

Its SKILL.md is about 1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/clean-architecture-defaults.md`, `references/clean-architecture.md` and `references/custom-architecture.md`).

It sits in Development, covering Design patterns. The repository describes itself as: Install engineering discipline into any AI coding assistant. Composable skills for design, implementation, review, and team standards. Better process, not just better prompts. The licence is MIT.

When your agent uses it

  • Generating code
  • Reviewing architecture
  • Creating new files
  • The user mentions architecture

Example prompts

  • “architecture”
  • “layers”
  • “structure”
  • “/architecture”

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. Read .lattice/config.yaml in repo root
  2. Check architecture_mode key

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

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

  • Network

    No URLs in SKILL.md.

    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 1k tokens when it runs, and up to ~7.5k if it reads all its reference files. Until then it costs about 166 tokens; SKILL.md has 438 words of instructions outside code blocks.

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

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 techygarg/lattice at commit 4d6c35f, republished under its MIT licence (© techygarg). 438 words, ~1,026 tokens.

Download SKILL.mdSave it as .claude/skills/architecture/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
architecture
description
Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). Defaults to clean architecture; supports any architecture style via the architecture-refiner. Validates layer responsibilities, dependency direction, and structural constraints using the loaded architecture rules. Use when generating code, reviewing architecture, creating new files, or when the user mentions 'architecture', 'layers', 'structure', 'dependency rules', 'hexagonal architecture', 'ports and adapters', 'modular monolith', or 'onion architecture'. Also use when reviewing generated code for structural compliance.

Architecture

Config Resolution

Step 1 — Determine mode:

  1. Read .lattice/config.yaml in repo root
  2. Check architecture_mode key
    • If architecture_mode: custom → custom mode
    • If absent, or other value → clean architecture mode (default)

Step 2 — Load enforce rule:

  • Clean architecture mode → Read ./references/clean-architecture.md for enforce instruction (Self-Validation Checklist, Anti-Pattern Scan, Ambiguity Signals, structural principles)
  • Custom mode → Read ./references/custom-architecture.md for enforce instruction

Step 3 — Load architecture content:

  • Clean architecture mode:

    1. Check paths.architecture in .lattice/config.yaml for a custom document path.
    2. If a document exists at that path → read it and check its YAML frontmatter for mode:
      • mode: overlay (or no mode field): read ./references/clean-architecture-defaults.md first, then apply the custom document's sections on top. Sections match by exact heading — a custom section replaces the matching default; new sections append after the defaults.
      • mode: override: the custom document takes full precedence. It must be comprehensive.
    3. If the path is configured but no document exists at it → tell the user which configured path is missing, then read ./references/clean-architecture-defaults.md.
    4. If there is no configured path → read ./references/clean-architecture-defaults.md.
  • Custom mode:

    1. Check paths.architecture in .lattice/config.yaml for team architecture doc
    2. If found → read it. Sole reference — no default.
    3. If not found → surface: "No architecture document found. Run /architecture-refiner and select your architecture style to define your team's standards."

Step 4 — Language adaptation:

If paths.language_idioms is set in the config and the document exists, read its "Dependency Management" section and adapt dependency direction enforcement to language idioms (e.g., Go interface-at-consumer, Java DI containers, Rust trait bounds). Language idioms take precedence over pseudocode defaults.

Show full SKILL.md (180 more words)Show less

Enforcement

STOP after generating each component. Read the Self-Validation Checklist and Anti-Pattern Scan from the loaded enforce rule (clean-architecture.md or custom-architecture.md) and apply them.

Project-specific checks: If architecture content doc (loaded in Step 3) contains a Validation Checklist section (§6), apply those checks as additional project-specific validation after the enforce rule checklist.

Design Mode

When invoked during design — no code is being written; a planning molecule is validating a proposed design artifact — apply the same enforce rule as a forward-looking check:

  1. Take the proposed artifact (component list, layer assignment, data flow, or contract set) as the unit of validation.
  2. Evaluate it against the Self-Validation Checklist and Anti-Pattern Scan from the loaded enforce rule, plus the project-specific Validation Checklist if present — before the artifact is presented for user approval.
  3. Report violations as concrete findings on the artifact ("Component X reaches from layer A to layer C, skipping B"), not generic advice. Resolve them through the design.
  4. STOP: do not skip checklist evaluation on the grounds that no code exists yet — the proposed structure is what gets validated.

© techygarg, 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 3 other files (references) in skills/architecture of techygarg/lattice.

  • SKILL.md
  • references/clean-architecture-defaults.md
  • references/clean-architecture.md
  • references/custom-architecture.md

Open the folder on GitHubat commit 4d6c35f

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 skilltechygarg/lattice198—~1kAutomated safety check: PassMIT
Vercel Composition Patternssupabase/supabase111k59 repos~726Automated safety check: PassMIT
Swiftui View RefactorDimillian/Skills4k5 repos~2kAutomated safety check: PassMIT
RTK Rust Design Patternsrtk-ai/rtk83k—~1.9kAutomated safety check: PassApache-2.0
Effect Client WrapperUsefulSoftwareCo/executor4.1k1 repos~1.4kAutomated safety check: PassMIT
Architecture PatternsKartikLabhshetwar/better-shot2.4k2 repos~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    DevelopmentAuto-check passed
  • Swiftui View Refactor

    Dimillian/Skills

    Refactor and review SwiftUI view files with strong defaults for small dedicated subviews, MV-over-MVVM data flow, stable view trees, explicit dependency injection, and correct Observation usage.

    4k GitHub starsUsed in 5 repos~2k tokens
    DevelopmentAuto-check passed
  • Describes seven Rust design patterns for the RTK CLI filter modules, with when to use each, RTK examples, and notes on when a pattern is overkill.

    83k GitHub stars~1.9k tokensUpdated today
    DevelopmentAuto-check passed
  • Effect Client Wrapper

    UsefulSoftwareCo/executor

    Pattern for wrapping third-party SDK clients (Stripe, Resend, AWS, etc.) with Effect.

    4.1k GitHub starsUsed in 1 repo~1.4k tokens
    DevelopmentAuto-check passed
  • Architecture Patterns

    KartikLabhshetwar/better-shot

    Deep dive into software architecture for macOS. An agent skill from KartikLabhshetwar/better-shot.

    2.4k GitHub starsUsed in 2 repos~1.4k tokens
    DevelopmentAuto-check passed
  • GitVersion .NET Development

    GitTools/GitVersion

    Gives repository-specific .NET guidance for GitVersion: build and test commands, central package management, project layout and coding conventions.

    3.1k GitHub stars~1.7k tokensUpdated today
    DevelopmentAuto-check passed

More from techygarg/lattice

All 33 skills in this repo
  • Architecture Compass

    techygarg/lattice

    Architectural thinking partner for an existing repository — scans the codebase, conducts a structured interview, agrees on current architectural state and recommended direction, and produces a…

    198 GitHub stars~4.4k tokensUpdated 2 days ago
    Auto-check passed
  • Lattice Init

    techygarg/lattice

    Guided setup and upgrade-check experience for Lattice projects -- scans the repository, detects existing configuration and outdated conventions, suggests refiners and available upgrades in priority…

    198 GitHub stars~3.3k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Align

    techygarg/lattice

    Audit and fix all Lattice documentation, README, docs/, PROJECT.md, GitHub issue templates, and CLAUDE.md to ensure they are fully aligned with the current skill inventory.

    198 GitHub stars~2k tokensUpdated 2 days ago
    Auto-check passed
  • Skill Validate

    techygarg/lattice

    Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners.

    198 GitHub stars~1.5k tokensUpdated 2 days ago
    Auto-check passed
  • Architecture Refiner

    techygarg/lattice

    Facilitate a structured conversation to define architecture principles for a repository.

    198 GitHub stars~3.7k tokensUpdated 2 days ago
    Auto-check passed
  • Clean Code Refiner

    techygarg/lattice

    Facilitate a structured conversation to define clean code principles for a repository.

    198 GitHub stars~3k tokensUpdated 2 days ago
    Auto-check passed

Categories

Questions about Architecture

What does Architecture do?

Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode). Architecture is an agent skill from techygarg/lattice. Enforce architectural rules when generating or modifying code, and validate proposed designs before approval (design mode).

When should I use Architecture?

Architecture fits situations like: generating code; reviewing architecture; creating new files; the user mentions architecture.

How do I install Architecture in Claude Code?

Run `npx skills add techygarg/lattice --skill architecture -a claude-code`. Or copy the skill folder (skills/architecture in techygarg/lattice) 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 techygarg/lattice --skill architecture -a codex`. Or copy the skill folder (skills/architecture in techygarg/lattice) 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 techygarg/lattice --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?

SKILL.md names no scripts, command-line tools or credentials: Architecture is instructions for the agent only.

Does Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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 1k tokens (SKILL.md is roughly 4.1k 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 6.5k 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: Vercel Composition Patterns (supabase/supabase, 111k stars), Swiftui View Refactor (Dimillian/Skills, 4k stars), RTK Rust Design Patterns (rtk-ai/rtk, 83k stars) and Effect Client Wrapper (UsefulSoftwareCo/executor, 4.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Architecture?

techygarg (a GitHub user) maintains it in techygarg/lattice, which has 198 GitHub stars. The repository holds 33 skills in this directory. The repository was last updated on October 6, 2026.

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