Token导航 LogoToken导航TokenDH.com
研究检索只读clawhub未标认证来源可访问clear审计通过

architecture-consistency-guardian架构一致性守护者

Agent Skill

architecture-consistency-guardian 用于查找、检索和筛选相关信息,适合在 OpenClaw 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,725

周安装

193

GitHub Stars

公开资料未说明

下载量

1,529
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:architecture-consistency-guardian(架构一致性守护者)
来源仓库:https://github.com/upsightx/architecture-consistency-guardian
安装命令:
openclaw skills install architecture-consistency-guardian
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install architecture-consistency-guardian

简介

在代码变更前强制执行系统级一致性规则。architecture-consistency-guardian 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适用于跨文件重构与变量命名标准化任务。
  • 可自动检测并提示参数或字段命名冲突问题。
  • 安装命令:openclaw skills install architecture-consistency-guardian。
  • 建议在受控环境中测试后再应用于关键项目。

SKILL.md

name
architecture-consistency-guardian
description
>

Architecture Consistency Guardian

Purpose

Force a global-first posture for every code change that touches shared contracts: names, states, paths, configs, schemas, entry points, fallbacks, or documentation.

The default agent behavior is to patch the immediate error site. This skill overrides that instinct: scan globally, identify the single source of truth, modify as a group, audit for residue, then verify.

Mandatory Workflow (8 phases)

Every task under this skill MUST follow these phases in order. Skip a phase only if you can explicitly justify why it does not apply.

Phase 1 — Classify the Task

Determine which consistency category applies:

CategoryExamples
namingVariable, field, parameter, event name unification
state-machineStatus values, transition rules, write-back entry
config-pathDB path, env var, runtime config, deploy assumption
entry-pointConsolidating orchestrator / service / manager as sole entry
schemaTable name, column name, migration, compatibility layer
legacy-cleanupRemoving old fallback, old table writes, old function names
doc-alignmentSyncing SKILL.md, README, comments, contract docs with code
cross-moduleMulti-repo or multi-directory coordinated change

If multiple categories apply, lead with the one closest to the source of truth.

Phase 2 — Identify the Single Source of Truth

Answer explicitly before writing any code:

  1. What is the canonical file/module for this contract?
  2. Are there competing sources? List them.
  3. Which one survives, which ones get retired?

If no architecture contract document exists, produce a temporary contract summary (inline in your plan) covering: canonical state field, canonical write entry, canonical config source, and legacy items to retire. Read references/contract_template.md for the template when creating a persistent contract file.

Phase 3 — Global Reference Scan

Search the entire relevant scope (not just the current file) for:

  • Old and new variable/field names
  • Old and new status values
  • Hardcoded paths or env vars that should come from config
  • Old table names or column names
  • Old function/method names
  • Fallback branches that route to retired logic
  • Documentation still describing old flows

Use scripts/grep_legacy.py when available:

python3 <skill_dir>/scripts/grep_legacy.py <directory> <pattern1> <pattern2> ...

Use scripts/scan_contract_drift.py for multi-source detection:

python3 <skill_dir>/scripts/scan_contract_drift.py <directory> [--pattern-file <file>] [--mode default|lite|strict]

Mode guidance:

  • default: best general-purpose mode; ignores reference/template/test-only mentions as evidence
  • lite: same filtering as default, but down-ranks lower-risk categories for quick triage
  • strict: count every matching file, including references and tests, for forensic audits

Lite Mode

For small consistency fixes touching only 2-3 files with one clear source of truth, you may run a lite variant of the workflow:

  1. Classify the task
  2. Identify the source of truth
  3. Run a scoped global reference scan
  4. Output a short modification plan
  5. Edit all affected files in one pass
  6. Run a residue search for the retired names/paths
  7. Verify with at least one focused check

Use full 8-phase mode for state machines, schema changes, config paths, entry-point consolidation, or any task where multiple competing truths may exist.

Phase 4 — Produce a Modification Plan

Before touching code, output a concise plan:

  1. Source of truth — the canonical file
  2. Affected files — full list
  3. Changes per file — what gets renamed/removed/updated
  4. Compatibility layers to remove or retain (with justification if retained)
  5. Regression strategy — how you will verify

Do NOT proceed to edits without this plan.

Phase 5 — Execute Grouped Modifications

Recommended order: source of truth → callers → config layer → compatibility layer → tests → docs.

Rules:

  • Modify all references in a single logical pass; do not leave half-renamed states.
  • If a legacy item must be temporarily retained, mark it with a comment:

# COMPAT: <reason> — remove by <date or condition>

  • Never silently keep old logic alive.

Phase 6 — Residue Audit

After all edits, actively search for:

  1. Old variable/field names still present
  2. Old status values still present
  3. Old paths or env vars still present
  4. Old fallback branches still present
  5. Docs, comments, or SKILL files still referencing old flow

Use scripts/grep_legacy.py again with the retired names. If any residue is found, either fix it or explicitly document why it remains.

Phase 7 — Regression Verification

Execute at least one of:

  • Run existing test suite
  • Run a minimal script verifying the changed contract
  • Search for old names (zero hits expected)
  • Validate schema against code references
  • Confirm config resolution in the real directory layout

Phase 8 — Structured Report

Every task MUST end with a report containing these sections:

SectionRequiredContent
ClassificationWhich consistency category
Source of truthThe canonical location
ScopeFiles/modules affected
Changes madeConcrete list of modifications
Residual compatWhat old logic remains and why
VerificationWhat checks were performed
Follow-up risksRecommendedNext steps or remaining debt

Read references/output_template.md for the full report template.

Hard Rules

These are non-negotiable constraints:

  1. Never modify only the error site when the root cause is a contract mismatch.
  2. Never rename a symbol in one file without searching all files for the old name.
  3. Never delete a legacy path without confirming no external module depends on it.
  4. Never keep a fallback silently — if it stays, it gets a COMPAT comment and a reason.
  5. Never report "fixed" without stating what residue remains.
  6. Never skip doc/comment updates when code behavior changes.
  7. Always expand scope when the change touches: config vars, env vars, DB paths,

table/column names, status fields, status values, event names, service entry points, fallback logic, or documented main paths.

When to Suggest an Architecture Contract File

If you observe any of these recurring in a project, recommend creating an ARCHITECTURE_CONTRACT.md (template in references/contract_template.md):

  • Multiple status fields coexisting for the same entity
  • Multiple config entry points for the same value
  • Multiple write paths for the same data store
  • Docs and code chronically out of sync
  • Repeated legacy/new path confusion across tasks

References

  • references/workflow.md — Detailed workflow with decision branches and edge cases
  • references/output_template.md — Structured report template
  • references/risk_patterns.md — Common consistency risk patterns with examples
  • references/contract_template.md — Architecture contract template for projects lacking one

Scripts

  • scripts/grep_legacy.py — Scan directories for legacy name/path/status residue
  • scripts/scan_contract_drift.py — Detect multiple competing sources of truth; supports --mode default|lite|strict
  • scripts/summarize_impacts.py — Aggregate scan results into an impact summary

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

76.33%
按下载量换算1,167

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills