Refactor Large Function
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.
Migrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g.
$ npx skills add vishiri/fantasia-archive --skill fantasia-two-level-architecture -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install vishiri/fantasia-archive fantasia-two-level-architecture --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/vishiri/fantasia-archive.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .claude/skills/fantasia-two-level-architecture && 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 "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .claude/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architectureType 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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install vishiri/fantasia-archive fantasia-two-level-architecture --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .agents/skills/fantasia-two-level-architecture && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .agents/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install vishiri/fantasia-archive fantasia-two-level-architecture --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .cursor/skills/fantasia-two-level-architecture && 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 "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .cursor/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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/vishiri/fantasia-archive.git --path .cursor/skills/fantasia-two-level-architecture--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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install vishiri/fantasia-archive fantasia-two-level-architecture --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .gemini/skills/fantasia-two-level-architecture && 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 "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .gemini/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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 vishiri/fantasia-archive fantasia-two-level-architectureInstalls 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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .github/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .github/skills/fantasia-two-level-architecture && 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 "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .github/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install vishiri/fantasia-archive fantasia-two-level-architecture --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/vishiri/fantasia-archive.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.cursor/skills/fantasia-two-level-architecture .opencode/skills/fantasia-two-level-architecture && 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 "fantasia-two-level-architecture" agent skill from https://github.com/vishiri/fantasia-archive/tree/master/.cursor/skills/fantasia-two-level-architecture into .opencode/skills/fantasia-two-level-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "fantasia-two-level-architecture", 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.
fantasia-two-level-architectureMigrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g.
Fantasia Two Level Architecture is an agent skill from vishiri/fantasia-archive. Migrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g. dialogFoomanager.ts), thin Vue SFCs. Use when refactoring features, fixing fa-two-level ESLint violations, or adding new UI.
Its SKILL.md is about 980 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 Linting and formatting and Refactoring. It works with Vue.js and ESLint. The repository describes itself as: A world-builder's best friend! The licence is GPL-3.0.
6 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit 26d4648. 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:
yarnFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use yarn, 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.
Fantasia Two Level Architecture loads about 983 tokens when it runs. Until then it costs about 76 tokens; SKILL.md has 299 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 vishiri/fantasia-archive at commit 26d4648, republished under its GPL-3.0 licence (© vishiri). 299 words, ~983 tokens.
.claude/skills/fantasia-two-level-architecture/SKILL.md (or your agent's skills folder).scripts/functions/ — pure logic; import type from app/types/** only; inject deps from managerscripts/<feature>_manager.ts — wiring only; create… factories; no top-level functions/classes (fa-two-level/manager-wiring-only).vue: props, child imports, one use… from managerscripts/*.ts beside functions/_tests; add functions/_testsyarn testbatch:verify before commit| Message | Fix |
|---|---|
| functions/ value imports | Move to *_manager.ts, pass as arg |
| Legacy script beside functions/ | Merge into functions/ + manager or delete |
| Vue script import allowlist | Expose via manager return |
| Import functions/ only from manager | Manager (tests excepted) |
| Re-export shim | Delete; import real manager/functions |
| manager-wiring-only | Bodies in functions/ or *Wiring.ts |
| manager-wiring-only (class) | Class in non-manager sibling |
| manager-wiring-only (arrow const) | Factory arg object or *Wiring.ts |
| functions-only-type-imports | Keep orchestration in scripts/ sibling — not functions/ |
Vue imports functions/ | Use domain barrel (faDragDrop_manager, dom_manager) when present |
*Wiring.ts vs *_manager.ts*_manager.ts — factory + export const only.*Wiring.ts — export function + document / window / fs; examples: faInterfaceTextDirectionApplyWiring.ts, faDragDropDocumentDragCursorWiring.ts, faProjectFilePathHardeningWiring.ts.MainLayout: attachWindowKeydownListener / detachWindowKeydownListener injected from mainLayout_manager.ts into createMainLayout.src/scripts/<domain>/)faDragDrop_manager.ts, dom_manager.ts — public API for Vue; re-export functions/ + wiring.
src/stores/S_*.ts = manager. Pure logic in src/stores/functions/. Bridge scripts may import stores/functions/.
readonly(ref) for external session state; mutate in actions only.S_FaActiveProject: openGeneration mutex; stale open → 'superseded' (T_faActiveProjectOpenFlowOutcome).*_manager.ts)export function, module function, class, top-level const x = () =>yarn lint:eslint — fa-two-level/manager-wiring-onlysessionDeps in *Session.ts, *Wiring.ts, *Bound.tsfs bind: factory in functions/, export const in *Wiring.ts (e.g. faProjectFilePathHardeningWiring.ts)types/)Level-1 functions/**: import type from app/types/** only. Managers export values; types from app/types/.... See types-folder.mdc.
Same under src-electron/mainScripts/<area>/: functions/, <area>_manager.ts, *Wiring.ts, IPC registrars import domain *_manager.ts. Keep contentBridgeAPIs/ thin.
© vishiri, GPL-3.0. 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 .cursor/skills/fantasia-two-level-architecture of vishiri/fantasia-archive.
Open the folder on GitHubat commit 26d4648
Fantasia Two Level Architecture 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 |
|---|---|---|---|---|---|---|
| Fantasia Two Level Architecture this skillvishiri/fantasia-archive | 409 | — | ~983 | Automated safety check: Pass | GPL-3.0 | |
| Refactor Large Functionrajbos/ai-engineering-fluency | 117 | — | ~1.3k | Automated safety check: Pass | MIT | |
| Sonarjsmanagedcode/dotnet-skills | 486 | — | ~1.6k | Automated safety check: Pass | MIT | |
| OpenObserve ESLint and TypeScript Fixesopenobserve/openobserve | 22k | — | ~5.1k | Automated safety check: Pass | AGPL-3.0 | |
| Modern Web GuidanceJetBrains/skills | 366 | 3 repos | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Rust Best Practicesfarm-fe/farm | 5.6k | 3 repos | ~1.1k | Automated safety check: Pass | MIT |
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.
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.
openobserve/openobserve
A playbook for fixing ESLint and TypeScript errors in the OpenObserve web frontend, with rule-by-rule guidance and typing conventions.
JetBrains/skills
Search tool for modern web development best practices. An agent skill from JetBrains/skills.
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.
vishiri/fantasia-archive
Ultra-compressed commit message generator. An agent skill from vishiri/fantasia-archive.
vishiri/fantasia-archive
Ultra-compressed code review comments. An agent skill from vishiri/fantasia-archive.
vishiri/fantasia-archive
Compress natural language memory files (CLAUDE.md, todos, preferences) into caveman format to save input tokens.
vishiri/fantasia-archive
Decision guide for delegating to caveman-style subagents. An agent skill from vishiri/fantasia-archive.
vishiri/fantasia-archive
Quick-reference card for all caveman modes, skills, and commands.
vishiri/fantasia-archive
Context menu divider policy: full primary-bright group separators vs low-opacity separatorAlt between consecutive items in the same group.
Categories
Migrates Fantasia Archive features to two-level functions + managers layout: pure scripts/functions/, manager.ts wiring (underscore suffix, e.g. Fantasia Two Level Architecture is an agent skill from vishiri/fantasia-archive.g.
Fantasia Two Level Architecture fits situations like: refactoring features; fixing fa-two-level ESLint violations.
Run `npx skills add vishiri/fantasia-archive --skill fantasia-two-level-architecture -a claude-code`. Or copy the skill folder (.cursor/skills/fantasia-two-level-architecture in vishiri/fantasia-archive) into .claude/skills/fantasia-two-level-architecture in your project. Claude Code loads it when a task matches its description.
Run `npx skills add vishiri/fantasia-archive --skill fantasia-two-level-architecture -a codex`. Or copy the skill folder (.cursor/skills/fantasia-two-level-architecture in vishiri/fantasia-archive) into .agents/skills/fantasia-two-level-architecture 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 vishiri/fantasia-archive --skill fantasia-two-level-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/fantasia-two-level-architecture, .gemini/skills/fantasia-two-level-architecture, .github/skills/fantasia-two-level-architecture and .opencode/skills/fantasia-two-level-architecture in your project.
Going by SKILL.md and its folder, Fantasia Two Level Architecture needs the command-line tools its instructions call (yarn).
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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.
Fantasia Two Level Architecture is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 983 tokens (SKILL.md is roughly 3.9k 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 Fantasia Two Level Architecture: Refactor Large Function (rajbos/ai-engineering-fluency, 117 stars), Sonarjs (managedcode/dotnet-skills, 486 stars), OpenObserve ESLint and TypeScript Fixes (openobserve/openobserve, 22k stars) and Modern Web Guidance (JetBrains/skills, 366 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
vishiri (a GitHub user) maintains it in vishiri/fantasia-archive, which has 409 GitHub stars. The repository holds 35 skills in this directory. The repository was last updated on October 7, 2026.
Source: vishiri/fantasia-archive on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.