Skip to content
Back to skills

Ubench Convert

ASecurity

Evaluates a whole existing codebase and converts it to a sound architecture - measures the code as it is, names the core issues by root cause, picks a style mix from a catalog of 32 patterns, writes a before and after with a checked boundary table, explicit state machines and a slop kill list, then hands to ubench-plan and ubench-build with the user's approval at every phase. Use when the user wants to restructure, re-architect, modernise, untangle or shrink an existing codebase, or types /ub...

  • 5 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 3, 2026
developmentpythongogitsecurity

Works with

  • cli

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned December 3, 2026

npx -y skills add uditgoenka/ubench --skill ubench-convert --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Ubench Convert?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Ubench Convert
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/uditgoenka-ubench-convert/badge)](https://www.skillsdirectory.com/skills/uditgoenka-ubench-convert)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: ubench-convert
description: Evaluates a whole existing codebase and converts it to a sound architecture - measures the code as it is, names the core issues by root cause, picks a style mix from a catalog of 32 patterns, writes a before and after with a checked boundary table, explicit state machines and a slop kill list, then hands to ubench-plan and ubench-build with the user's approval at every phase. Use when the user wants to restructure, re-architect, modernise, untangle or shrink an existing codebase, or types /ubench-convert.
---

# ubench-convert

Convert a whole codebase to a sound structure, with the code that exists. Same language, same behaviour, less code. This skill writes no product code: it evaluates, then hands to `ubench-plan` and `ubench-build`. `$S` below is this skill's `scripts` folder.

## Rules for the whole run

- **Measured, not felt.** Every before and after number comes from a command, run the same way both times.
- **Root cause first.** A core issue names its cause with `file:line` evidence, not its symptom.
- **Behaviour is pinned before a move.** No code moves, merges or goes until a test of today's behaviour is green.
- **Less code, same language.** Aim to remove up to 50% of the lines. It is a measured report, never a bar: nothing is deleted to hit a number.
- **Approval per phase.** Stop at the end of each phase. One yes covers one phase.
- **Plain reports.** Every explanation printed to the user follows [report.md](references/report.md): Simplified Technical English, bottom line first, SBAR for a handover. Plan files, code and your own reasoning are exempt.
- **Lean.** Open a reference when its step starts. Shared rules: [field-lessons.md](references/field-lessons.md), [formal-checks.md](references/formal-checks.md).

## Phase 1: Evaluate

First run `python3 $S/star.py check`. If it prints something, show it to the user once. Run `python3 $S/star.py yes` only after their yes; after a no, or after showing the link, run `python3 $S/star.py asked`.

1. **Start.** `python3 $S/climb.py list` first: an open convert climb is resumed. Else `python3 $S/tracker.py new plan SLUG` makes the numbered folder. All files of this phase go in `FOLDER/architecture-redesign/`. Add one `Tasks.md` row per step below.
2. **Scope and score.** Write `00-scope.md`: the root, what is out of scope, and the exact measure commands. The user confirms it. Commit, then `python3 $S/climb.py init convert-SLUG --goal "..." --check "python3 $S/gates.py redesign FOLDER/architecture-redesign" --score "redesign problems: (\d+)" --lock FOLDER/architecture-redesign/00-scope.md`. The scope is now locked, so before and after are measured the same way. After each step: `python3 $S/climb.py try convert-SLUG "what you wrote"`. Commands in [score-keeper.md](references/score-keeper.md).
3. **Depth pass.** Answer the four questions in [deep-thinking.md](references/deep-thinking.md). Deeper, not bigger.
4. **Inventory.** Map the whole codebase per [evaluate.md](references/evaluate.md): code skeleton, import graph, files that change together, every stateful thing, every outside system. Measure it: lines per area, `python3 $S/scan.py shape ROOT`, `python3 $S/scan.py security ROOT`. Write `01-inventory.md`.
5. **Core issues.** Trace each pain back to its root cause with the method in [evaluate.md](references/evaluate.md). Look for the one fix behind many problems. Find every implicit state machine and every raw write per [state-machines.md](references/state-machines.md). Write `02-core-issues.md`.
6. **Patterns.** Name the forces, then score the catalog in [patterns.md](references/patterns.md) with [architecture.md](references/architecture.md). Choose the simplest mix that carries the forces. Write `03-patterns.md`: each pattern chosen or rejected, with the reason.
7. **Before and after.** Write `04-before-after.md` per [redesign-files.md](references/redesign-files.md): the structure today, the target `## Layers` table, one owner function per stateful thing. Run `python3 $S/arch.py check 04-before-after.md ROOT`: its count is the baseline the build must bring to 0.
8. **Kill list and roadmap.** Write `05-kill-list.md` (dead code, copies, special cases, tests that cannot fail, suppressions, comments) and `06-roadmap.md` (areas in order, the pin for each, the size target).
9. **Show and ask.** `python3 $S/climb.py status convert-SLUG` must print `PROVEN`: quote it. Explain the findings per [report.md](references/report.md). Ask: "Go to phase 2, the plan?" Stop until the user says yes.

## Phase 2: Plan

1. **Check the skills.** If `ubench-plan` or `ubench-build` is not installed beside this skill, ask the user to install them from https://github.com/uditgoenka/ubench (`git clone`, then `./install.sh`). Do not go on without them.
2. Run `ubench-plan` with the folder path. It reads `architecture-redesign/` as its scout input and writes the plan files in the same folder. The target table becomes `04-architecture.md`. Each roadmap area becomes one build row, with its pin first.
3. `python3 $S/climb.py status plan-SLUG` must print `PROVEN`: quote it. Explain the plan per [report.md](references/report.md). Ask for approval of phase 3.

## Phase 3: Build

1. Run `ubench-build` on the folder, one roadmap area at a time. Each area: pin, move behind its owner, delete what the kill list names, clean.
2. After each area, run the phase 1 commands again and add a row to `04-before-after.md`: boundary problems, shape problems, lines. Quote `python3 $S/climb.py status` of the build climb.
3. Explain each area per [report.md](references/report.md) and ask before the next one.
4. **Done** when boundary problems read 0, every machine has one owner function, the kill list is empty or each item left has a written reason, and the full test suite is green. Report the measured size change against the 50% aim, whatever it is.

Files in this skill

  • SKILL.md5.8 KB
  • agents/openai.yaml197 B
  • references/architecture.md5.3 KB
  • references/deep-thinking.md2.8 KB
  • references/evaluate.md3.2 KB
  • references/field-lessons.md6.2 KB
  • references/formal-checks.md5.4 KB
  • references/patterns.md4.3 KB
  • references/redesign-files.md3 KB
  • references/report.md1.4 KB
  • references/score-keeper.md3.6 KB
  • references/state-machines.md4.2 KB
  • scripts/arch.py7.7 KB
  • scripts/climb.py17.9 KB
  • scripts/gates.py10.7 KB
  • scripts/hook.py5.7 KB
  • scripts/machine.py6.1 KB
  • scripts/scan.py24.1 KB
  • scripts/star.py3.6 KB
  • scripts/tracker.py9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.