Component Refactoring
langflow-ai/langflow
Refactor high-complexity React components in Langflow frontend.
Shrink code, tests, comments, and docs to what carries meaning — delete dead paths, redundant states, and refactor-dragging tests outright, then hold the survivors to the four bars.
$ npx skills add tola-rs/tola-ssg --skill trim -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install tola-rs/tola-ssg trim --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/tola-rs/tola-ssg.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/trim .claude/skills/trim && 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 "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .claude/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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/tola-rs/tola-ssg/tree/main/.agents/skills/trimType 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 tola-rs/tola-ssg --skill trim -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install tola-rs/tola-ssg trim --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tola-rs/tola-ssg.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/trim .agents/skills/trim && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .agents/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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 tola-rs/tola-ssg --skill trim -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install tola-rs/tola-ssg trim --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tola-rs/tola-ssg.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/trim .cursor/skills/trim && 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 "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .cursor/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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/tola-rs/tola-ssg.git --path .agents/skills/trim--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 tola-rs/tola-ssg --skill trim -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install tola-rs/tola-ssg trim --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tola-rs/tola-ssg.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/trim .gemini/skills/trim && 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 "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .gemini/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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 tola-rs/tola-ssg trimInstalls 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 tola-rs/tola-ssg --skill trim -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/tola-rs/tola-ssg.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/trim .github/skills/trim && 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 "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .github/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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 tola-rs/tola-ssg --skill trim -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install tola-rs/tola-ssg trim --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/tola-rs/tola-ssg.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/trim .opencode/skills/trim && 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 "trim" agent skill from https://github.com/tola-rs/tola-ssg/tree/main/.agents/skills/trim into .opencode/skills/trim/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "trim", 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.
trimShrink code, tests, comments, and docs to what carries meaning — delete dead paths, redundant states, and refactor-dragging tests outright, then hold the survivors to the four bars.
Trim is an agent skill from tola-rs/tola-ssg. Shrink code, tests, comments, and docs to what carries meaning — delete dead paths, redundant states, and refactor-dragging tests outright, then hold the survivors to the four bars. Use when reducing a change, a file, or a suite; before adding, changing, renaming, consolidating, or deleting a test; and when reviewing a diff for concision, clarity, rigor, and correctness.
Its SKILL.md is about 2.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts. Compatibility notes: opencode
It sits in Development, covering Refactoring. The repository describes itself as: SSG for typst-based websites - keep your focus on the content. The licence is MIT.
Read from SKILL.md and the folder at commit fbb0506. 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:
justFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
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.
opencode
From compatibility in the SKILL.md frontmatter.
Trim loads about 2.9k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 1,538 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 tola-rs/tola-ssg at commit fbb0506, republished under its MIT licence (© tola-rs). 1,538 words, ~2,903 tokens.
.claude/skills/trim/SKILL.md (or your agent's skills folder).Delete by default; keep only what a reader of the site, a caller of the API, or the next maintainer would notice go missing. Losing coverage is fine when cost > value — a test that drags refactors, restates the implementation, or pins rendered output has already cost more than it protects the moment you read it. The bar is the same for code: a path, state, wrapper, or abstraction nobody's contract needs is weight the change added, not a safeguard.
Scope: user-provided; none → files touched on this branch; else the whole suite or subsystem.
Every survivor — a function, a name, a comment, a diagnostic, a test — passes all four:
Text a human reads — a diagnostic, a comment, a report — also reads friendly: skill://friendly-report.
Delete on sight, in the change that exposes it:
Prefer one authoritative path over old/new, fast/slow, cached/uncached, compatibility forks claiming the same semantics; encode the real valid states instead of a boolean combination plus optional fields. Keep performance work subordinate to semantic equivalence and measurable ownership.
Remove on sight, without waiting for the suite to break:
An unclear owner is a delete: a test re-added after a real regression earns its place; one kept out of inertia never will.
Consolidation keeps each block's isolation: two tests each owning temp dir/config/input → merged body gives each its own. Shared temp root ⇒ second block fails "already exists" or silently asserts first block's state. Move assertions, never ownership.
Extract copy-paste setup into shared helpers where it pays off.
Deleting a test can orphan a helper, constant, or import → remove those with it. Worse reverse: NEVER delete a use because the file "looks self-contained" — traits arrive only through imports, dependent code looks fine until it runs. Before deleting an import, check every symbol it named for remaining refs.
Test name = identifier for the one behaviour the test proves, not a sentence describing the code it runs.
Write the name before the body — it is the contract the body MUST prove; a name formed after the input describes whatever the input did. Holds for tests added mid-other-work: a feature's own new tests are not exempt.
a_, an_, the_, test_, it_, should_, when_, letters, or order-marking numbers. Test order is not a contract; a name opening like a sentence describes the case, not the behaviour.a/an are prose an identifier drops — failed_command_reports_bounded_output not a_failed_command_reports_bounded_output_from_both_streams; absent_variant_misses not absent_variant_is_a_miss. the only where the verb acts on one specific thing (auto_encoding_follows_the_source).and/or join two values of one domain — query_and_fragment_are_refused, base_href_decides_internal_or_external — NEVER two behaviours. A second connective, a connective introducing an article (..._or_a_background), or but is refused. A name welding two clauses (segment_settles_or_retracts) splits into two tests or drops the irrelevant clause.missing_package_names_each_directory not checks_package_resolution_tiers.just scripts::test-names refuses longer.works, succeeds, is_ok, is_handled, passes, functions); no hedge in the outcome's place (correctly, properly, successfully, as_expected, fine, valid). handles/behaves stand in for an unstated behaviour; one word (parses) names a topic.Naming also shrinks the suite. Open the body before renaming: what does this test fail on that no sibling fails on? Sibling already fails on it → merge (one setup, surviving assertions, one name for what the merged test proves). Nothing fails on it → delete. Then cut the name to the shortest form still stating what the body proves, dropping qualifiers it never checks; a name shortened by losing a checked behaviour was cut wrong. Search the suite for the words the name carries before writing a new one.
Shortening the suite's longest name lowers the ceiling: 56 is what the suite carries today, not a budget to spend.
Rules are not advice against finishing sooner: a name breaking them is unfinished work; shipping one is the failure this gate stops. Audit every file whose tests you added, changed, or reviewed before reporting anything:
just scripts::test-namesRecipe is part of just check ⇒ a forbidden name fails the workspace gate, not a reviewer. Reads every test function the workspace declares (whichever attribute declares it) + case titles of e2e, VS Code, maintenance suites; a declaration it cannot read fails the gate rather than going unjudged.
Every hit is a rename you owe here, not a note for later. A case the audit keeps: file the name under the shape it broke in scripts/test-names.test.ts; add the shape to scripts/test-names.ts when no rule caught it. Then grep the identifier ban no test name carries:
grep -rniE 'fixture|probe' --include='*.rs' --include='*.ts' <the files you touched>Every hit = a type, function, or variable named after the technique that builds it → a rename you owe here. Then read the names the audit cannot judge — length, one clause, observable result, domain's words — and rename those too. Report audit output + renames together; "the tests pass" says nothing about whether names are finished.
A name defect is cheap to see, invisible to whoever opens only the files a change touched ⇒ sweep the suite before reporting the trim. Scope decides which tests you change; it never narrows this read. just scripts::test-names carries these patterns; each names a shape no correct test name has:
^\s*(async )?fn (a|an|the|test|it|should|when)_^\s*(async )?fn [a-z]_(first|second|third|fourth|fifth|last|next|other|another)_. A bare letter is not one: b_tree_splits_at_the_middle and k_means_clusters_points name their algorithm(?:_(and|or|but)_[a-z0-9_]*){2}then, or but: _(and|or)_(a|an|the|its|their|they|it|this|that|then)_, _but__(a|an|the)$: article where a value belongs_(a|an)_: a/an mark prose an identifier does not carry (absent_variant_misses not absent_variant_is_a_miss); the stays where it names the object the verb acts on (follows_the_source)_(works|succeeds|is_ok|is_handled|passes|functions)$_(correctly|properly|successfully|gracefully|cleanly|smoothly|as_expected|as_intended|fine|good|ok|valid)$(^|_)(handles|behaves|does_the_right_thing)$^[a-z0-9]+$: a topic, not a behaviour_\d+$, _part_\d+$(^|_)(fixture|probe)(_|$) in a test namefn [a-z0-9_]{57,}\(: report it; rename one only when already in that fileReport the counts. A rename outside the files this change owns is separate scope: list old → new pairs, then wait for approval.
first_, second_, _2 break the rule only when marking test order. Correct when naming a real domain pair — two resampling passes (first_pass_window, second_axis), the earliest of several candidates (tree_conflict_names_first_foreign_owner) ⇒ read the body before renaming one.
fixture/probe are not identifiers: NEVER a type, function, variable, constant, module, or field. Name a helper for the value it returns (html_page, asset_route), not the technique that builds it; #[cfg(test)] already says where the code lives, so test_ there is a placeholder noun too.
A sentence title — test('vendor freezes a package for a pure build') in the maintenance suite — is prose, not an identifier: article, connector, ceiling rules do not reach it; the shapes above still do — scaffold prefix, bare verdict, hedge, placeholder word, single word. One-behaviour and observable-result rules reach a title by reading, not pattern.
Renames follow skill://naming; in a test they reach the input, its reads and writes, and expected values in assertions.
Comment rules: skill://comments; read before adding, merging, or keeping one.
Working beside another agent — one owner per file, staying in your slice, collisions — is skill://scope-discipline; read before a shared-tree run.
Run the changed tests and make them pass. A trimmed suite never executed is unverified: if the workspace cannot build, say which command you could not run and which merges/renames that leaves unproven — do not report the pass as complete.
Verify by search, not memory: grep case-insensitively for the old name/retired word across every path you touched; report the count. Zero, except spellings you deliberately kept — say why each stays.
Summarise what was dropped/consolidated and any coverage intentionally given up.
© tola-rs, 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 .agents/skills/trim of tola-rs/tola-ssg.
Open the folder on GitHubat commit fbb0506
Trim 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 |
|---|---|---|---|---|---|---|
| Trim this skilltola-rs/tola-ssg | 178 | — | ~2.9k | Automated safety check: Pass | MIT | |
| Component Refactoringlangflow-ai/langflow | 155k | — | ~3.5k | Automated safety check: Pass | MIT | |
| Component RefactoringPageAI-Pro/ralph-loop | 315 | — | ~1.8k | Automated safety check: Pass | MIT | |
| Expertreviewjtenniswood/esphome-media-player | 234 | — | ~1.9k | Automated safety check: Pass | Custom licence | |
| Code Review And Qualityhylarucoder/hai-stack | 386 | — | ~934 | Automated safety check: Pass | MIT | |
| Saleor App UIsaleor/apps | 162 | — | ~5.8k | Automated safety check: Pass | Custom licence |
langflow-ai/langflow
Refactor high-complexity React components in Langflow frontend.
PageAI-Pro/ralph-loop
Refactor high-complexity React components in frontend. An agent skill from PageAI-Pro/ralph-loop.
jtenniswood/esphome-media-player
Provide an expert codebase review for this repository. An agent skill from jtenniswood/esphome-media-player.
hylarucoder/hai-stack
Reviews a code change for correctness, security, maintainability, architecture, performance, and verification gaps, or performs a local code-smell review.
saleor/apps
Styling and layout guide for Saleor Apps using modern macaw-ui and @saleor/apps-ui-next.
tabler/tabler
Proves that a refactor leaves every rendered preview page unchanged by comparing fresh HTML output against a baseline captured beforehand.
tola-rs/tola-ssg
Build and maintain Tola websites and documentation. An agent skill from tola-rs/tola-ssg.
tola-rs/tola-ssg
Design and review work that runs concurrently, waits, retries, or owns resources.
tola-rs/tola-ssg
Report progress to the human. An agent skill from tola-rs/tola-ssg.
tola-rs/tola-ssg
Restructure code while keeping observable behavior identical, and prove it with difference testing.
tola-rs/tola-ssg
Run work through subagents instead of the main thread. An agent skill from tola-rs/tola-ssg.
tola-rs/tola-ssg
Keep a change inside its requested scope. An agent skill from tola-rs/tola-ssg.
Categories
Shrink code, tests, comments, and docs to what carries meaning — delete dead paths, redundant states, and refactor-dragging tests outright, then hold the survivors to the four bars. Trim is an agent skill from tola-rs/tola-ssg. Shrink code, tests, comments, and docs to what carries meaning — delete dead paths, redundant states, and refactor-dragging tests outright, then hold the survivors to the four bars.
Trim fits situations like: reducing a change; deleting a test; when reviewing a diff for concision.
Run `npx skills add tola-rs/tola-ssg --skill trim -a claude-code`. Or copy the skill folder (.agents/skills/trim in tola-rs/tola-ssg) into .claude/skills/trim in your project. Claude Code loads it when a task matches its description.
Run `npx skills add tola-rs/tola-ssg --skill trim -a codex`. Or copy the skill folder (.agents/skills/trim in tola-rs/tola-ssg) into .agents/skills/trim 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 tola-rs/tola-ssg --skill trim -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trim, .gemini/skills/trim, .github/skills/trim and .opencode/skills/trim in your project.
Going by SKILL.md and its folder, Trim needs the command-line tools its instructions call (just). Compatibility (from SKILL.md): opencode.
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.
Trim is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.9k tokens (SKILL.md is roughly 12k 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 Trim: Component Refactoring (langflow-ai/langflow, 155k stars), Component Refactoring (PageAI-Pro/ralph-loop, 315 stars), Expertreview (jtenniswood/esphome-media-player, 234 stars) and Code Review And Quality (hylarucoder/hai-stack, 386 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
tola-rs (a GitHub organization) maintains it in tola-rs/tola-ssg, which has 178 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 9, 2026.
Source: tola-rs/tola-ssg on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.