architecture-refiner

architecture-refiner is a skill for Claude Code from techygarg/lattice. It costs 114 tokens per session (3,376 once invoked), scanned A, original, MIT.

A guided discussion for choosing and documenting the architectural rules a software repository should follow, such as clean architecture or a modular monolith.

In plain words
What is it for?
Use it when setting up architecture standards or deciding how code should be divided into layers, modules, and dependencies.
Why use it?
It turns vague design preferences into a shared document that later development work can follow.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the lattice plugin — 33 skills, 1 agent shipped together

Good fit Use it when setting up architecture standards or deciding how code should be divided into layers, modules, and dependencies.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/techygarg/lattice/architecture-refiner
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add techygarg/lattice --skill architecture-refiner
Clone the repo
git clone --depth 1 https://github.com/techygarg/lattice

Made for: Claude Code.

Or install lattice, the plugin that ships this one along with the rest of its 33 skills, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for architecture-refiner

README.md
[![agentmods](https://agentmods.dev/badge/skills/techygarg/lattice/architecture-refiner.svg)](https://agentmods.dev/skills/techygarg/lattice/architecture-refiner)
Your own site
<a href="https://agentmods.dev/skills/techygarg/lattice/architecture-refiner"><img src="https://agentmods.dev/badge/skills/techygarg/lattice/architecture-refiner.svg" alt="Measured on agentmods" height="20"></a>
Per session 114 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,376 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 24
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00114 $0.03376
Opus 5 $0.00057 $0.01688
Sonnet 5 $0.00023 $0.00675
Haiku 4.5 $0.00011 $0.00338

Measured 8d ago against content hash e9b78fa0bb2c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

architecture-refiner scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 8d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/architecture-refiner/SKILL.md · 272 lines

How it starts

The opening of the file, as written. The whole thing — 272 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Architecture Refiner

Step 0: Style Selection

Before anything else, ask the user which architecture style their team uses:

"What architecture style does your team use?

  1. Clean Architecture (default) — layers (Domain, Application, Interface, Infrastructure), dependency inversion, command/query separation
  2. Hexagonal / Ports & Adapters — core domain surrounded by ports, adapters on the outside
  3. Modular Monolith — vertical slices, each module owns its own layers
  4. Custom / Define from scratch — you describe the layers and rules"

Branching:

  • Option 1 → proceed to the clean architecture flow below (existing interview). Template: ./assets/template-clean-arch.md. Output: .lattice/standards/architecture.md. Config key: paths.architecture. No architecture_mode key needed (defaults to clean).
  • Options 2–4 → proceed to the generic architecture flow. Template: ./assets/template-generic.md. Output: .lattice/standards/architecture.md. Config key: paths.architecture. Additionally, set architecture_mode: custom in .lattice/config.yaml.

The rest of this document describes the clean architecture flow (Option 1). For the generic flow (Options 2–4), read ./assets/template-generic.md and follow its <!-- INTERVIEW GUIDANCE: --> comments. The facilitation approach, conversation style, output assembly, and document quality checks below apply to both flows — substitute the appropriate template, output path, and config key.

What This Produces

For clean architecture (Option 1):

  • Output: .lattice/standards/architecture.md (or custom path from .lattice/config.yamlpaths.architecture)
  • Two modes:
    • Overlay (mode: overlay): A slim document containing only sections that differ from the defaults. The architecture atom reads its embedded clean-architecture defaults first, then applies this document's sections on top. This is the expected common case.
    • Override (mode: override): A comprehensive standalone document that fully replaces the atom's embedded defaults. For teams that want to define clean architecture from scratch.
  • Default mode: Overlay -- produces only what the user wants to change
  • Config key: paths.architecture in .lattice/config.yaml
  • Template: Read ./assets/template-clean-arch.md for the full document structure, default content, and interview guidance comments

Read the full file on GitHub · 272 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 8d ago First seen · 272 lines · 114 tokens per session scan A e9b78fa0bb2c

Subscribe to this mod's changes

architecture-refiner is a skill published in the GitHub repository techygarg/lattice (185 stars, last pushed yesterday), licensed MIT. It adds 114 tokens to every session and 3,376 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

name-your-business

Generate, refine, compare, and when needed validate distinctive names for startups, AI products, developer tools, protocols, open-source projects, apps, product families, local businesses, services, companies, nonprofits, and other organizations. Use when asked to name or rename a business, brand, product, venture…

tamdogood/builder-essential-skills · 156 tokens

top-one-percent

Teach any topic deeply from first principles and build evidence-based paths toward exceptional capability. Use when a user asks to understand, explain, learn, or deep-dive into a topic; asks why or how something works, why it matters, how alternatives compare, or what different perspectives reveal; requests current…

tamdogood/builder-essential-skills · 111 tokens

paper-opportunity-radar

Run a cumulative daily or retrospective sweep of research papers on a chosen topic, audit their claims, methods, integrity signals, and independent support, then identify overlooked but feasible project or business opportunities in a detailed source-grounded report. Use when asked to monitor papers every day, mine…

tamdogood/builder-essential-skills · 98 tokens

repo-system-map

Analyze a software repository at the latest remote main commit and turn its implemented architecture into a citation-backed interactive isometric system map with a legend, selectable infrastructure buildings, dependency and payload flows, and plain-language learner explanations. For eligible public GitHub…

tamdogood/builder-essential-skills · 123 tokens

build-scenario-tests

Inspect an unfamiliar repository, turn a focused Markdown behavior scenario into a deterministic test in the repository's native test stack, run it, and preserve traceability between intent and code. Use when asked to add scenario tests, compile acceptance criteria or Given/When/Then Markdown into executable tests…

tamdogood/builder-essential-skills · 104 tokens

create-marketing-kit

Create truthful, human-centered marketing campaigns for an app or product, including positioning, channel copy, original artwork, editable layouts, README banners, and selective website integration. Use when asked to make launch materials, promotional artwork, social assets, campaign kits, ads, or marketing content…

tamdogood/builder-essential-skills · 106 tokens