Claude.ai ChatGPT NBME-uWorld Question Analysis Prompt & Paste

chat.openai.com and Claude.ai script to prepend a prompt to the text on the clipboard.

目前為 2023-08-24 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Claude.ai ChatGPT NBME-uWorld Question Analysis Prompt & Paste
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  chat.openai.com and Claude.ai script to prepend a prompt to the text on the clipboard.
// @author       bwhurd
// @match        https://chat.openai.com/*
// @match        https://claude.ai/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const loadCSS = (href) => {
        let link = document.createElement("link");
        link.href = href;
        link.rel = "stylesheet";
        document.head.appendChild(link);
    };

    loadCSS("https://fonts.googleapis.com/icon?family=Material+Icons");
    loadCSS("https://fonts.googleapis.com/icon?family=Material+Icons+Outlined");

    function createButton(icon, onClick, tooltipText, id) {
        const button = document.createElement('button');
        button.style.cssText = "width: 20px; height: 20px; border: none; background: none; color: var(--text-secondary); margin-right: 16px; cursor: pointer;";
        button.innerHTML = icon;
        button.addEventListener('click', onClick);
        button.id = id;

        button.addEventListener('mouseenter', () => {
            button.style.color = "#AB68FD";
        });

        button.addEventListener('mouseleave', () => {
            button.style.color = "var(--text-secondary)";
        });

        if (tooltipText) {
            addTooltip(button, tooltipText);
        }

        return button;
    }

    function showToast(message) {
        const toast = document.createElement('div');
        toast.style.cssText = "position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); padding: 16px; background-color: #333; color: #FFF; border-radius: 4px; max-width: 90%; text-align: center; z-index: 1000; font-size: 14px; opacity: 1; transition: opacity 0.5s ease; box-shadow: 0px 2px 4px -1px rgba(0,0,0,0.2), 0px 4px 5px 0px rgba(0,0,0,0.14), 0px 1px 10px 0px rgba(0,0,0,0.12);";
        toast.innerText = message;
        document.body.appendChild(toast);
        setTimeout(() => {
            toast.style.opacity = '0';
        }, 3000);
        setTimeout(() => {
            document.body.removeChild(toast);
        }, 3500);
    }

    function addTooltip(element, tooltipText) {
        const tooltip = document.createElement('div');
        tooltip.innerText = tooltipText;
        tooltip.style.cssText = "position: absolute; bottom: 50%; right: 100%; transform: translateX(-10px) translateY(50%); margin-right: 10px; background-color: #2A2B32; color: #ECECF1; border-radius: 5px; padding: 5px; font-size: 12px; text-align: center; white-space: nowrap; visibility: hidden; opacity: 0; transition: opacity 0.3s";
        element.appendChild(tooltip);
        element.addEventListener('mouseenter', () => {
            tooltip.style.visibility = 'visible';
            tooltip.style.opacity = '1';
        });
        element.addEventListener('mouseleave', () => {
            tooltip.style.visibility = 'hidden';
            tooltip.style.opacity = '0';
        });
    }

    // Create vignettePrompt button using the createButton function
    const vignettePromptButton = createButton('<span class="material-icons-outlined">school</span>', function() {
        // Your button logic here
        showToast("Text copied!");
    }, "Click to modify clipboard", "vignettePrompt");

    document.body.appendChild(vignettePromptButton);

    // Click event for the button
    vignettePromptButton.onclick = function() {
        const prependText = `Respond to this prompt afresh, ignoring previous prompts and responses. Use the example inside the <example></example> XML tags below to guide and format your response. Ensure the hierarchical outline has indents and line breaks and reduces the word count by about 75% while omitting as few details as possible. Follow the example closely to explain how to understand the vignette text inside the <text></text> XML tags to reach the correct answer. Be sure there are no repetitive parts of your response, and if so, simply omit that repeated part of the response leaving that section brief. Follow the example closely to explain how to understand “Your Vignette” in the text inside the <text></text> so a medical student can understand how to reach the correct answer. Do not include any instruction from the example that is enclosed in parenthesis in your response, as the text in parenthesis in the example is additional instruction to guide your response.

<example>
H:
'A 2-month-old boy is brought to the clinic for irritability, poor feeding, and frequent vomiting. Weight is at the 15th percentile, and head circumference is at the 96th percentile. Lung sounds are clear throughout, and heart auscultation reveals no murmurs. The abdomen is soft and nondistended. There is hepatosplenomegaly. Diffusely reduced muscle tone is present in all extremities. Funduscopy reveals white-yellow chorioretinal lesions in both eyes. MRI of the brain shows enlarged ventricles and scattered intracranial calcifications. Which of the following is the most likely cause of this patient's condition?
A. Chromosomal abnormality
B. Intrapartum infection
C. In utero infection
D. Postpartum infection
E. Single gene defect

Correct Answer: 'C. In utero infection'

(text enclosed in parenthesis is instruction for you and should not be included in response)

A:
I. Restated Question  (all key clues from the vignette should be included in the restated question, and the question should ask the same question that makes sense with the original answer choice, and the correct answer should follow immediately with the preceding letter omitted but use identical wording as original text otherwise. the answer, which is 'In utero infection' here, should immediately follow the question mark using the exact wording as the original answer.):
What is the underlying condition in a 2-month-old boy presenting with irritability, poor feeding, vomiting, hepatosplenomegaly, reduced muscle tone, chorioretinal lesions, enlarged ventricles, and intracranial calcifications? In utero infection

II. To reach answer, you must understand (give details of key concept in 40 words or less, avoid repetition from prior sections):
• Recognize increased head circumference and enlarged ventricles indicate increased intracranial pressure.
• Chorioretinal lesions, intracranial calcifications, and hepatosplenomegaly are signs of systemic infection.
• The presentation in a 2-month-old suggests an in utero, rather than postpartum, infection.

III. Explanation of Why Clues Point to Answer (Using no more than 10 to 80 words, use arrows ➞ and a numbered list to encapsulate the pathophysiology and underlying physiology that explains the chain of events leading to the clinically relevant finding most suggestive of the correct answer. Explain in a way that is helpful to understand the presentation, and be sure your response is explained concisely in a stepwise manner so I can understand the physiologic underpinnings of the disease process):
1. In utero TORCH infection ➞ triggers chronic CNS inflammation ➞ brain tissue damage ➞ calcium deposition in necrotic tissue ➞ forms intracranial calcifications.

2. Brain tissue swelling obstructs drainage of CSF ➞ ventriculomegaly ➞ hydrocephalus

3. Choroid and retinal inflammation ➞ scarring visible as white-yellow spots on retinal exam

4. TORCH pathogens ➞ fetal immune response ➞ energy and nutrients for normal growth diverted to immune response ➞ growth restriction

IV. Vignette Key Clues (Use a table to present this section, with the left column containing the pulled quote and the right column containing the explanation. After each clue include 5-12 word explanation of why specifically the disease process causes the symptom or finding; omit obvious or self-evident explanations and do not include this if not needed. Only include key clues used to reach correct answer, use 40 words or less providing unique details of symptoms or findings using the descriptive language (more general) often favored by NBME and USMLE in vignettes, and be sure to avoid repetition from prior sections):
"Examination of the back of the eye reveals white-yellow lesions in both eyes.":
toxoplasmosis has propensity for retina ➞ inflammation ➞ chorioretinitis appears as white-yellow lesions

"Imaging of the brain shows enlarged ventricles.": inflammation of brain tissue ➞ csf obstruction ➞ ventricular enlargement ➞ hydrocephalus

"Brain imaging reveals scattered dense, white spots within the brain tissue":
Chronic inflammation ➞ scarring ➞ brain calcifications appear as white spots on imaging
</example>

Your Vignette:
<text>`;

        // Try to get the current clipboard content
        navigator.clipboard.readText().then(clipText => {
            // Modify the clipboard content
            navigator.clipboard.writeText(prependText + clipText + `</text>`);
        });
    };

})(); // Closing brace for IIFE

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址