Agent skill

Optimize

by hacan359 in hacan359/tonkatsu_box

Code optimization for performance, memory, and readability. An agent skill from hacan359/tonkatsu_box.

MITAuto-check passedMobile

Install Optimize

skills CLI
$ npx skills add hacan359/tonkatsu_box --skill optimize -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install hacan359/tonkatsu_box optimize --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/hacan359/tonkatsu_box.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/optimize .claude/skills/optimize && rm -rf skills-src

Use ~/.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/

Facts

Skill name
optimize
GitHub stars
579
Token cost
~1k tokens
SKILL.md length
137 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Code optimization for performance, memory, and readability. An agent skill from hacan359/tonkatsu_box.

  • Works in 7 steps: Profiling (Find Bottlenecks) → Algorithm Optimization → Memory Optimization → …
  • Improve existing code
  • Calls flutter
  • Tasks that involve Plain language and style rules

What it does

Optimize is an agent skill from hacan359/tonkatsu_box. Code optimization for performance, memory, and readability. Use to improve existing code.

Its SKILL.md is about 1k 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 Mobile, covering Plain language and style rules. The repository describes itself as: Free open-source app to organize collections of retro games, movies, TV shows & anime. Track progress, rate favorites, create visual boards, share with friends. Flutter · Windows…. The licence is MIT.

When your agent uses it

  • Improve existing code
  • Tasks that involve Plain language and style rules

Example prompts

  • “/optimize”

Workflow steps

7 steps, taken from the step headings in SKILL.md.

  1. Profiling (Find Bottlenecks)
  2. Algorithm Optimization
  3. Memory Optimization
  4. Flutter Widget Optimization
  5. Async Operations Optimization
  6. Optimization Checklist
  7. Validation

What it can do on your machine

Read from SKILL.md and the folder at commit 00a4fac. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • flutter

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Optimize loads about 1k tokens when it runs. Until then it costs about 25 tokens; SKILL.md has 137 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~25
When it runs · the whole SKILL.md, loaded when a task matches
~1k

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from hacan359/tonkatsu_box at commit 00a4fac, republished under its MIT licence (© hacan359). 137 words, ~1,038 tokens.

Download SKILL.mdSave it as .claude/skills/optimize/SKILL.md (or your agent's skills folder).
name
optimize
description
Code optimization for performance, memory, and readability. Use to improve existing code.

Code Optimization

Optimization Process

1. Profiling (Find Bottlenecks)
Flutter DevTools:
bash
# Flutter SDK lives on Windows — run via powershell.exe from WSL:
powershell.exe -Command "cd '$(wslpath -w "$PWD")'; flutter run -d windows --profile"
# Open DevTools and analyze:
# - CPU Profiler
# - Memory
# - Performance overlay
Metrics to Track:
  • Frame rendering time (< 16ms for 60fps)
  • Memory usage
  • Widget rebuild count
  • App startup time
2. Algorithm Optimization
Complexity:
BeforeAfterExample
O(n²)O(n log n)Sorting
O(n²)O(n)Nested loops → Map/Set
O(n)O(1)Linear search → HashMap
Examples:
dart
// BAD: O(n²)
for (final item in list1) {
  if (list2.contains(item)) { ... }
}

// GOOD: O(n)
final set2 = list2.toSet();
for (final item in list1) {
  if (set2.contains(item)) { ... }
}
3. Memory Optimization
Avoid:
  • Creating objects in loops
  • Copying large collections
  • Holding references to unused objects
  • Leaks through subscriptions and listeners
Solutions:
dart
// Reuse objects
final _dateFormat = DateFormat('yyyy-MM-dd'); // Once

// Use const
const _defaultPadding = EdgeInsets.all(16);

// Unsubscribe in dispose
@override
void dispose() {
  _subscription.cancel();
  _controller.dispose();
  super.dispose();
}
4. Flutter Widget Optimization
Reduce Rebuilds:
dart
// BAD: entire list rebuilds
ListView(
  children: items.map((i) => ItemWidget(i)).toList(),
)

// GOOD: only visible items
ListView.builder(
  itemCount: items.length,
  itemBuilder: (context, index) => ItemWidget(items[index]),
)
Use const:
dart
// BAD
return Container(
  padding: EdgeInsets.all(16),  // Created every build
  child: Text('Hello'),
);

// GOOD
return const Padding(
  padding: EdgeInsets.all(16),
  child: Text('Hello'),
);
Split Widgets:
dart
// BAD: entire widget rebuilds when counter changes
class MyWidget extends StatefulWidget {
  Widget build(context) {
    return Column(
      children: [
        Text('Counter: $counter'),  // Changes
        HeavyWidget(),              // Doesn't change but rebuilds
      ],
    );
  }
}

// GOOD: extract immutable parts
class MyWidget extends StatefulWidget {
  Widget build(context) {
    return Column(
      children: [
        CounterText(counter: counter),
        const HeavyWidget(),  // Doesn't rebuild
      ],
    );
  }
}
5. Async Operations Optimization
Parallel Execution:
dart
// BAD: sequential
final users = await fetchUsers();
final posts = await fetchPosts();

// GOOD: parallel
final results = await Future.wait([
  fetchUsers(),
  fetchPosts(),
]);
Caching:
dart
class CachedRepository {
  final Map<String, User> _cache = {};

  Future<User> getUser(String id) async {
    if (_cache.containsKey(id)) {
      return _cache[id]!;
    }
    final user = await _api.fetchUser(id);
    _cache[id] = user;
    return user;
  }
}
Debounce for Frequent Calls:
dart
Timer? _debounce;

void onSearchChanged(String query) {
  _debounce?.cancel();
  _debounce = Timer(const Duration(milliseconds: 300), () {
    performSearch(query);
  });
}
6. Optimization Checklist
  • No O(n²) algorithms where better is possible
  • No object creation in build()
  • const used everywhere possible
  • ListView.builder for long lists
  • Subscriptions cancelled in dispose()
  • Heavy computations moved off UI thread
  • Images optimized (size, cache)
  • No unnecessary setState/rebuild
7. Validation

After optimization:

bash
# Verify nothing is broken (Flutter SDK is on Windows only):
powershell.exe -Command "cd '$(wslpath -w "$PWD")'; flutter analyze --fatal-infos --fatal-warnings"
powershell.exe -Command "cd '$(wslpath -w "$PWD")'; flutter test"

# Check performance:
powershell.exe -Command "cd '$(wslpath -w "$PWD")'; flutter run -d windows --profile"
# Use Performance overlay (P in console)

© hacan359, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/skills/optimize of hacan359/tonkatsu_box.

Open the folder on GitHubat commit 00a4fac

Compare with similar skills

Optimize 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.

Optimize compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Optimize this skillhacan359/tonkatsu_box579—~1kAutomated safety check: PassMIT
Code StyleJetBrains/MPS1.7k—~258Automated safety check: PassApache-2.0
Asd Ste100danyuchn/asd-ste100-skill4.2k—~4.1kAutomated safety check: PassMIT
Simple Issue Descriptionevery-app/open-seo23k1 repos~1.2kAutomated safety check: PassMIT
Ponytail AuditDietrichGebert/ponytail159k—~1.4kAutomated safety check: PassMIT
Technical Writing Standardcursor/plugins10k10 repos~2.4kAutomated safety check: PassNone

Similar skills

  • Code Style

    JetBrains/MPS

    Official

    Code style rules for IntelliJ codebase. An agent skill from JetBrains/MPS.

    1.7k GitHub stars~258 tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Asd Ste100

    danyuchn/asd-ste100-skill

    A skill your agent uses when English text must be parsed without a human to resolve ambiguity — tool descriptions, error messages, inter-agent instructions, system prompts, status reports — and…

    4.2k GitHub stars~4.1k tokensUpdated 5 days ago
    Writing & ContentAuto-check passed
  • Simple Issue Description

    every-app/open-seo

    Turn a rough bug report, feature request, support note, or pull request into a short, plain-language issue focused on the problem and desired behavior.

    23k GitHub starsUsed in 1 repo~1.2k tokens
    Writing & ContentAuto-check passed
  • Ponytail Audit

    DietrichGebert/ponytail

    Quality audit of a whole repo: bugs, security holes, what breaks under real load, risky code without tests, slow paths, and what to delete, merge or split.

    159k GitHub stars~1.4k tokensUpdated yesterday
    Writing & ContentAuto-check passed
  • Official

    Applies four layers of technical-writing rules to docs, RFCs, readmes, PR descriptions and commit messages so a tired engineer follows them on the first read.

    10k GitHub starsUsed in 10 repos~2.4k tokens
    Writing & ContentAuto-check passed
  • Writes and edits Japanese business documents so they read clearly and naturally, removes AI-sounding phrasing and can score how AI-like a text reads.

    1.9k GitHub stars~2.1k tokensUpdated 1 mo ago
    Writing & ContentAuto-check passed

More from hacan359/tonkatsu_box

  • Finish

    hacan359/tonkatsu_box

    End-of-task pipeline — simplify review, double review, tests, single analyze+test gate, changelog/docs.

    579 GitHub stars~7.4k tokensUpdated yesterday
    Auto-check passed
  • Release

    hacan359/tonkatsu_box

    Automates the full release process — analyzes changes, suggests version, updates CHANGELOG and pubspec.yaml, commits, tags, and pushes.

    579 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed

Questions about Optimize

What does Optimize do?

Code optimization for performance, memory, and readability. An agent skill from hacan359/tonkatsu_box. Optimize is an agent skill from hacan359/tonkatsu_box. Code optimization for performance, memory, and readability.

When should I use Optimize?

Optimize fits situations like: improve existing code; tasks that involve Plain language and style rules.

How do I install Optimize in Claude Code?

Run `npx skills add hacan359/tonkatsu_box --skill optimize -a claude-code`. Or copy the skill folder (.claude/skills/optimize in hacan359/tonkatsu_box) into .claude/skills/optimize in your project. Claude Code loads it when a task matches its description.

How do I install Optimize in Codex?

Run `npx skills add hacan359/tonkatsu_box --skill optimize -a codex`. Or copy the skill folder (.claude/skills/optimize in hacan359/tonkatsu_box) into .agents/skills/optimize in your project. Codex loads it when a task matches its description.

Can I use Optimize in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add hacan359/tonkatsu_box --skill optimize -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/optimize, .gemini/skills/optimize, .github/skills/optimize and .opencode/skills/optimize in your project.

What does Optimize need to run?

Going by SKILL.md and its folder, Optimize needs the command-line tools its instructions call (flutter).

Does Optimize access the network?

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.

Is Optimize safe to install?

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.

What licence does Optimize use?

Optimize is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Optimize use?

About 1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Optimize?

Skills that share tags, products or a category with Optimize: Code Style (JetBrains/MPS, 1.7k stars), Asd Ste100 (danyuchn/asd-ste100-skill, 4.2k stars), Simple Issue Description (every-app/open-seo, 23k stars) and Ponytail Audit (DietrichGebert/ponytail, 159k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Optimize?

hacan359 (a GitHub user) maintains it in hacan359/tonkatsu_box, which has 579 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 8, 2026.

Source: hacan359/tonkatsu_box on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.