Fantasia Two Level Architecture
vishiri/fantasia-archive
Migrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g.
Pick one large function flagged by ESLint max-lines-per-function and refactor it into smaller, focused helpers without breaking tests.
$ npx skills add rajbos/ai-engineering-fluency --skill refactor-large-function -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rajbos/ai-engineering-fluency refactor-large-function --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/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/refactor-large-function .claude/skills/refactor-large-function && 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 "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .claude/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-functionType 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 rajbos/ai-engineering-fluency --skill refactor-large-function -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rajbos/ai-engineering-fluency refactor-large-function --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/refactor-large-function .agents/skills/refactor-large-function && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .agents/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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 rajbos/ai-engineering-fluency --skill refactor-large-function -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rajbos/ai-engineering-fluency refactor-large-function --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/refactor-large-function .cursor/skills/refactor-large-function && 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 "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .cursor/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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/rajbos/ai-engineering-fluency.git --path .claude/skills/refactor-large-function--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 rajbos/ai-engineering-fluency --skill refactor-large-function -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rajbos/ai-engineering-fluency refactor-large-function --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/refactor-large-function .gemini/skills/refactor-large-function && 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 "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .gemini/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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 rajbos/ai-engineering-fluency refactor-large-functionInstalls 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 rajbos/ai-engineering-fluency --skill refactor-large-function -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/refactor-large-function .github/skills/refactor-large-function && 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 "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .github/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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 rajbos/ai-engineering-fluency --skill refactor-large-function -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rajbos/ai-engineering-fluency refactor-large-function --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rajbos/ai-engineering-fluency.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/refactor-large-function .opencode/skills/refactor-large-function && 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 "refactor-large-function" agent skill from https://github.com/rajbos/ai-engineering-fluency/tree/main/.claude/skills/refactor-large-function into .opencode/skills/refactor-large-function/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "refactor-large-function", 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.
refactor-large-functionPick one large function flagged by ESLint max-lines-per-function and refactor it into smaller, focused helpers without breaking tests.
Refactor Large Function is an agent skill from rajbos/ai-engineering-fluency. Pick one large function flagged by ESLint max-lines-per-function and refactor it into smaller, focused helpers without breaking tests.
Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Refactoring and Linting and formatting. It works with ESLint. The repository describes itself as: Extension that shows information about the estimated token usage and more of AI in editors/CLI's. The licence is MIT.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 6933e2a. 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:
eslintnpmnodeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, 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.
Refactor Large Function loads about 1.3k tokens when it runs. Until then it costs about 40 tokens; SKILL.md has 605 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 rajbos/ai-engineering-fluency at commit 6933e2a, republished under its MIT licence (© rajbos). 605 words, ~1,312 tokens.
.claude/skills/refactor-large-function/SKILL.md (or your agent's skills folder).An ESLint complexity or max-lines-per-function rule is producing warnings for functions that are too long. Pick one of those functions (not from extension.ts, which is intentionally monolithic) and refactor it into smaller, focused private helpers.
Run ESLint with the complexity rules to get the current list of violations:
cd vscode-extension && node_modules/.bin/eslint src --rule '{"max-lines-per-function": ["warn", 80]}' --format stylish 2>&1 | grep "Lines/Fn\|max-lines-per-function" | head -20Or, if the project already has the rule configured, just run:
cd vscode-extension && node_modules/.bin/eslint src 2>&1 | grep "max-lines-per-function\|Lines/Fn" | head -20Choose one function to refactor, following these priorities:
src/extension.ts - it is intentionally large and hard to test in isolation.test/unit/ for a matching test file).Before touching any code, read the relevant sub-project instructions file. For vscode-extension/ work, read .github/instructions/vscode-extension.instructions.md.
Read the full function body and identify natural decomposition boundaries:
null on cancellation.Introduce small result interfaces or types at the top of the file (not exported) to carry data between steps cleanly, rather than long parameter lists.
Before changing anything, compile and run the existing unit tests to establish a green baseline:
cd vscode-extension
node_modules/.bin/tsc.cmd --noEmit # type-check
npm run test:node # unit testsRecord which tests cover the target file so you know what to watch.
Apply the extraction. Rules:
_ prefix to signal they are internal helpers.null (not undefined) from a helper to signal user cancellation or an unrecoverable error; the caller does an early if (!result) { return; } guard.cd vscode-extension && node_modules/.bin/eslint src/path/to/changed-file.tsAll new warnings introduced by your changes must be resolved before proceeding. Pre-existing warnings on other functions in the same file are acceptable - do not fix unrelated code.
cd vscode-extension
node_modules/.bin/tsc.cmd --noEmit # type-check
npm run test:node # unit tests
node esbuild.js --production # production bundleAll tests must pass and the build must succeed. If a test fails, fix the refactoring - do not modify the tests unless the test itself was wrong before your change.
Write a commit in this format:
refactor: extract <FunctionName> into focused private methods
<One or two sentences describing which logical sections were extracted
and why the split makes sense.>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>Open a pull request to main. The PR description should:
tsc or unit tests fail after your change, revert and choose a different decomposition strategy rather than patching around the failure.© rajbos, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/refactor-large-function of rajbos/ai-engineering-fluency.
Open the folder on GitHubat commit 6933e2a
Refactor Large Function 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 |
|---|---|---|---|---|---|---|
| Refactor Large Function this skillrajbos/ai-engineering-fluency | 115 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Fantasia Two Level Architecturevishiri/fantasia-archive | 409 | — | ~983 | Automated safety check: Pass | GPL-3.0 | |
| Sonarjsmanagedcode/dotnet-skills | 486 | — | ~1.6k | Automated safety check: Pass | MIT | |
| Same Results Less Codepproenca/dot-skills | 214 | — | ~3k | Automated safety check: Pass | MIT | |
| Rust Best Practicesfarm-fe/farm | 5.6k | 3 repos | ~1.1k | Automated safety check: Pass | MIT | |
| LobeHub Alint Rule Set Maintenancelobehub/lobehub | 83k | — | ~1.9k | Automated safety check: Pass | Custom licence |
vishiri/fantasia-archive
Migrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g.
managedcode/dotnet-skills
Use SonarJS-derived rules in .NET repositories that ship JavaScript or TypeScript frontends and need deeper bug-risk, code-smell, or cognitive-complexity checks than a minimal ESLint baseline.
pproenca/dot-skills
Same behaviour in fewer, clearer lines — covers the judgment gaps that linters cannot catch (reinvention, wrong frame, hidden duplication, derived state, procedural rebuilds, speculative generality…
farm-fe/farm
Guide for writing idiomatic Rust code based on Apollo GraphQL's best practices handbook.
lobehub/lobehub
Maintains LobeHub's model-backed alint rule set: writing rules, removing false positives against real code, deciding warn versus error and tracking token cost.
agustinusnathaniel/nextarter-tailwind
Ultracite is a zero-config linting and formatting preset for JavaScript/TypeScript projects.
rajbos/ai-engineering-fluency
Find all hardcoded URLs in TypeScript source files and verify they resolve (return HTTP 2xx/3xx).
rajbos/ai-engineering-fluency
Create a well-scoped GitHub issue in this repo. An agent skill from rajbos/ai-engineering-fluency.
rajbos/ai-engineering-fluency
Detect copy-pasted code blocks across the shared source (vscode-extension/src, the repo-root src/, cli/src) with the dependency-free check-code-duplication.js detector, then pick one duplicate group…
rajbos/ai-engineering-fluency
Analyze coverage of the vscode-extension's tool-family definitions (DEFAULTTOOLFAMILIES in vscode-extension/src/toolFamilies.ts) against the canonical tool-name list in src/toolNames.json and/or a…
rajbos/ai-engineering-fluency
Load and display the last 10 cache entries as raw JSON output.
rajbos/ai-engineering-fluency
Assess the risk of a changeset (a PR, a branch, or the working tree) and classify it as low, medium, or high with a written rationale.
Works with
Categories
Pick one large function flagged by ESLint max-lines-per-function and refactor it into smaller, focused helpers without breaking tests. Refactor Large Function is an agent skill from rajbos/ai-engineering-fluency. Pick one large function flagged by ESLint max-lines-per-function and refactor it into smaller, focused helpers without breaking tests.
Refactor Large Function fits situations like: tasks that involve Refactoring; tasks that involve Linting and formatting.
Run `npx skills add rajbos/ai-engineering-fluency --skill refactor-large-function -a claude-code`. Or copy the skill folder (.claude/skills/refactor-large-function in rajbos/ai-engineering-fluency) into .claude/skills/refactor-large-function in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rajbos/ai-engineering-fluency --skill refactor-large-function -a codex`. Or copy the skill folder (.claude/skills/refactor-large-function in rajbos/ai-engineering-fluency) into .agents/skills/refactor-large-function 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 rajbos/ai-engineering-fluency --skill refactor-large-function -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/refactor-large-function, .gemini/skills/refactor-large-function, .github/skills/refactor-large-function and .opencode/skills/refactor-large-function in your project.
Going by SKILL.md and its folder, Refactor Large Function needs the command-line tools its instructions call (eslint, npm and node).
SKILL.md contains no URLs. Its commands use npm, 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.
Refactor Large Function is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Refactor Large Function: Fantasia Two Level Architecture (vishiri/fantasia-archive, 409 stars), Sonarjs (managedcode/dotnet-skills, 486 stars), Same Results Less Code (pproenca/dot-skills, 214 stars) and Rust Best Practices (farm-fe/farm, 5.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rajbos (a GitHub user) maintains it in rajbos/ai-engineering-fluency, which has 115 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 6, 2026.
Source: rajbos/ai-engineering-fluency on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.