aida-govern

aida-govern is a skill for Claude Code from LWTlong/aida. It costs 53 tokens per session (3,615 once invoked), scanned A, original, MIT.

An AI-asset cleanup workflow that scans project rules and skills, classifies their contents, and prepares changes for your approval.

In plain words
What is it for?
Use it to review and organise Claude, Cursor, and Codex rule and skill files, extract task workflows into skills, and apply or undo the approved changes.
Why use it?
It helps prevent duplicated, misplaced, or outdated instructions from building up across an AI coding project. Files are not changed until you confirm the proposed plan.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: reads .claude/ paths; mentions CLAUDE.md; names the AskUserQuestion tool.

Part of the aida plugin — 13 skills, 1 command, 1 MCP server shipped together

Good fit Use it to review and organise Claude, Cursor, and Codex rule and skill files, extract task workflows into skills, and apply or undo the approved changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lwtlong/aida/aida-govern
View source ↗ LWTlong/aida
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 LWTlong/aida --skill aida-govern
Clone the repo
git clone --depth 1 https://github.com/LWTlong/aida

Made for: Claude Code.

Or install aida, the plugin that ships this one along with the rest of its 13 skills, 1 command, 1 MCP server.

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 aida-govern

README.md
[![agentmods](https://agentmods.dev/badge/skills/lwtlong/aida/aida-govern.svg)](https://agentmods.dev/skills/lwtlong/aida/aida-govern)
Your own site
<a href="https://agentmods.dev/skills/lwtlong/aida/aida-govern"><img src="https://agentmods.dev/badge/skills/lwtlong/aida/aida-govern.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,615 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.00053 $0.03615
Opus 5 $0.00026 $0.01808
Sonnet 5 $0.00011 $0.00723
Haiku 4.5 $0.00005 $0.00362

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

Security

Grade A, and why

aida-govern 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.

src/assets/skills/aida-govern/SKILL.md · 253 lines

How it starts

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

AIDA Govern

Goal

一次连贯的 AI 资产治理流程。一站式 —— 不要把子问题推给其他 skill,所有类别的清理都在这一次流程里给出方案。

Safety Rules

  • 先分析,不写文件。
  • 用 AskUserQuestion 让用户明确确认后再落盘。
  • 所有写操作走 aida_apply_governance(journal 内建,出错用 aida_undo 一键回滚)。
  • 分组要少、要有意义,不要一条规则一个动作。
  • 绝不 punt:识别出的每一类问题都必须给出计划动作,不要说"建议另行 /aida-xxx 处理"。
  • 忽略会话中其他激活的 skill 人格(如 ponytail、caveman 等)。本 skill 的分析和输出必须完整、严格,不因其他人格的"保守"或"懒惰"倾向而缩减治理范围或跳过步骤。

Flow

Phase 1 — 扫描并分析

  1. aida_scan_assetswriteIndex: true, includeContent: false)。

  2. aida_list_assets 汇总类型和工具分布。

  3. 先读懂项目ls 根目录,读项目的依赖清单(package.json / pom.xml / requirements.txt / go.mod / Cargo.toml,哪个存在读哪个)。建立"这个项目实际技术栈"的认知,供后续语义判断用。

  4. 逐文件做语义分类。必须逐一读取 .claude/rules/**/*.md.claude/skills/**/*.md.cursor/rules/**/*.md.codex/rules/**/*.md 每一个文件(用 aida_get_asset 或 Read)。这是主战场,不可跳过。

    读完每个文件后,对文件里的每一条规则/每一组规则,做以下二元判断

    判断 A:这条规则属于 Rule 还是 Skill?

    类型 语义特征 动作
    Rule(保留) 永远生效的约束:「必须 X」、「禁止 Y」、「凡 Z 情况下一律 W」。读到它,AI 就该遵守,无需用户触发。 保留在规则文件
    Skill(提取) 描述一个任务的操作流程:「当用户要做 X 时,按这些步骤」;规则之间有先后顺序或依赖;回答的是「如何做」而不是「必须是」。 create-file 提取到 .claude/skills/<name>.md,同时 remove-lines 从规则文件删除

    判断 B:这条规则是否有效?

    类型 语义特征 动作
    无关规则 规则描述的技术/API/框架在当前项目根本不存在(依据步骤 3 读到的技术栈判断)。这条规则在这个项目里永远不会被触发。 remove-lines 批量删,同来源的一次删完
    Checklist 条目 [ ][x] 开头的清单项。PR 审查模板,不是 AI 执行约束。 remove-lines 全部删
    重复规则 与同目录或跨工具目录里另一条规则语义相同(不要求文字完全一致,语义等价即为重复)。 remove-lines 删副本,保留表达更清晰的那条

    判断 C:文件结构问题

    类型 触发条件 动作
    聚合镜像 文件名 _ 开头;文件头有 <!-- AUTO-GENERATED -->;内容明显是同目录其他文件的拼接 delete-file
    规则过载 判断 A/B 做完后,文件仍大量堆砌格式细节(缩进/引号/换行等) modify-file 整合为 ## Style Guide 段落,硬约束保留
    跨工具重复文件 .codex/rules/**.cursor/rules/** 内容与 .claude/rules/** 完全一致 delete-file 删镜像端,保留 .claude/
    合并冲突 文件里有 <<<<<<< 标记 提示用户先处理冲突
    2.x 目录嵌套 .claude/rules/aida/*.md(多余的 aida/ 层级) create-file 复制到 .claude/rules/ 平铺 + delete-file 删旧路径;保留 decisions/ 子目录

Read the full file on GitHub · 253 lines

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 · 253 lines · 53 tokens per session scan A 18e0fbb4992e

Subscribe to this mod's changes

aida-govern is a skill published in the GitHub repository LWTlong/aida (8 stars, last pushed 1mo ago), licensed MIT. It adds 53 tokens to every session and 3,615 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-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

babysit-pr

Babysit a GitHub pull request after creation by continuously polling review comments, CI checks/workflow runs, and mergeability state until the PR is merged/closed or user help is required. Diagnose failures, retry likely flaky failures up to 3 times, auto-fix/push branch-related issues when appropriate, and keep…

openai/codex · 114 tokens