ast-grep Structural Search
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
Review code for refactorability — surface concrete, prioritized refactoring opportunities grounded in Martin Fowler's smell catalog and SOLID, augmented with static analysis tools (gocyclo…
$ npx skills add meain/dotfiles --skill refactorability -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install meain/dotfiles refactorability --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .claude/skills && cp -r skills-src/agents/.agents/skills/refactorability .claude/skills/refactorability && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .claude/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorabilityType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add meain/dotfiles --skill refactorability -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install meain/dotfiles refactorability --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .agents/skills && cp -r skills-src/agents/.agents/skills/refactorability .agents/skills/refactorability && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .agents/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add meain/dotfiles --skill refactorability -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install meain/dotfiles refactorability --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/agents/.agents/skills/refactorability .cursor/skills/refactorability && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .cursor/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/meain/dotfiles.git --path agents/.agents/skills/refactorability--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add meain/dotfiles --skill refactorability -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install meain/dotfiles refactorability --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/agents/.agents/skills/refactorability .gemini/skills/refactorability && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .gemini/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install meain/dotfiles refactorabilityInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add meain/dotfiles --skill refactorability -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .github/skills && cp -r skills-src/agents/.agents/skills/refactorability .github/skills/refactorability && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .github/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add meain/dotfiles --skill refactorability -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install meain/dotfiles refactorability --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/meain/dotfiles.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/agents/.agents/skills/refactorability .opencode/skills/refactorability && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "refactorability" agent skill from https://github.com/meain/dotfiles/tree/master/agents/.agents/skills/refactorability into .opencode/skills/refactorability/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactorability", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
refactorabilityReview code for refactorability — surface concrete, prioritized refactoring opportunities grounded in Martin Fowler's smell catalog and SOLID, augmented with static analysis tools (gocyclo…
Refactorability is an agent skill from meain/dotfiles. Review code for refactorability — surface concrete, prioritized refactoring opportunities grounded in Martin Fowler's smell catalog and SOLID, augmented with static analysis tools (gocyclo, gocognit, dupl, etc.) when available. Go-first, polyglot-aware. Defaults to the current diff. Produces a High/Med/Low report with specific refactoring moves and a "Do NOT refactor" section to prevent over-eager suggestions. Triggers: /refactorability, "review for refactorability", "what should I refactor", "refactorability…
Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/code-smells.md`).
It sits in Development, covering Refactoring, Code review and Static analysis and SAST. The repository describes itself as: If there is a shell, there is a way! The licence is MIT.
6 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit f469fb6. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
gitghrufftscsemgrepFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Refactorability loads about 2k tokens when it runs, and up to ~4.5k if it reads all its reference files. Until then it costs about 158 tokens; SKILL.md has 831 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from meain/dotfiles at commit f469fb6, republished under its MIT licence (© meain). 831 words, ~1,994 tokens.
.claude/skills/refactorability/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.Surface concrete, prioritized refactoring opportunities in code. The goal is not generic "clean code" feedback — it is to point at specific smells, name the refactoring move that fixes them, and rank by impact so the user knows what to actually touch.
The review is opinionated about restraint: it must call out cases where refactoring would be premature, speculative, or net-negative.
In order of preference:
jj repo: jj diff --name-only -r @ (fallback to jj diff --name-only)git repo: git diff --name-only HEAD (plus --cached if there's nothing unstaged)gh pr diff if a PR is being reviewedPrint the resolved scope before continuing so the user can correct it.
Look at file extensions in scope. For each language present, check which of the tools
below are on PATH and run them only on files in scope (not the whole repo).
| Tool | Invocation (per file or dir) | What it gives you |
|---|---|---|
gocyclo | gocyclo -over 15 <files> | Cyclomatic complexity > 15 |
gocognit | gocognit -over 15 <files> | Cognitive complexity > 15 |
dupl | dupl -threshold 50 <dirs> | Duplicated token sequences |
revive | revive -formatter friendly <files> | Style + some smell rules |
golangci-lint | golangci-lint run --no-config --disable-all --enable=gocyclo,gocognit,dupl,gocritic,revive <pkg> | Aggregated, if standalone tools are missing |
Also do a quick grep/AST scan for: functions > ~80 lines, > 5 params, deep nesting
(> 3 levels), interface{}/any over-use, and large switch/if ladders on type.
ruff check, radon cc -s -a <files>, radon mi <files>, vulture <files>, pylint --disable=all --enable=R <files> for refactor-class warnings.
eslint with eslint-plugin-sonarjs if configured, jscpd <dirs> for duplication,
tsc --noEmit for type smells.
semgrep --config=p/code-smells if installed; otherwise lean on LLM reading.
If no tools are available, proceed with LLM-only reading and say so in the report (so the user knows the quantitative pass was skipped).
Read the code in scope and map findings to the Fowler smell catalog + SOLID. Use
references/code-smells.md as the authoritative list. Do
not invent smell names — pick from the catalog. For each finding, pick a concrete
refactoring move from the same catalog (e.g. "Extract Method", "Replace Conditional with
Polymorphism", "Introduce Parameter Object").
Assign each finding a severity:
If a finding could be either, prefer the lower severity. The bar for High is "the next person changing this will get hurt."
Before writing the report, explicitly identify code that could look refactorable but should be left alone for this review. Put these in a dedicated section (see below). Common cases:
Use the output format below. Keep it terse and scannable — bullets, tables, file:line references. No motivational filler.
# Refactorability Review
**Scope:** <files / diff / package being reviewed>
**Tools run:** gocyclo, gocognit, dupl (or: "none — LLM-only pass")
**Overall:** <one sentence. e.g. "Two High-severity hotspots in user-management/handlers,
the rest is healthy.">
## High
### 1. <Smell name from catalog> — `path/to/file.go:123`
- **What:** <1 sentence describing the smell concretely>
- **Signal:** <metric or quote, e.g. "gocyclo=24, 142 LOC, 6 params">
- **Why it matters:** <1–2 sentences on change/test/understand cost>
- **Move:** <Refactoring name from catalog> — <1–2 sentence sketch>
- **Effort / Risk:** S/M/L — <1 short note on risk>
### 2. ...
## Medium
### 1. ...
## Low
### 1. ...
## Do NOT refactor
- `path/to/file.go:45` — Looks like primitive obsession, but it's a single call site behind
a stable API. Wait until a second caller appears.
- `path/to/gen_pb.go` — Generated.
- ...
## Notes (optional)
Anything the user should know but isn't a finding (e.g. "gocognit not installed, skipped
cognitive complexity pass").references/code-smells.md. If you want to flag something not in the catalog, call it a
"Note" instead of a finding.gocyclo=24), a count (6 parameters), or 2–4 lines of code.
Without a signal it's just opinion.gocyclo not installed), note it in "Notes" — do not
silently skip.references/code-smells.md — Fowler smell catalog + refactoring moves,
used as the authoritative vocabulary for findings.© meain, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 1 other file (references) in agents/.agents/skills/refactorability of meain/dotfiles.
Open the folder on GitHubat commit f469fb6
Refactorability next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Refactorability this skillmeain/dotfiles | 285 | — | ~2k | Automated safety check: Pass | MIT | |
| ast-grep Structural Searchcode-yeongyu/oh-my-openagent | 70k | — | ~3.3k | Automated safety check: Pass | MIT | |
| Dignified Python Standardsdocling-project/docling | 68k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Clean Code GuardamElnagdy/guard-skills | 1.3k | 2 repos | ~4.3k | Automated safety check: Pass | MIT | |
| Maintainable Code for iPolloWorkDevin-AXIS/iPolloWork | 6.7k | — | ~2.7k | Automated safety check: Pass | Custom licence | |
| Cyclomatic Complexitysaurabhkumar8112/cyclomatic-complexity-skill | 405 | — | ~761 | Automated safety check: Pass | Apache-2.0 |
code-yeongyu/oh-my-openagent
Searches and rewrites code by syntax-tree shape across 25 languages with ast-grep, for codemods, structural queries and YAML lint rules, using a Python wrapper script.
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
amElnagdy/guard-skills
Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.
Devin-AXIS/iPolloWork
A code-change gate for the iPolloWork repository: search and reuse first, keep one source of truth, justify every new file or dependency, and audit the change.
saurabhkumar8112/cyclomatic-complexity-skill
Refactor code to reduce cyclomatic complexity so it stays readable, maintainable, and aligned with the long-term vision of the codebase, not just optimized for AI comprehension.
handsontable/handsontable
Queries a pre-built, Tree-sitter-based code graph of the whole monorepo instead of grepping call chains, for exploring, debugging, refactoring or reviewing code.
meain/dotfiles
Search past Claude Code and Codex sessions. An agent skill from meain/dotfiles.
meain/dotfiles
Grilling session that challenges your plan against the existing domain model, sharpens terminology, and updates documentation (CONTEXT.md, ADRs) inline as decisions crystallise.
meain/dotfiles
Daily backlog management — full planning review OR add a single entry from a URL.
meain/dotfiles
Generate an interactive local HTML review page for a large PR or diff, grouping the changed files by logical concern (not just by file) so a reviewer can go through one theme at a time instead of a…
meain/dotfiles
Generate a concise weekly status update in team format. An agent skill from meain/dotfiles.
meain/dotfiles
Search the web using lynx and DuckDuckGo. An agent skill from meain/dotfiles.
Categories
Review code for refactorability — surface concrete, prioritized refactoring opportunities grounded in Martin Fowler's smell catalog and SOLID, augmented with static analysis tools (gocyclo…. Refactorability is an agent skill from meain/dotfiles.) when available.
Refactorability fits situations like: tasks that involve Refactoring; tasks that involve Code review; tasks that involve Static analysis and SAST.
Run `npx skills add meain/dotfiles --skill refactorability -a claude-code`. Or copy the skill folder (agents/.agents/skills/refactorability in meain/dotfiles) into .claude/skills/refactorability in your project. Claude Code loads it when a task matches its description.
Run `npx skills add meain/dotfiles --skill refactorability -a codex`. Or copy the skill folder (agents/.agents/skills/refactorability in meain/dotfiles) into .agents/skills/refactorability in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add meain/dotfiles --skill refactorability -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactorability, .gemini/skills/refactorability, .github/skills/refactorability and .opencode/skills/refactorability in your project.
Going by SKILL.md and its folder, Refactorability needs the command-line tools its instructions call (git, gh, ruff, tsc and semgrep). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Refactorability is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.5k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Refactorability: ast-grep Structural Search (code-yeongyu/oh-my-openagent, 70k stars), Dignified Python Standards (docling-project/docling, 68k stars), Clean Code Guard (amElnagdy/guard-skills, 1.3k stars) and Maintainable Code for iPolloWork (Devin-AXIS/iPolloWork, 6.7k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
meain (a GitHub user) maintains it in meain/dotfiles, which has 285 GitHub stars. The repository holds 36 skills in this directory. The repository was last updated on September 5, 2026.
Source: meain/dotfiles on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.