code-architecture

code-architecture is a skill for Claude Code, Codex from BuildrAI/Buildr. It costs 56 tokens per session (1,079 once invoked), scanned A, original, MIT.

A skill for planning and reviewing the structure of software: modules, files, objects, responsibilities, and the way parts call each other. It uses the project's existing language and conventions rather than imposing one fixed architecture.

In plain words
What is it for?
Use it when designing a new feature, restructuring modules, splitting or merging files, or making a code-architecture map before implementation.
Why use it?
It helps prevent misplaced business logic, tangled dependencies, unnecessary files, and unclear ownership of data or writes.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when designing a new feature, restructuring modules, splitting or merging files, or making a code-architecture map before implementation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/buildrai/buildr/code-architecture
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 BuildrAI/Buildr --skill code-architecture
Clone the repo
git clone --depth 1 https://github.com/BuildrAI/Buildr

Made for: Claude Code, Codex.

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 code-architecture

README.md
[![agentmods](https://agentmods.dev/badge/skills/buildrai/buildr/code-architecture/github.svg)](https://agentmods.dev/skills/buildrai/buildr/code-architecture)
Your own site
<a href="https://agentmods.dev/skills/buildrai/buildr/code-architecture"><img src="https://agentmods.dev/badge/skills/buildrai/buildr/code-architecture/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-architecture

Your own site · 80×15
<a href="https://agentmods.dev/skills/buildrai/buildr/code-architecture"><img src="https://agentmods.dev/badge/skills/buildrai/buildr/code-architecture.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,079 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.
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.00056 $0.01079
Opus 5 $0.00028 $0.00540
Sonnet 5 $0.00011 $0.00216
Haiku 4.5 $0.00006 $0.00108

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

Security

Grade A, and why

code-architecture 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 2d 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.

projects/product/services/buildr/resources/workspace/skills/buildr/code-architecture/SKILL.md · 54 lines

What it actually says

代码架构(Code Architecture)

以面向对象设计(OOD)的职责封装和明确协作为基础,用项目现有语言、框架和约定表达。目标是让人看懂功能位置、对象职责、依赖和数据流;不要求固定目录、层数或全部使用类。

分层与职责

先读当前任务相关的规则、源码、调用方和测试,确认业务与数据归属,再映射到项目结构。

职责 常见位置 提供什么
领域模型(Domain) domain、model 业务实体、身份、关系和自身规则
应用服务(Application) service、application 用例、跨对象检查、操作顺序和事务范围
数据访问(Persistence) repository、mapper、dao、persistence 数据读取、映射、写入和存储兼容
基础设施(Infrastructure) infrastructure、adapter 文件、Git、进程、消息和外部系统等技术操作
接口入口(Interface) controller、handler、cli 参数解析、协议校验、应用调用和响应转换
对象装配(Composition) module、configuration、bootstrap 创建对象、注入依赖和注册入口

模块按业务或能力归属组织,各层通过明确对象、函数或接口协作。业务数据存取归所属模块;通用技术能力不接管业务规则。保持唯一业务写入责任,避免循环依赖和通过万能对象暴露全部内部方法。

对象与类型

  • 值对象(VO)、数据传输对象(DTO)通常在所属业务层对象内定义为内部类型;语言不支持时放在同一文件内。
  • 自定义 SQL、联表和聚合查询的映射对象,通常在所属数据访问对象内定义;需要时转换为应用结果。
  • 业务实体、存储记录和接口结果按实际语义区分;不机械增加相同字段的镜像对象。
  • 类型被多个独立能力共同维护,或协议、独立维护确有需要时,再单独成文件;公开方法中的类型保持必要可见性。VO 的具体含义沿用项目约定。

文件拆分与合并

优先在同一文件内用对象方法、私有函数和局部类型组织相关行为。除语言、框架和公开协议要求外,拆文件主要依据以下两点:

  1. 能力具有重要、稳定的地位,需要隔离维护。
  2. 文件体量与复杂度已妨碍阅读和修改,存在清楚的维护分界。

不按行数设统一阈值,也不因为有独立逻辑单元就拆文件。同一应用可包含创建、查询和修改;必要时才按查询/命令(Query/Command)等维度拆分。多个小文件总要一起阅读修改、主要负责转发时,考虑合并。

层边界调整可以是移动代码或内部重组。共享能力必须有真实复用和一致语义;小工具可以在一个文件内分组,无须预建完整分层目录。

前端按领域组织页面和完整交互组件。表单可包含自己的字段、状态和提交;单页短钩子(Hook)可留在页面内,真实共享逻辑再独立。跨领域宿主负责装配,不为每个组件机械配套类型、状态、钩子和客户端文件。

代码地图与验证

新功能优先扩展已有能力;重构说明具体阅读或维护问题;审查区分必要调整、可选优化和保留项。只处理当前授权范围,项目与用户明确约定优先。

输出相关目录树,标明所属层、主要对象和代表性方法;补充关键调用链。调整项写清“现有文件 → 保留/内部整理/移动/合并/新增 → 原因 → 调整后功能”。区分当前与拟议结构,不做逐行索引。

地图采用项目真实文件名和中英文职责说明。小改动只展示相关分支,已有架构文档就地维护。需要分层、内部类型或拆并案例时,按对应小节读取 references/examples.md,不把示例当固定目录模板。

实施后核对调用、数据归属和副作用,运行适用的编译、类型及行为检查。确认功能能从地图定位、边界与实现一致、拆并降低阅读成本;目录整齐、文件变短和静态检查通过不等于行为验证完成。

Files

What ships with it

1 file 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. 2d ago First seen · 54 lines · 56 tokens per session scan A c33c6a663031

Subscribe to this mod's changes

code-architecture is a skill published in the GitHub repository BuildrAI/Buildr (24 stars, last pushed 2d ago), licensed MIT. It adds 56 tokens to every session and 1,079 once invoked, about $0.0003 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-09-07.