self-align

self-align is a skill for Claude Code, Codex from kagan-sh/kagan. It costs 84 tokens per session (1,551 once invoked), scanned A, original, MIT.

A read-only review process for checking a code repository from four angles: code quality, security, compliance with its written specification, and documentation freshness.

In plain words
What is it for?
Use it when explicitly auditing or health-checking a repository, including its source code, tests, scripts, specifications, README files, and AGENTS.md instructions.
Why use it?
It helps find unnecessary code, unsafe input handling, differences between the code and the specification, and outdated project instructions before the developer acts on them.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/kagan-sh/kagan/self-align
Any agent
npx skills add kagan-sh/kagan --skill self-align
Clone the repo
git clone --depth 1 https://github.com/kagan-sh/kagan

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 self-align

README.md
[![agentmods](https://agentmods.dev/badge/skills/kagan-sh/kagan/self-align.svg)](https://agentmods.dev/skills/kagan-sh/kagan/self-align)
Your own site
<a href="https://agentmods.dev/skills/kagan-sh/kagan/self-align"><img src="https://agentmods.dev/badge/skills/kagan-sh/kagan/self-align.svg" alt="Measured on agentmods" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,551 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00084 $0.01551
Opus 5 $0.00042 $0.00776
Sonnet 5 $0.00017 $0.00310
Haiku 4.5 $0.00008 $0.00155

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

Security

Grade A, and why

self-align 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 5d 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.

.claude/skills/self-align/SKILL.md · 137 lines

How it starts

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

Self-Align Audit

Audit this repo through four adversarial lenses, then self-assess every finding before reporting. Written for any agent (Claude Code, OpenCode, Codex): tool names below are capabilities, not specific tools — map them to your environment.

Lenses

Lens Criteria file Targets
quality lens-quality.md src/, test/, scripts/ — quality, YAGNI, idioms
security lens-security.md src/, scripts/ — input→sink paths, destructive ops
spec lens-spec.md .specs/ vs src/ behavior
docs lens-docs.md README.md, docs/, CONTRIBUTING.md, AGENTS.md

Do not load the criteria files yourself — each lens agent reads its own. Load one only in the sequential fallback, one at a time.

Ground rules (all phases, all agents)

  • Never read references/ (vendored, out of scope), node_modules/, dist/, .plans/, or bun.lock.
  • Never run linters, type checks, or tests — bun run verify owns those; re-deriving them wastes tokens.
  • Read-only audit: no writes, no network, no state-changing commands.
  • Every finding must cite evidence actually read, not assumed.

Each invocation is fresh: re-read the repo state and discard findings, verdicts, and reports from any earlier run in this session — the code may have changed since.

Phase 1: Scope

Arguments (text after the skill name, e.g. /self-align security docs) name the lenses to run. Empty or unrecognized → run all four. Done when the active lens list is fixed.

Phase 2: Dispatch lens agents

Launch one subagent per active lens, all in parallel (Claude Code: Agent tool calls in a single message; OpenCode: task tool). Each agent's prompt is this template with {LENS} and {LENS_FILE} filled in:

Read the full file on GitHub · 137 lines

Files

What ships with it

4 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. 5d ago First seen · 137 lines · 84 tokens per session scan A 2e89dbc11c4a

Subscribe to this mod's changes

self-align is a skill published in the GitHub repository kagan-sh/kagan (10 stars, last pushed 1mo ago), licensed MIT. It adds 84 tokens to every session and 1,551 once invoked, about $0.0004 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

collattice

Operate a Collattice kanban board through its Model Context Protocol (MCP) endpoint — connecting, authentication, the board model, identifier rules (board-level reads need a board GUID, not a slug), the Markdown a board renders, and the full tool reference: reading and creating cards, moving and reordering lanes…

MrBildo/collattice · 111 tokens

trello-cli

Trello board, list and card management via CLI. Activate when user mentions "Trello" - examples: "Show my Trello tasks", "Add card to Trello", "Move on Trello", "Trello board", "List Trello", "Trello cards".

ZenoxZX/trello-cli · 61 tokens

sanban

Simple kanban that just works. JSON-backed boards with REST API + MCP server.

aancw/sanban · 20 tokens

aspire

Orchestrates Aspire distributed applications using the Aspire CLI for running, debugging, and managing distributed apps. USE FOR: aspire start, aspire stop, start aspire app, aspire describe, list aspire integrations, debug aspire issues, view aspire logs, add aspire resource, aspire dashboard, update aspire apphost.…

MrBildo/collattice · 150 tokens

coss

Helps implement coss UI components correctly. Use when building UIs with coss primitives (buttons, dialogs, selects, forms, menus, tabs, inputs, toasts, etc.), migrating from shadcn/Radix to coss/Base UI, composing trigger-based overlays, or troubleshooting coss component behavior. Covers imports, accessibility…

usekaneo/kaneo · 80 tokens

kanban-board

To do / In progress / In review / Done 四列, 卡片 + 头像 + 泳道.

nexu-io/html-anything · 26 tokens