prompt-optimizer

Optimize text classification prompts through iterative refinement and performance metrics.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/nealcaren/sociology-skillset --skill prompt-optimizer-nealcaren
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prompt-optimizer
Source: https://github.com/nealcaren/sociology-skillset/tree/main/plugins/sociology-skillset/skills/prompt-optimizer
Command: npx skills add https://github.com/nealcaren/sociology-skillset --skill prompt-optimizer-nealcaren

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps researchers systematically improve the wording and structure of prompts for text classification tasks, reducing misclassification and accelerating development of production-grade classification prompts.

Core Features & Use Cases

  • Grounded, phase-driven prompt design for both single-dimension and multi-dimension classification workflows.
  • Immersion-based label grounding: seed definitions anchored in real text patterns, with error-driven refinement and focused re-immersion when needed.
  • Robust evaluation framework: dev/test splits, macro-F1 and per-class metrics, and diagnostic tools (confusion matrix) to guide improvements.
  • Diversity and deployment focus: explore multiple prompt architectures, then merge strongest elements into production-ready prompts and code.
  • Comprehensive outputs: final prompts, structured documentation (prompt cards, method narratives), and deployment-ready batch processing templates in Python and R.

Quick Start

Start by running a seed prompt against your labeled sample texts to initiate iterative improvement.

Frequently Asked Questions about prompt-optimizer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize prompts for text classification tasks?▼

You can optimize text classification prompts by running a seed prompt against labeled sample texts to initiate iterative, phase-driven improvements. The workflow refines label definitions anchored in real text patterns to reduce misclassification and generate production-grade prompts.

What is the best way to evaluate LLM prompt performance for predefined categories?▼

Evaluating LLM prompt performance involves using dev/test splits, macro-F1 scores, per-class metrics, and diagnostic confusion matrices. This phase-driven evaluation framework guides targeted improvements and helps identify specific classification errors across dimensions.

Can I use this prompt optimization workflow for multi-dimension text classification?▼

Yes, this prompt optimization workflow supports multi-dimension text classification. It provides per-dimension optimization and phase-driven diagnostics, allowing you to systematically refine prompts across multiple predefined categories simultaneously.

How do I reduce misclassification errors when designing LLM classification prompts?▼

To reduce misclassification errors, the workflow uses immersion-based label grounding with error-driven refinement and focused re-immersion. This approach anchors label definitions in real text patterns and iteratively improves them based on diagnostic feedback.

What deployment code formats are generated for optimized text classification prompts?▼

The workflow generates deployment-ready batch processing templates in Python and R. These outputs include the final optimized prompt text, performance metrics, and structured documentation like prompt cards and method narratives for immediate integration.