# Flan Instruction Prompt Formatter

> Render FLAN-style direct, few-shot, and chain-of-thought instruction prompt/completion pairs without leaking hidden answers into prompts.

- Skill: `yzj623/flan-instruction-prompt-formatter` (Agent Skill)
- Install (CLI): `npx get-skill add yzj623/flan-instruction-prompt-formatter`
- Raw SKILL.md: https://api.skillmd.com/api/skills/yzj623/flan-instruction-prompt-formatter/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: yzj623 (https://skillmd.com/u/yzj623)
- Updated: 2026-11-19
- Page: https://skillmd.com/skills/yzj623/flan-instruction-prompt-formatter

---


# FLAN Instruction Prompt Formatter

Use this skill after mixture construction to format examples for instruction finetuning or held-out evaluation.

## Inputs

- Examples with `instruction`, `input`, `answer`, and optional `rationale`.
- Mode `direct`, `few_shot`, or `cot`.

## Outputs

- Prompt/completion records and metadata.

## Workflow

1. Build prompts from instruction and input fields.
2. Put target answers only in completions for query examples.
3. Put rationale plus final answer in CoT completions.
4. Record metadata for mechanism checks.

## Validation

Run `python tests/test_prompt_formatter.py`.

## Limitations

Uses compact deterministic templates rather than every original FLAN template.

