More screenshots

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Figure Contract

    2

    create better scientific figures.

    Free

    2 uses1.0 (1 review)
    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.

    Requires manual definition of experimental units. Focuses on correctness over aesthetic styling. Best suited for Matplotlib and ggplot2 workflows.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    1.0
    1 review
    5
    0
    4
    0
    3
    0
    2
    0
    1
    1

    This skill has been used 2 times.

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Permissions

    No special permissions declared or detected

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    The skill identifies visual distortions like truncated y-axes, inappropriate color scales, and hidden sample sizes that can lead to false inferences in research data.

    It provides a Python-based kernel with specialized functions like `audit_figure` and `label_n`, designed to work seamlessly within Matplotlib (Python) and ggplot2 (R) workflows.

    You receive the complete logic gate framework, the Python kernel containing the 'audit_figure' utility, and implementation mappings for both Python and R.

    While it excels at auditing existing figures, it works best when used during the creation phase to help you select the most effective visual encoding for your specific data structure.

    Yes, the skill enforces strict standards for 'proportional ink' and evidence reporting, ensuring your figures meet the rigorous transparency requirements of top-tier scientific journals.

    New in Research & Analysis