codealmanac: Skill for Codex

.agents/skills/deep-refactor-audit/SKILL.md

deep-refactor-audit is a skill for Codex from AlmanacCode/codealmanac. It costs 61 tokens per session (2,803 once invoked), scanned A, original, Apache-2.0.

A no-code review of a software project’s architecture, structure, dependencies, and accumulated complexity. It questions whether existing features, abstractions, and compatibility paths still need to exist.

In plain words
What is it for?
Auditing major refactors, investigating code smells, reviewing project boundaries, and deciding what to preserve, simplify, remove, or redesign.
Why use it?
Large or AI-generated codebases can grow around accidental designs and unnecessary layers, making future changes harder and riskier.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: mentions subagents; installed under .agents/ (shared by several agents).

This is AlmanacCode/codealmanac's own configuration. It tells Codex how to work on codealmanac itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codealmanac configures →

Reuse

Borrowing it

Nothing to install: this file belongs to AlmanacCode/codealmanac. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/AlmanacCode/codealmanac/main/.agents/skills/deep-refactor-audit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/AlmanacCode/codealmanac

Made for: 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 deep-refactor-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/almanaccode/codealmanac/deep-refactor-audit/github.svg)](https://agentmods.dev/skills/almanaccode/codealmanac/deep-refactor-audit)
Your own site
<a href="https://agentmods.dev/skills/almanaccode/codealmanac/deep-refactor-audit"><img src="https://agentmods.dev/badge/skills/almanaccode/codealmanac/deep-refactor-audit/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 deep-refactor-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/almanaccode/codealmanac/deep-refactor-audit"><img src="https://agentmods.dev/badge/skills/almanaccode/codealmanac/deep-refactor-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 61 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,803 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00061 $0.02803
Opus 5.5 $0.00024 $0.01121
Sonnet 5.5 $0.00012 $0.00561
Haiku 4.5 $0.00006 $0.00280

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

Security

Grade A, and why

deep-refactor-audit 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 2mo 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.

.agents/skills/deep-refactor-audit/SKILL.md · 390 lines

How it starts

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

Deep Refactor Audit

Overview

This is a no-code architecture audit for aggressively rethinking a codebase. The job is to ask why the codebase is shaped this way, whether that shape still deserves to exist, and what a strong principal engineer would change before allowing the system to keep growing.

AI-generated code often accumulates accidental architecture: features nobody asked to keep, abstractions created for one use case, hand-rolled versions of standard libraries, over-flexible configuration, compatibility paths with no owner, and names that hide what the code actually does. Treat those as suspect until they earn their place.

Core Stance

Because this audit does not modify production code, take intellectual risks. Be creative, skeptical, and specific. Question architecture, naming, feature value, user behavior, dependencies, and whether whole subsystems should exist.

Do not be polite at the expense of usefulness. The valuable output is not "some code smells exist." The valuable output is a clear opinion about what should be preserved, simplified, deleted, or redesigned.

Audit Boundary

Do not edit implementation files during this audit. You may create notes, diagrams, reports, and plans under docs/.

This restriction is not meant to make the audit timid. It exists so the diagnosis can be bolder than an implementation task.

Start By Setting A Goal

Before the deep dive, set an explicit audit goal. If the environment has a goal mechanism, use it. Otherwise write the goal at the top of the audit worklog.

Use this shape:

Goal:
Critically audit <scope> to determine which architecture, features, boundaries, names, abstractions, dependencies, and workflows should be preserved, simplified, removed, or redesigned.

Core questions:
- Why does this exist?
- Is it still needed?
- Is this the simplest shape that can support the product?
- Did this complexity come from real constraints or accidental accumulation?
- Is this hand-rolled code justified, or should it use a standard library/framework capability?
- What would the architecture look like if we designed it cleanly today?

Non-goals:
- Do not modify production code.
- Do not produce a shallow smell list.
- Do not assume the current architecture is justified.
- Do not recommend patterns without explaining concrete movement in the codebase.

Success criteria:
- Current architecture is mapped.
- Major boundaries are judged.
- Questionable features are called out.
- Hand-rolled machinery is compared against existing libraries or framework capabilities.
- Accidental complexity is separated from legitimate complexity.
- Prior art, named patterns, and mature repositories are researched where useful.
- A target architecture and refactor roadmap are written.

Read the full file on GitHub · 390 lines

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. 2mo ago First seen · 390 lines · 61 tokens per session scan A c9183011049a

Subscribe to this mod's changes

deep-refactor-audit is a skill published in the GitHub repository AlmanacCode/codealmanac (994 stars, last pushed 3mo ago), licensed Apache-2.0. It adds 61 tokens to every session and 2,803 once invoked, about $0.0002 per session on Opus 5.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-30.

Related

Other skills, from other repositories

brain-ingest

The process for digesting a conversation, document, or research result, classifying it, and writing it down as brain content (a root-page update or a new/updated page) through the brain CLI.

mindmuxai/brain.md · 48 tokens

gate-control

Canonical VideoStudio review authorization and state-transition policy. Use after any Gate B/C/Preview/D decision, post-gate revision, resumed approval, or exhausted visual-QA result across COMPOSE/AUTO/GENERATE/EDIT; maps explicit user authority and durable artifact state to one next action with ovs gate transition.…

Orkas-AI/Orkas-VideoStudio · 81 tokens

stage-edit

Intelligent editing of real user-supplied footage—understand it with transcript/inspected-frame/scene/silence/quality evidence, then choose deterministic timeline operations or a constrained semantic AI edit. Trigger for repurpose, montage, cleanup, localization, narration, or local content changes.

Orkas-AI/Orkas-VideoStudio · 62 tokens

orchestration

The master program for producing or editing a video end to end — read this at the START of any video task (after video-router), then follow the gates and the per-line steps. Trigger for "make / edit / cut / caption / dub / animate a video"; it sequences the compose / generate / edit lines and the approval gates. Do…

Orkas-AI/Orkas-VideoStudio · 99 tokens

stage-assemble

Deterministically assemble an approved cross-modal EDL (plan.json) into a finished video — produce each segment (edit/compose/generate/provided, delegated to its line), then assemble in ffmpeg tiers: concat primaries → overlay composed layers → mix narration once (coverage check) → burn captions → verify loudness…

Orkas-AI/Orkas-VideoStudio · 0 tokens

research

Use when the user asks you to research, compare, fact-check or find current information, and the answer should come with sources.

katipally/openlive · 28 tokens