More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 more

    Figure Contract

    2

    create better scientific figures.

    Free

    Security scanned
    figure-contract

    figure-contract

    Example session with this skill installed

    Audit this bar chart of gene expression. The y-axis starts at 0.5 to show the difference between treatment groups A and B. Sample size is 3 cultures per group.

    • Read your context and instructions
    • Compiled the figure-contract

    The provided chart violates the

    Magnitude promise of the figure contract. By starting the y-axis at 0.5, a small absolute difference is visually exaggerated, violating the principle of proportional ink. Additionally, the chart lacks explicit uncertainty intervals and does not distinguish between individual culture measurements and the group mean.

    Revised Figure Specification

    PromiseRequired Adjustment
    MagnitudeReset y-axis baseline to 0. Use a point-and-interval plot instead of bars to focus on differences.
    EvidenceShow all $n=6$ observations as points; use a larger marker or crossbar for the mean.
    MeaningLabel the y-axis as Log₂ Fold Change (if applicable) or Expression (units).
    ContextAdd a reference line at $y=1$ (or $y=0$ for log-scale) to show the baseline state.
    import matplotlib.pyplot as plt
    from figure_contract import audit_figure, label_n
    
    fig, ax = plt.subplots()
    
    # Use points + error bars instead of truncated bars
    ax.errorbar(['A', 'B'], [mean_a, mean_b], yerr=[sem_a, sem_b], fmt='o', color='black')
    ax.scatter(['A', 'A', 'A', 'B', 'B', 'B'], raw_data, alpha=0.5)
    
    ax.set_ylim(0, None) # Magnitude: start at zero
    ax.set_ylabel('Expression (Units)')
    ax.set_title('Treatment B shows 15% increase over Treatment A')
    
    label_n(ax, n=[3, 3]) # Evidence: explicit n
    audit_figure(fig) 
    plt.show()
    

    Next steps

    1. Replace the bar geometry with ax.errorbar to avoid the "truncated bar" trap.
    2. Explicitly state whether the error bars represent SD, SEM, or 95% CI in the caption.
    3. Run audit_figure(fig) to confirm all axis labels include units.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Scientific figures are often technically correct but visually misleading. Truncated y-axes, hidden sample sizes, and inappropriate color scales lead to unwarranted inferences that compromise research integrity. This skill treats every visualization as a formal contract between the researcher and the reader, enforcing strict rules for magnitude, evidence, and context.

    What it does

    • Enforces proportional ink by ensuring bars and areas always start at zero to prevent magnitude distortion.
    • Validates evidence reporting by requiring clear identification of sample size (n), experimental units, and uncertainty intervals.
    • Standardizes color mapping by matching hue and lightness scales to the specific structure of the variable (categorical, sequential, or diverging).
    • Audits chart selection by mapping specific scientific questions to the most effective visual encodings rather than defaults.
    • Protects data integrity by preventing the joining of independent observations and ensuring missing data is visible rather than ignored.

    How it works

    1. Analyze the raw data structure and the specific scientific comparison required.
    2. Apply the contract rules to determine the optimal chart type, scale transform, and color palette.
    3. Execute the audit_figure(fig) command to check a Matplotlib figure against mechanical requirements like axis labeling and baseline positioning.
    4. Refine the visualization based on a five-point self-review focusing on Magnitude, Meaning, Evidence, Context, and Claim.

    Frameworks & tools

    This skill includes a Python kernel with helper functions like audit_figure, diverging_norm, and label_n. It provides direct implementation mappings for Matplotlib in Python and ggplot2 in R.

    Why this beats prompting it yourself

    Generic prompts often produce aesthetically pleasing charts that violate core principles of graphical perception, such as using radius instead of area for bubbles. This skill codifies specific scientific standards (like Weissgerber and Crameri) into a strict logic gate that prevents common misleading practices.

    Use cases

    • Auditing figures for peer-reviewed journal submissions to ensure statistical transparency.
    • Converting dense exploration plots into high-clarity presentation slides for technical audiences.
    • Standardizing visual language across multiple panels in a complex supplemental data set.

    Known limitations

    Does not automate the creation of complex hierarchical models. Requires the user to manually define the experimental unit when n is not equal to the number of observations.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 11 days ago

    • Free to download with an account

    Listed11 days ago

    What's inside

    Frequently Asked Questions