ai_instruction_formatting

ai_instruction_formatting is a skill for Claude Code, Codex from theafh/ai-modules. It costs 142 tokens per session (4,389 once invoked), scanned A, original, MIT.

A way to organize instructions for AI systems by wrapping each topic in clearly named tags, similar to lightweight XML. It applies to prompts, rules, skills, commands, and agent definitions.

In plain words
What is it for?
It helps structure AI instructions, separate roles and rules from inputs and outputs, and check instruction files for the required format.
Why use it?
It makes long or mixed instructions easier for an AI to identify and follow. A supplied checker can also verify whether the expected structure is used.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions CLAUDE.md; mentions subagents; mentions AGENTS.md.

Part of the ai_dev plugin — 24 skills, 5 agents, 1 hook shipped together

Good fit It helps structure AI instructions, separate roles and rules from inputs and outputs, and check instruction files for the required format.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/theafh/ai-modules/ai_instruction_formatting
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add theafh/ai-modules --skill ai_instruction_formatting
Clone the repo
git clone --depth 1 https://github.com/theafh/ai-modules

Made for: Claude Code, Codex.

Or install ai_dev, the plugin that ships this one along with the rest of its 24 skills, 5 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ai_instruction_formatting

README.md
[![agentmods](https://agentmods.dev/badge/skills/theafh/ai-modules/ai_instruction_formatting.svg)](https://agentmods.dev/skills/theafh/ai-modules/ai_instruction_formatting)
Your own site
<a href="https://agentmods.dev/skills/theafh/ai-modules/ai_instruction_formatting"><img src="https://agentmods.dev/badge/skills/theafh/ai-modules/ai_instruction_formatting.svg" alt="Measured on agentmods" height="20"></a>
Per session 142 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,389 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00142 $0.04389
Opus 5 $0.00071 $0.02194
Sonnet 5 $0.00028 $0.00878
Haiku 4.5 $0.00014 $0.00439

Measured yesterday against content hash 492085ec51e6, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

ai_instruction_formatting scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/lint_pseudo_xml.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ai_dev/skills/ai_instruction_formatting/SKILL.md · 280 lines

How it starts

The opening of the file, as written. The whole thing — 280 lines — stays where its author put it; the contents beside it link to each section on GitHub.

ai_instruction_formatting

Organize any LLM-consumed content into pseudo-XML, a lightweight tagging format where self-describing tag names encode the semantic role and organizational structure of information. Tags exist purely to label meaning (e.g., <policy>, <scoring_criteria>, <after_spec_execution>); they carry plain text inside and work directly as LLM-readable structure. Apply to system prompts, rules, skills, commands, agent definitions, instruction sets, and any other artifact an LLM reads at inference time.

When to Apply

Use pseudo-XML structuring for any document where an LLM is the primary consumer: prompt templates with placeholders, static rule files, skill definitions, agent personas, routing instructions, and multi-step workflows. Apply the format equally to parameterized templates (with {placeholder} values) and fixed instructional content.

File Shape

A pseudo-XML artifact lives inside a host file: a SKILL.md, an agent definition, a command file, a rules document, or a snippet. Four document shapes are valid, and this skill's bundled linter (scripts/lint_pseudo_xml.py) recognizes all four:

Shape Where it appears Body content
Prose-only markdown Writing and formatting skills Markdown sections, no pseudo-XML in the body
XML-instruction body Self-contained instruction skills A single root pseudo-XML element spans the entire body after the H1
Tutorial with examples Documentation pages explaining the format Markdown prose with pseudo-XML inside ```xml fenced examples
Mixed-agent Agent definitions Multiple top-level pseudo-XML wrappers (<role>, <objective>, <protocol>...) interspersed with markdown prose

Whenever the host file is a SKILL.md or agent definition, keep the YAML frontmatter and the H1 heading regardless of body shape: the frontmatter name: matches the directory name, and the H1 matches name:. The XML rules below apply to whichever pseudo-XML the file contains; prose-only files skip them entirely.

Read the full file on GitHub · 280 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +92 tokens per session 492085ec51e6
  2. 8d ago First seen · 280 lines · 50 tokens per session scan A 2fda2167230b

Subscribe to this mod's changes

ai_instruction_formatting is a skill published in the GitHub repository theafh/ai-modules (38 stars, last pushed today), licensed MIT. It adds 142 tokens to every session and 4,389 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

llm-app-patterns

Production-ready patterns for building LLM applications. Covers RAG pipelines, agent architectures, prompt IDEs, and LLMOps monitoring. Use when designing AI applications, implementing RAG, building agents, or setting up LLM observability.

davila7/claude-code-templates · 54 tokens

prompt-optimization

Improve a prompt on the evaluations workbench through a measured loop. Score the baseline first, then duplicate the target column, form a hypothesis from failing rows, edit the copy's prompt draft, run, compare pass rate and cost, and repeat until the numbers hold. Use when the user asks to optimize or improve a…

langwatch/langwatch · 105 tokens

enhance-prompt

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

google-labs-code/stitch-skills · 41 tokens

prompt-engineer

Writes, refactors, and evaluates prompts for LLMs — generating optimized prompt templates, structured output schemas, evaluation rubrics, and test suites. Use when designing prompts for new LLM applications, refactoring existing prompts for better accuracy or token efficiency, implementing chain-of-thought or few-shot…

Jeffallan/claude-skills · 93 tokens

seedance-vocab-en

This skill should be used when an English Seedance 2.0 prompt is slop-heavy, generic, padded with empty quality words, tripping false-positive filters, or needs precise English production vocabulary for camera, lighting, motion, VFX, audio, and constraints.

Emily2040/seedance-2.0 · 61 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens