metago-arch

metago-arch is a skill for Claude Code, Codex from metago-ai/metagolifeform. It costs 110 tokens per session (734 once invoked), scanned A, original, MIT.

A code-architecture governance add-on based on SOLID and Clean Architecture, which organize code into clear responsibilities and dependency directions. It can initialize, scaffold, check, and report on project architecture.

In plain words
What is it for?
Use it when creating projects or modules, changing business code, refactoring, reviewing architecture, or checking whether dependencies follow the configured layers.
Why use it?
It helps prevent business code from becoming tied to frameworks, databases, or the wrong layers. This makes dependency problems and naming violations easier to find during development and refactoring.

Skill for Claude CodeCodex

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

Good fit Use it when creating projects or modules, changing business code, refactoring, reviewing architecture, or checking whether dependencies follow the configured layers.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/metago-ai/metagolifeform/metago-arch
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 metago-ai/metagolifeform --skill metago-arch
Clone the repo
git clone --depth 1 https://github.com/metago-ai/metagolifeform

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 metago-arch

README.md
[![agentmods](https://agentmods.dev/badge/skills/metago-ai/metagolifeform/metago-arch/github.svg)](https://agentmods.dev/skills/metago-ai/metagolifeform/metago-arch)
Your own site
<a href="https://agentmods.dev/skills/metago-ai/metagolifeform/metago-arch"><img src="https://agentmods.dev/badge/skills/metago-ai/metagolifeform/metago-arch/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 metago-arch

Your own site · 80×15
<a href="https://agentmods.dev/skills/metago-ai/metagolifeform/metago-arch"><img src="https://agentmods.dev/badge/skills/metago-ai/metagolifeform/metago-arch.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 110 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 734 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.00110 $0.00734
Opus 5 $0.00055 $0.00367
Sonnet 5 $0.00022 $0.00147
Haiku 4.5 $0.00011 $0.00073

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

Security

Grade A, and why

metago-arch 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 9d 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.

plugins/agent-plugins-1.0.0/skills/metago-arch/SKILL.md · 52 lines

What it actually says

metago-arch 架构治理(供 AI Agent 读取 · 主包版)

何时使用(强制触发)

  • 新建项目、新建模块、编写或修改业务代码、重构、架构审查、代码生成前;
  • 用户提到"架构""分层""SOLID""整洁架构""依赖规则""重构"。

规则文件

规则全文:rules/架构治理规则v1.md(本技能目录内,随主包分发) (若找不到,检索知识库 search-kb.py "架构治理规则" 或询问用户安装位置)

三档分级

  • A 档(核心产品):强制四层 + 依赖规则 + 组合根;
  • B 档(中小项目/内部工具):守 SOLID 的 S+D+OCP + 简单分层;
  • C 档(脚本/原型):不强制检查。

命令(Windows)

metago-lifeform arch version
metago-lifeform arch init [目录] --tier=A|B|C
metago-lifeform arch scaffold <项目名> --tier=A|B|C
metago-lifeform arch check [目录] [--json]
metago-lifeform arch report [目录]

(独立安装包可用 metago-arch 前缀调用相同子命令)

核心规则速记(完整版见规则文件)

  1. domain 层禁止引用 application/adapters/infrastructure(依赖只能向内);
  2. application 层禁止引用 adapters/infrastructure;
  3. domain/application 禁止 import 框架与数据访问库(Python: sqlalchemy/asyncpg/httpx/requests/redis/fastapi 等;TS: express/sequelize/prisma/pg/axios 等);
  4. 用例名是"人类动作"(PlaceOrder),禁止 insert/update/delete/remove 开头;
  5. 跨层数据传简单 DTO,禁止把数据库行/ORM 实体传进内层;
  6. 真实项目用传统目录(services/models/api/core)时,先在 arch.config.json 的 check.layers 配置层映射,否则覆盖率为 0 等于没检查;
  7. 配置/DI 类导入写入 check.allowImports 白名单,避免误报;
  8. strict 模式下分层覆盖率为 0 = FAIL,禁止宣告通过。

交付前检查

  • A/B 档项目:必须运行 metago-lifeform arch check <项目目录>,PASS 才允许宣告完成;
  • 违规未修复 → 禁止宣告完成;特殊情况 → 标注"已知风险"并说明理由;
  • 检查结果可写入 arch-report.mdmetago-lifeform arch report)。
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. 9d ago First seen · 52 lines · 110 tokens per session scan A d3d7ff8a3dc5

Subscribe to this mod's changes

metago-arch is a skill published in the GitHub repository metago-ai/metagolifeform (4 stars, last pushed 11d ago), licensed MIT. It adds 110 tokens to every session and 734 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-09-03.