skills/43-wentorai-research-plugins/skills/domains/ai-ml/prompt-engineering-research/SKILL.md
Systematic prompt engineering methods for AI-assisted academic research workf...
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research prompt-engineering-researchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A skill for applying systematic prompt engineering techniques in academic research contexts. Covers prompt design patterns, evaluation methodologies, and practical workflows for using large language models (LLMs) as research tools.
| Strategy | Description | Best For | Reliability | |----------|------------|---------|-------------| | Zero-shot | Direct instruction, no examples | Simple, well-defined tasks | Moderate | | Few-shot | Include 2-5 examples in prompt | Pattern matching, formatting | High | | Chain-of-thought | "Think step by step" | Reasoning, math, analysis | High | | Role prompting | "You are an expert in..." | Domain-specific tasks | Moderate | | Structured output | Request JSON/YAML/table format | Data extraction | High | | Self-consistency | Sample multiple times, majority vote | Fact-checking, reasoning | Very high |
def create_research_prompt(task_type: str, context: dict) -> str:
"""
Generate a structured prompt for common research tasks.
Args:
task_type: One of 'literature_summary', 'methodology_critique',
'code_review', 'data_interpretation', 'writing_feedback'
context: Dict with task-specific context
"""
templates = {
'literature_summary': """
You are an academic researcher specializing in {domain}.
Summarize the following paper excerpt, focusing on:
1. The research question and its significance
2. The methodology used
3. Key findings and their implications
4. Limitations acknowledged by the authors
5. How this work relates to {related_topic}
Paper excerpt:
{text}
Provide a structured summary in 200-300 words. Distinguish clearly
between what the authors claim and what the evidence supports.
""",
'methodology_critique': """
You are a methods expert reviewing a research design.
Evaluate the following methodology description:
{text}
Assess the following:
1. Internal validity: Are there confounding variables not controlled?
2. External validity: How generalizable are the findings?
3. Statistical approach: Is the analysis appropriate for the data?
4. Sample: Is the sample size adequate? Any selection bias?
5. Reproducibility: Could another researcher replicate this?
For each concern, rate severity (minor/moderate/major) and suggest
a specific improvement.
""",
'data_interpretation': """
You are a statistical consultant helping interpret results.
Given these results:
{results}
Context: {context_description}
Provide:
1. Plain-language interpretation of each result
2. Effect size interpretation (is it practically significant?)
3. Potential alternative explanations
4. Caveats the authors should mention
5. Suggested follow-up analyses
Be precise about what the data does and does not support.
Do not overstate findings.
"""
}
template = templates.get(task_type, templates['literature_summary'])
return template.format(**context)
def research_cot_prompt(question: str, data: str) -> str:
"""
Create a chain-of-thought prompt for complex research analysis.
"""
return f"""
I need to analyze the following research question step by step.
Research Question: {question}
Available Data:
{data}
Please reason through this systematically:
Step 1: Identify the key variables and their relationships
Step 2: Consider what statistical test or analytical approach is appropriate
Step 3: Check assumptions required for this approach
Step 4: Perform the analysis or describe how to perform it
Step 5: Interpret the results in context
Step 6: State limitations and alternative interpretations
Show your reasoning at each step before moving to the next.
If you are uncertain about any step, explicitly state the uncertainty
rather than guessing.
"""
def evaluate_prompt(prompt_template: str, test_cases: list[dict],
expected_outputs: list[str],
model_fn: callable) -> dict:
"""
Systematically evaluate a prompt template's reliability.
Args:
prompt_template: The prompt template with {placeholders}
test_cases: List of dicts with placeholder values
expected_outputs: Expected outputs for each test case
model_fn: Function that takes a prompt string and returns model output
"""
results = []
for case, expected in zip(test_cases, expected_outputs):
prompt = prompt_template.format(**case)
# Run multiple times for consistency check
outputs = [model_fn(prompt) for _ in range(3)]
# Measure consistency (self-agreement)
from difflib import SequenceMatcher
similarities = []
for i in range(len(outputs)):
for j in range(i+1, len(outputs)):
sim = SequenceMatcher(None, outputs[i], outputs[j]).ratio()
similarities.append(sim)
avg_similarity = sum(similarities) / len(similarities) if similarities else 0
results.append({
'test_case': case,
'n_runs': 3,
'consistency': round(avg_similarity, 3),
'outputs': outputs
})
return {
'n_test_cases': len(test_cases),
'avg_consistency': round(
sum(r['consistency'] for r in results) / len(results), 3
),
'results': results,
'reliability': (
'high' if all(r['consistency'] > 0.8 for r in results)
else 'moderate' if all(r['consistency'] > 0.5 for r in results)
else 'low -- prompt needs refinement'
)
}
def screen_paper_relevance(title: str, abstract: str,
inclusion_criteria: list[str],
exclusion_criteria: list[str]) -> str:
"""
Generate a prompt for AI-assisted paper screening in systematic reviews.
"""
return f"""
You are screening papers for a systematic review.
Paper:
Title: {title}
Abstract: {abstract}
Inclusion criteria:
{chr(10).join(f'- {c}' for c in inclusion_criteria)}
Exclusion criteria:
{chr(10).join(f'- {c}' for c in exclusion_criteria)}
Evaluate the paper against each criterion and respond with:
1. INCLUDE, EXCLUDE, or UNCERTAIN
2. Which specific criteria were met or not met
3. Confidence level (high/medium/low)
Important: When uncertain, err on the side of INCLUDE (to be screened
at full-text stage). False exclusions are worse than false inclusions
in systematic review screening.
"""
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.