heatmap-beautifier
Professional beautification tool for gene expression heatmaps, automatically adds clustering trees, color annotation tracks, and intelligently optimizes label layout.
Best use case
heatmap-beautifier is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Professional beautification tool for gene expression heatmaps, automatically adds clustering trees, color annotation tracks, and intelligently optimizes label layout.
Teams using heatmap-beautifier should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/heatmap-beautifier/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How heatmap-beautifier Compares
| Feature / Agent | heatmap-beautifier | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Professional beautification tool for gene expression heatmaps, automatically adds clustering trees, color annotation tracks, and intelligently optimizes label layout.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
AI Agents for Marketing
Discover AI agents for marketing workflows, from SEO and content production to campaign research, outreach, and analytics.
AI Agents for Startups
Explore AI agent skills for startup validation, product research, growth experiments, documentation, and fast execution with small teams.
AI Agents for Coding
Browse AI agent skills for coding, debugging, testing, refactoring, code review, and developer workflows across Claude, Cursor, and Codex.
SKILL.md Source
# Heatmap Beautifier
Professional beautification tool for gene expression heatmaps, automatically adds clustering trees, color annotation tracks, and intelligently optimizes label layout.
## Input Validation
This skill accepts: CSV files containing gene expression matrices (genes as rows, samples as columns) for heatmap generation and beautification.
If the user's request does not involve heatmap generation or gene expression visualization — for example, asking to perform differential expression analysis, run statistical tests, or generate other chart types — do not proceed. Instead respond:
> "heatmap-beautifier is designed to generate and beautify gene expression heatmaps from expression matrix data. Your request appears to be outside this scope. Please provide a CSV expression matrix file, or use a more appropriate tool for your task."
Do not continue the workflow when the request is out of scope, missing the required input CSV, or would require unsupported assumptions. For missing inputs, state exactly which fields are missing.
## Quick Check
```bash
python -m py_compile scripts/main.py
python scripts/main.py --help
# Demo mode (no CSV required):
python scripts/main.py --demo --output demo_heatmap.pdf
```
## When to Use
- Beautify gene expression heatmaps with clustering trees and annotation tracks
- Generate publication-ready heatmap output (PDF, PNG, SVG) with optimized label layout
- Add row/column annotation color bars to expression matrices
- Standardize heatmap styling for manuscript figures
## Workflow
1. **Validate input** — confirm the request is within scope before any processing.
2. Confirm the user objective, required inputs, and non-negotiable constraints.
3. Use the packaged script path or the documented reasoning path with only the inputs that are actually available.
4. Return a structured result that separates assumptions, deliverables, risks, and unresolved items.
5. If execution fails or inputs are incomplete, switch to the fallback path and state exactly what blocked full completion.
## Features
- **Automatic Clustering**: Adds row/column clustering trees based on hierarchical clustering
- **Annotation Tracks**: Supports multiple color annotation tracks (sample grouping, gene classification, etc.)
- **Smart Labels**: Automatically calculates optimal font size to avoid row/column label overlap
- **Flexible Color Schemes**: Built-in multiple professional scientific research color schemes
- **Export Options**: Supports PDF, PNG, SVG formats
- **Demo Mode**: Run `--demo` to generate a synthetic 20×10 matrix without a real CSV
## Dependencies
```text
pip install seaborn matplotlib scipy pandas numpy
```
## Usage
### Basic Usage
```python
from skills.heatmap_beautifier.scripts.main import HeatmapBeautifier
hb = HeatmapBeautifier()
hb.create_heatmap(
data_path="expression_matrix.csv",
output_path="output/heatmap.pdf"
)
```
### Command Line Usage
```text
python -m skills.heatmap_beautifier.scripts.main \
--input expression_matrix.csv \
--output heatmap.pdf
python -m skills.heatmap_beautifier.scripts.main \
--input expression_matrix.csv \
--output heatmap.pdf \
--row-cluster \
--col-cluster \
--row-annotations row_annot.json \
--col-annotations col_annot.json \
--title "Gene Expression"
# Demo mode (no CSV required)
python -m skills.heatmap_beautifier.scripts.main --demo --output demo_heatmap.pdf
# Save clustering metadata to JSON for agent consumption
python -m skills.heatmap_beautifier.scripts.main \
--input expression_matrix.csv \
--output heatmap.pdf \
--output-json heatmap_metadata.json
```
## Parameters
| Parameter | Type | Default | Required | Description |
|-----------|------|---------|----------|-------------|
| `--data-path`, `-d` | string | - | Yes* | Path to input data file (CSV) |
| `--demo` | flag | - | No | Generate synthetic 20×10 demo matrix |
| `--output-path`, `-o` | string | heatmap.png | No | Output file path |
| `--title` | string | Gene Expression Heatmap | No | Heatmap title |
| `--cmap` | string | RdBu_r | No | Color map |
| `--center` | float | 0 | No | Color center value |
| `--vmin` | float | -2 | No | Minimum value for color scale |
| `--vmax` | float | 2 | No | Maximum value for color scale |
| `--row-cluster` | bool | true | No | Enable row clustering |
| `--col-cluster` | bool | true | No | Enable column clustering |
| `--standard-scale` | string | None | No | Standardization: row, col, None |
| `--z-score` | int | None | No | Z-score: 0 (row), 1 (col), None |
| `--figsize` | tuple | (12, 10) | No | Figure size (width, height) |
| `--dpi` | int | 300 | No | Resolution (dots per inch) |
| `--format` | string | pdf | No | Output format (pdf, png, svg) |
| `--output-json` | string | - | No | Save clustering metadata (gene_order, sample_order, annotation_colors) to JSON |
*One of `--data-path` or `--demo` is required.
## Input Data Format
### Expression Matrix (CSV)
```csv
,sample1,sample2,sample3,sample4
Gene_A,2.5,-1.2,0.8,-0.5
Gene_B,-0.8,1.5,-2.1,0.3
Gene_C,1.2,0.5,-0.7,1.8
```
- First column: Gene names (row index)
- First row: Sample names (column names)
- Data: Expression values (e.g., log2 fold change, TPM, FPKM)
## Color Schemes
- `"RdBu_r"` — Red-Blue (classic differential expression)
- `"viridis"` — Yellow-Purple (continuous data)
- `"RdYlBu_r"` — Red-Yellow-Blue
- `"coolwarm"` — Cool-Warm
- `"seismic"` — Seismic
- `"bwr"` — Blue-White-Red
## Error Handling
- If required inputs are missing, state exactly which fields are missing and request only the minimum additional information.
- If the task goes outside the documented scope, stop instead of guessing or silently widening the assignment.
- If `scripts/main.py` fails, report the failure point, summarize what still can be completed safely, and provide a manual fallback.
- Do not fabricate files, citations, data, search results, or execution outcomes.
- **Exception handling**: The script uses `except (pd.errors.ParserError, UnicodeDecodeError, ValueError)` for CSV parsing errors — not bare `except`. If you see a bare except in an older version, report it.
- **Error propagation**: `FileNotFoundError` and `ValueError` are caught in `main()` with `try/except (FileNotFoundError, ValueError) as e: print(f'Error: {e}', file=sys.stderr); sys.exit(1)` and reported to stderr with exit code 1.
## Fallback Behavior
If `scripts/main.py` fails or required inputs are incomplete:
1. Report the exact failure point and error message.
2. State what can still be completed (e.g., data validation without rendering).
3. Manual fallback: verify CSV format has gene rows and sample columns, then re-run with minimal options: `python -m skills.heatmap_beautifier.scripts.main --input data.csv --output out.png`.
4. Use `--demo` to verify the environment works without a real CSV.
5. Do not fabricate execution outcomes or file contents.
## Output Requirements
Every final response must make these items explicit when relevant:
- Objective or requested deliverable
- Inputs used and assumptions introduced
- Workflow or decision path
- Core result, recommendation, or artifact
- Constraints, risks, caveats, or validation needs
- Unresolved items and next-step checks
## Response Template
Use the following fixed structure for non-trivial requests:
1. Objective
2. Inputs Received
3. Assumptions
4. Workflow
5. Deliverable
6. Risks and Limits
7. Next Checks
For stress/multi-constraint requests, also include:
- Constraints checklist (compliance, performance, error paths)
- Unresolved items with explicit blocking reasons
If the request is simple, you may compress the structure, but still keep assumptions and limits explicit when they affect correctness.
## Notes
1. Recommended to perform log2 transformation or standardization on data first
2. Large datasets (>5000 rows) may take longer to process
3. When there are too many rows/columns, some labels will be automatically hidden
4. Default clustering uses Euclidean distance and Ward methodRelated Skills
---
name: article-factory-wechat
humanizer
Remove signs of AI-generated writing from text. Use when editing or reviewing text to make it sound more natural and human-written. Based on Wikipedia's comprehensive "Signs of AI writing" guide. Detects and fixes patterns including: inflated symbolism, promotional language, superficial -ing analyses, vague attributions, em dash overuse, rule of three, AI vocabulary words, negative parallelisms, and excessive conjunctive phrases.
find-skills
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
tavily-search
Use Tavily API for real-time web search and content extraction. Use when: user needs real-time web search results, research, or current information from the web. Requires Tavily API key.
baidu-search
Search the web using Baidu AI Search Engine (BDSE). Use for live information, documentation, or research topics.
agent-autonomy-kit
Stop waiting for prompts. Keep working.
Meeting Prep
Never walk into a meeting unprepared again. Your agent researches all attendees before calendar events—pulling LinkedIn profiles, recent company news, mutual connections, and conversation starters. Generates a briefing doc with talking points, icebreakers, and context so you show up informed and confident. Triggered automatically before meetings or on-demand. Configure research depth, advance timing, and output format. Walking into meetings blind is amateur hour—missed connections, generic small talk, zero leverage. Use when setting up meeting intelligence, researching specific attendees, generating pre-meeting briefs, or automating your prep workflow.
self-improvement
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Claude ('No, that's wrong...', 'Actually...'), (3) User requests a capability that doesn't exist, (4) An external API or tool fails, (5) Claude realizes its knowledge is outdated or incorrect, (6) A better approach is discovered for a recurring task. Also review learnings before major tasks.
botlearn-healthcheck
botlearn-healthcheck — BotLearn autonomous health inspector for OpenClaw instances across 5 domains (hardware, config, security, skills, autonomy); triggers on system check, health report, diagnostics, or scheduled heartbeat inspection.
linkedin-cli
A bird-like LinkedIn CLI for searching profiles, checking messages, and summarizing your feed using session cookies.
notebooklm
Google NotebookLM 非官方 Python API 的 OpenClaw Skill。支持内容生成(播客、视频、幻灯片、测验、思维导图等)、文档管理和研究自动化。当用户需要使用 NotebookLM 生成音频概述、视频、学习材料或管理知识库时触发。
小红书长图文发布 Skill
## 概述