Skip to content
Back to skills

Figure Legend Gen

ASecurity

Generate standardized figure legends for scientific charts and graphs.

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 5, 2026
securitypythongobashexpressapisecurityperformance

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 5 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add dvcrn/openclaw-skills-marketplace --skill figure-legend-gen --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Figure Legend Gen?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Figure Legend Gen
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/dvcrn-figure-legend-gen/badge)](https://www.skillsdirectory.com/skills/dvcrn-figure-legend-gen)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: figure-legend-gen
description: "Generate standardized figure legends for scientific charts and graphs."
---

# Figure Legend Generator

Generate publication-quality figure legends for scientific research charts and images.

## Supported Chart Types

| Chart Type | Description |
|------------|-------------|
| Bar Chart | Compare values across categories |
| Line Graph | Show trends over time or continuous data |
| Scatter Plot | Display relationships between variables |
| Box Plot | Show distribution and outliers |
| Heatmap | Display matrix data intensity |
| Microscopy | Fluorescence/confocal images |
| Flow Cytometry | FACS plots and histograms |
| Western Blot | Protein expression bands |

## Usage

```bash
python scripts/main.py --input <image_path> --type <chart_type> [--output <output_path>]
```

### Parameters

| Parameter | Required | Description |
|-----------|----------|-------------|
| `--input` | Yes | Path to chart image |
| `--type` | Yes | Chart type (bar/line/scatter/box/heatmap/microscopy/flow/western) |
| `--output` | No | Output path for legend text (default: stdout) |
| `--format` | No | Output format (text/markdown/latex), default: markdown |
| `--language` | No | Language (en/zh), default: en |

### Examples

```bash
# Generate legend for bar chart
python scripts/main.py --input figure1.png --type bar

# Save to file
python scripts/main.py --input plot.jpg --type line --output legend.md

# Chinese output
python scripts/main.py --image.png --type scatter --language zh
```

## Legend Structure

Generated legends follow academic standards:

1. **Figure Number** - Sequential numbering
2. **Brief Title** - Concise description
3. **Main Description** - What the figure shows
4. **Data Details** - Key statistics/measurements
5. **Methodology** - Brief experimental context
6. **Statistics** - P-values, significance markers
7. **Scale Bars** - For microscopy images

## Technical Notes

- **Difficulty**: Low
- **Dependencies**: PIL, pytesseract (optional OCR)
- **Processing**: Vision analysis for chart type detection
- **Output**: Structured markdown by default

## References

- `references/legend_templates.md` - Templates by chart type
- `references/academic_style_guide.md` - Formatting guidelines

## Risk Assessment

| Risk Indicator | Assessment | Level |
|----------------|------------|-------|
| Code Execution | Python scripts with tools | High |
| Network Access | External API calls | High |
| File System Access | Read/write data | Medium |
| Instruction Tampering | Standard prompt guidelines | Low |
| Data Exposure | Data handled securely | Medium |

## Security Checklist

- [ ] No hardcoded credentials or API keys
- [ ] No unauthorized file system access (../)
- [ ] Output does not expose sensitive information
- [ ] Prompt injection protections in place
- [ ] API requests use HTTPS only
- [ ] Input validated against allowed patterns
- [ ] API timeout and retry mechanisms implemented
- [ ] Output directory restricted to workspace
- [ ] Script execution in sandboxed environment
- [ ] Error messages sanitized (no internal paths exposed)
- [ ] Dependencies audited
- [ ] No exposure of internal service architecture
## Prerequisites

```bash
# Python dependencies
pip install -r requirements.txt
```

## Evaluation Criteria

### Success Metrics
- [ ] Successfully executes main functionality
- [ ] Output meets quality standards
- [ ] Handles edge cases gracefully
- [ ] Performance is acceptable

### Test Cases
1. **Basic Functionality**: Standard input → Expected output
2. **Edge Case**: Invalid input → Graceful error handling
3. **Performance**: Large dataset → Acceptable processing time

## Lifecycle Status

- **Current Stage**: Draft
- **Next Review Date**: 2026-03-06
- **Known Issues**: None
- **Planned Improvements**: 
  - Performance optimization
  - Additional feature support

Files in this skill

  • SKILL.md3.8 KB
  • references/academic_style_guide.md2.2 KB
  • references/legend_templates.md2.5 KB
  • requirements.txt17 B
  • scripts/main.py10.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…