llm-prompt-optimizer

Rewrite prompts using the RSCIT framework to enforce structured outputs and reduce hallucinations.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/cassioalexandre/agf --skill llm-prompt-optimizer-cassioalexandre
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-prompt-optimizer
Source: https://github.com/cassioalexandre/agf/tree/main/.agents/skills/llm-prompt-optimizer
Command: npx skills add https://github.com/cassioalexandre/agf --skill llm-prompt-optimizer-cassioalexandre

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill fixes weak, inconsistent, or hallucination-prone prompts by rewriting them into clear, structured instructions that improve output quality and reduce token waste.

Core Features & Use Cases

  • RSCIT Prompt Framework: Rebuilds prompts with explicit Role, Situation, Constraints, Instructions, and Output Template to improve consistency.
  • Hallucination & Uncertainty Guardrails: Adds context-only answering patterns to reduce made-up details.
  • Reliable Output Shaping: Enforces structured formats (including JSON-only responses) to make results machine-parseable.
  • Token Efficiency Techniques: Uses compression patterns and tighter wording to cut unnecessary length while preserving effectiveness.

Quick Start

Ask the AI to optimize your prompt by applying the RSCIT framework and enforcing your required output format and hallucination safeguards.

Frequently Asked Questions about llm-prompt-optimizer

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

FAQPage Schema
How do I reduce LLM hallucination and get more reliable outputs from my prompts?

To reduce LLM hallucination, prompts are restructured using the RSCIT framework and context-only answering constraints, ensuring the model relies strictly on provided information. This approach forces explicit instructions and role definitions to minimize fabricated details.

What is the best way to format LLM prompts for structured JSON outputs?

The best way to format LLM prompts for structured JSON outputs is to apply explicit output formatting rules and a defined output template within the prompt. This enforces machine-parseable responses and prevents the model from deviating from the required structure.

How can I improve token efficiency without losing output quality?

Token efficiency is improved by applying prompt compression patterns and tighter wording to cut unnecessary length. This technique reduces token usage while preserving the effectiveness of the core instructions and output quality.

Can I use optimized prompts across different LLM providers?

Yes, optimized prompts support cross-model prompt portability across different LLM providers. By enforcing a clear instruction hierarchy and structured formatting, the rewritten prompts maintain consistent behavior regardless of the underlying model.

How do few-shot examples improve prompt engineering for complex problems?

Few-shot examples improve prompt engineering by providing the LLM with specific reference instances within the prompt structure. This optional technique enhances reasoning for complex problems and guides the model toward the desired output pattern.

What is the RSCIT pattern for prompt engineering?

The RSCIT pattern for prompt engineering is a framework that rebuilds prompts using Role, Situation, Constraints, Instructions, and Template. This structure creates a clear instruction hierarchy to improve output consistency and reliability.