llm-code-highlighter
RepositoryFreeCondense source code for LLM analysis by extracting essential highlights, utilizing a simplified version of Paul Gauthier's repomap technique from Aider Chat.
Capabilities10 decomposed
syntax-aware code condensation with structural preservation
Medium confidenceExtracts and highlights essential code elements (function signatures, class definitions, imports, key logic) while removing boilerplate and comments, using a simplified repomap technique adapted from Aider Chat. The tool parses source code into an AST-like representation to identify structural boundaries and preserve semantic relationships, then outputs a condensed version that maintains enough context for LLM analysis without token bloat.
Implements a simplified version of Aider Chat's repomap algorithm specifically optimized for LLM context windows, using language-aware parsing to preserve structural integrity while aggressively removing non-essential lines (comments, blank lines, verbose formatting)
More sophisticated than naive line-filtering or regex-based approaches because it understands code structure (functions, classes, imports) and preserves semantic relationships, while remaining lighter-weight than full AST-based tools like tree-sitter
multi-language code parsing with fallback strategies
Medium confidenceDetects source code language from file extension or content, then applies language-specific parsing rules to identify structural elements (function/class definitions, imports, decorators). Falls back to heuristic-based line filtering for unsupported languages, ensuring graceful degradation across diverse codebases without requiring external parser dependencies.
Implements language-specific parsing rules as pluggable modules with automatic fallback to generic heuristics, avoiding hard dependencies on heavy parser libraries while maintaining reasonable accuracy across 10+ languages
Lighter-weight than tree-sitter or Babel-based approaches because it uses pattern matching instead of full AST generation, while more accurate than naive regex-based language detection
token-aware condensation with size estimation
Medium confidenceEstimates token consumption of condensed code using language-model-specific tokenizers (OpenAI, Anthropic, etc.) and provides feedback on compression ratio achieved. Allows developers to tune condensation aggressiveness (preserve more detail vs. maximize compression) based on target token budget, enabling predictable context window usage.
Integrates token counting directly into the condensation pipeline with support for multiple tokenizer backends, allowing developers to make informed decisions about compression trade-offs before sending code to LLMs
More practical than generic code compression tools because it optimizes specifically for LLM token budgets rather than generic file size, and provides real-time feedback on token consumption
batch directory processing with recursive traversal
Medium confidenceProcesses entire directory trees recursively, applying condensation rules to all source files matching specified patterns (glob filters, language filters). Outputs a structured map of condensed files with metadata (original size, condensed size, token count, language), enabling efficient analysis of large monorepos or multi-module projects.
Provides recursive directory processing with glob-based filtering and structured metadata output, designed specifically for monorepo scenarios where developers need to condense multiple modules or packages in a single operation
More efficient than processing files individually because it batches operations and generates a unified metadata manifest, while remaining simpler than full-featured build system integrations
configurable condensation profiles with preset strategies
Medium confidenceOffers multiple condensation profiles (aggressive, balanced, conservative) that control which code elements are preserved (imports, comments, docstrings, blank lines, etc.). Users can define custom profiles via configuration files, enabling consistent condensation behavior across teams and projects without per-file parameter tuning.
Provides preset condensation profiles (aggressive/balanced/conservative) with customizable rules via configuration files, allowing teams to enforce consistent condensation policies without modifying code or CLI parameters
More flexible than single-strategy tools because it supports multiple profiles and custom configurations, while remaining simpler than full-featured code analysis frameworks that require plugin development
import and dependency extraction with relationship mapping
Medium confidenceIdentifies and extracts import statements, require() calls, and dependency declarations from source code, then maps relationships between modules (which files import which). Outputs a dependency graph or adjacency list that helps LLMs understand module structure and interdependencies without analyzing full file contents.
Extracts and maps import/require relationships across source files to build a lightweight dependency graph, enabling LLMs to understand module structure without processing full file contents
Faster and more token-efficient than sending full code to LLMs for dependency analysis, while remaining simpler than heavyweight dependency analysis tools like Madge or Webpack
function and class signature extraction with metadata
Medium confidenceParses source code to extract function/method signatures, class definitions, and type annotations, preserving parameter names, return types, and decorators. Outputs a structured list of callable interfaces with optional docstring summaries, enabling LLMs to understand the public API of a module without reading implementation details.
Extracts function and class signatures with type annotations and docstring summaries, creating a lightweight API reference that LLMs can use for code generation without processing full implementations
More efficient than sending full code to LLMs because it focuses on callable interfaces and public APIs, while remaining simpler than full IDE-style symbol resolution
comment and docstring filtering with preservation options
Medium confidenceIdentifies and selectively removes or preserves comments, docstrings, and documentation blocks based on configurable rules (remove all, keep docstrings only, keep type hints, etc.). Supports multiple comment styles (single-line, block, inline) across languages, enabling fine-grained control over documentation preservation in condensed code.
Provides configurable comment and docstring filtering with language-aware detection of multiple comment styles, enabling fine-grained control over documentation preservation in condensed code
More sophisticated than naive regex-based comment removal because it understands language-specific comment syntax and docstring formats, while remaining simpler than full AST-based approaches
whitespace and formatting normalization
Medium confidenceRemoves unnecessary whitespace (blank lines, excessive indentation, trailing spaces) while preserving code structure and readability. Normalizes indentation to a consistent level (spaces or tabs) and collapses multiple blank lines into single lines, reducing token count without affecting code semantics.
Applies configurable whitespace normalization with awareness of language-specific formatting requirements, reducing token count through intelligent blank line collapsing and indentation normalization
More nuanced than naive whitespace stripping because it preserves code structure and readability, while remaining simpler than full code formatting tools like Prettier
line-by-line filtering with heuristic scoring
Medium confidenceApplies heuristic scoring to individual lines of code to determine importance (function definitions score high, blank lines score low, etc.), then filters lines below a configurable threshold. Uses pattern matching to identify structural elements (imports, definitions, key statements) and removes low-value lines (blank lines, comments, verbose formatting) while preserving semantic content.
Implements heuristic line-by-line importance scoring as a fallback for unsupported languages, enabling reasonable condensation across diverse codebases without language-specific parsing rules
More robust than naive line-filtering because it uses pattern-based importance scoring, while remaining simpler and faster than full AST parsing for unsupported languages
Capabilities are decomposed by AI analysis. Each maps to specific user intents and improves with match feedback.
Related Artifactssharing capabilities
Artifacts that share capabilities with llm-code-highlighter, ranked by overlap. Discovered automatically through the match graph.
drift
Codebase intelligence for AI. Detects patterns & conventions + remembers decisions across sessions. MCP server for any IDE. Offline CLI.
claude-context
Code search MCP for Claude Code. Make entire codebase the context for any coding agent.
repomix
📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Language Models (LLMs) or other AI tools like Claude, ChatGPT, DeepSeek, Perplexity, Gemini, Gemma, Llama, Grok, and more.
caveman
🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman
CodeT5
Home of CodeT5: Open Code LLMs for Code Understanding and Generation
javaparser
Java 1-25 Parser and Abstract Syntax Tree for Java with advanced analysis functionalities.
Best For
- ✓developers using LLM-based code analysis tools (Aider, custom agents)
- ✓teams building AI-assisted refactoring or code review systems
- ✓engineers working with large monorepos who need efficient context passing to LLMs
- ✓polyglot development teams with JavaScript, Python, Java, Go, Rust, C++ codebases
- ✓monorepo maintainers processing heterogeneous source trees
- ✓LLM agents that need to analyze arbitrary code without manual language specification
- ✓developers optimizing LLM API costs by managing token consumption
- ✓teams building agentic systems with fixed context window budgets
Known Limitations
- ⚠Relies on language-specific parsing — unsupported languages fall back to naive line-filtering
- ⚠May lose important inline documentation or docstrings if they're not recognized as structural elements
- ⚠No semantic understanding of code intent — removes lines based on syntactic patterns, not logical importance
- ⚠Condensation ratio varies significantly by language and code style; dense functional code may not compress well
- ⚠Language detection relies on file extensions — ambiguous or non-standard extensions may be misclassified
- ⚠Unsupported languages degrade to generic line-filtering heuristics, losing structural awareness
Requirements
Input / Output
UnfragileRank
UnfragileRank is computed from adoption signals, documentation quality, ecosystem connectivity, match graph feedback, and freshness. No artifact can pay for a higher rank.
Repository Details
Package Details
About
Condense source code for LLM analysis by extracting essential highlights, utilizing a simplified version of Paul Gauthier's repomap technique from Aider Chat.
Categories
Alternatives to llm-code-highlighter
Are you the builder of llm-code-highlighter?
Claim this artifact to get a verified badge, access match analytics, see which intents users search for, and manage your listing.
Get the weekly brief
New tools, rising stars, and what's actually worth your time. No spam.
Data Sources
Looking for something else?
Search →