bitwisecook/tcl-lsp/tcl-optimise

Claude Code and agent skill by bitwisecook/tcl-lsp

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Apply LSP optimiser suggestions to a Tcl file and explain why each optimisation is safe and beneficial. Covers constant folding, propagation, dead code elimination, strength reduction, and expression canonicalisation. Use when optimising Tcl code, improving .tcl file performance, refactoring Tcl scripts for efficiency, or applying language server optimisation suggestions.

Install

npx vskill@latest install bitwisecook/tcl-lsp/tcl-optimise

SKILL.md

Tcl Optimise

Apply the optimiser's rewrites to a Tcl file and explain each one.

Steps

  1. Read ../_prompts/tcl_system.md, then the file.
  2. Call mcp__tcl-lsp__optimize with the contents as source (profile

defaults to the user's config.ini [optimiser] profile, else full; a named one wins; aggressive iterates to a fixpoint). On a tool error (e.g. a parse failure) report it and suggest fixes; on no findings report the code is already well-optimised.

  1. Apply the returned optimised source with Edit.
  2. For each optimisation, one or two sentences: why it preserves behaviour,

and what it gains. A grouped item (constant propagation whose dead store was then eliminated) is one transformation — explain it as one.

  1. Re-validate with mcp__tcl-lsp__analyze on the rewritten source; revert

any optimisation that introduced an issue and say why.

  1. Summarise what was applied.

Optimisation codes

Full table: docs/generated/optimisation_codes.md. Categories:

  • Readability (O111, O114, O115, O117, O120, O128): idiomatic rewrites (incr, eq/ne, bracing)
  • Constant folding/propagation (O100, O101, O102, O103, O105, O110, O113, O116, O118, O129): inline and simplify known values
  • Pattern recognition (O104, O119, O130): fold string chains, pack consecutive sets
  • Dead code (O107, O108, O109, O112, O124, O126): remove unreachable or unused code and stores
  • Code motion (O106, O125, O127): hoist, sink, and inline assignments
  • Recursion (O121, O122, O123): tail-call rewriting and accumulator hints

Profiles: off; readability (editor default: O111, O114, O115, O117, O120, O128); standard (readability + constant folding + pattern recognition); full (every pass, single pass; CLI/AI default); aggressive (every pass, to a fixpoint).

$ARGUMENTS

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
5

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/bitwisecook/tcl-lsp/tcl-optimise/badge)](https://verified-skill.com/skills/bitwisecook/tcl-lsp/tcl-optimise)

Something wrong with this skill or its page? Tell us.