tangzhan-skill-code-simplier_skill

This skill analyzes recently modified code to simplify and optimize clarity and consistency while preserving all functionality and behavior.
  • HTML

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill tangc/tangzhan-skills --skill tangzhan-skill-code-simplier

  • SKILL.md2.7 KB

Overview

This skill simplifies and optimizes recently modified HTML, JavaScript, and React code to improve clarity, consistency, and maintainability while preserving all original behavior. It applies project-specific conventions and prioritizes readable, explicit solutions over overly compact or clever code. The focus is on making the code easier to understand and extend without changing outputs or side effects.

How this skill works

The skill inspects the most recently modified files and identifies opportunities to reduce complexity, remove redundancy, and apply established coding conventions. It rewrites implementations to use ES modules, explicit function declarations, typed top-level returns where required, and proper React component patterns. Changes preserve functionality and include minimal, focused notes about non-obvious refactors.

When to use it

  • After making local edits and before committing changes
  • When a PR needs improved readability or consistent style
  • When technical debt hides in nested conditionals or redundant logic
  • Before handing code to another team member for review
  • When preparing code for long-term maintenance or extension

Best practices

  • Target only the recently modified code unless broader refactors are requested
  • Prefer clear function names and explicit return types over cryptic one-liners
  • Use function keyword for top-level functions and avoid arrow functions for exported APIs
  • Replace nested ternaries with switch or if/else chains for multi-branch logic
  • Keep abstractions helpful; avoid collapsing distinct responsibilities into a single function

Example use cases

  • Simplify a React component that has deeply nested props handling and inconsistent Prop types
  • Refactor an ES module with duplicate utility logic into a single clear helper while keeping public API intact
  • Convert nested ternary expressions into a readable if/else or switch structure
  • Reduce redundant DOM or template fragments in HTML while preserving rendered output
  • Reorder and normalize imports with proper extensions and eliminate unused imports

FAQ

No. All transformations are implemented to preserve existing behavior, outputs, and side effects exactly.

Does it perform large-scale refactors across the whole repo?

No. By default it focuses only on recently modified files. Broader refactors happen only when explicitly requested.

How are coding conventions chosen?

The skill applies project-specific rules (ES modules, explicit function declarations, React Props typing, import order, etc.) and consistent naming conventions provided by the project guidelines.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational