xml-tag-structure

xml-tag-structure is a skill for Claude Code, Codex from aegntic/compound-engineering. It costs 53 tokens per session (968 once invoked), scanned A, original, MIT.

A guide and parsing tool for using XML-like tags to organize instructions, data, and results in AI prompts and agent messages. It also covers nested, incomplete, or malformed tags.

In plain words
What is it for?
Use it to design prompt templates, define structured AI outputs, and extract tagged content from text.
Why use it?
It helps keep instructions separate from data and makes structured text easier to read and extract reliably.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/aegntic/compound-engineering/xml-tag-structure
Any agent
npx skills add aegntic/compound-engineering --skill xml-tag-structure
Clone the repo
git clone --depth 1 https://github.com/aegntic/compound-engineering

Made for: Claude Code, Codex.

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 xml-tag-structure

README.md
[![agentmods](https://agentmods.dev/badge/skills/aegntic/compound-engineering/xml-tag-structure.svg)](https://agentmods.dev/skills/aegntic/compound-engineering/xml-tag-structure)
Your own site
<a href="https://agentmods.dev/skills/aegntic/compound-engineering/xml-tag-structure"><img src="https://agentmods.dev/badge/skills/aegntic/compound-engineering/xml-tag-structure.svg" alt="Measured on agentmods" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 968 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00053 $0.00968
Opus 5 $0.00026 $0.00484
Sonnet 5 $0.00011 $0.00194
Haiku 4.5 $0.00005 $0.00097

Measured 4d ago against content hash 362aec3df3f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

xml-tag-structure 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 4d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/parse_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.

skills/xml-tag-structure/SKILL.md · 113 lines

How it starts

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

XML Tag Structure

Overview

This skill provides guidelines and tools for utilizing XML-like tags to structure prompts, format LLM output payloads, and robustly parse structured text data. It helps maintain clear delimiters for instruction blocks and data boundaries, even when dealing with malformed or truncated text.

File Tree

xml-tag-structure/
├── SKILL.md                     # This file. Skill definition and workflow guide.
├── references/
│   └── xml-guidelines.md        # Comprehensive best-practices reference for XML tags.
└── scripts/
    └── parse_xml.py             # CLI tool for extracting tag contents from text.

Workflow Decision Tree

To handle XML tags in LLM workflows, follow this process:

  1. Structuring Prompts: Wrap instructions, context, input variables, and output schemas in clean, snake_case XML tags.
  2. Structuring Outputs: Define specific tags for the model to output, using CDATA sections for nested code or raw markup blocks.
  3. Parsing Output Payloads: Run robust parsing logic to extract tags, handling potentially truncated responses and malformed markup.

1. Structuring Prompts

When designing system prompts, wrap different types of information in explicit tags. This helps the LLM distinguish instruction from context or user input, preventing prompt injection and instructions leakage.

Standard Tag Categories

  • <system_instructions>: Define the agent's identity, rules, and core directives.
  • <context>: Provide background information, schemas, file contexts, or system state.
  • <examples>: Enclose few-shot examples (each inside <example>).
  • <user_input>: Enclose the current input or request to process.

Rules for Prompt Tags

  • Use snake_case or kebab-case for tag names (e.g., <file_content> or <file-content>).
  • Keep tag names descriptive and singular/plural consistent (e.g., <item> inside <items>).
  • Avoid mixing tags with standard markup or styling unless explicitly wrapping inline values.

Read the full file on GitHub · 113 lines

Files

What ships with it

2 files 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. 4d ago First seen · 113 lines · 53 tokens per session scan A 362aec3df3f4

Subscribe to this mod's changes

xml-tag-structure is a skill published in the GitHub repository aegntic/compound-engineering (2 stars, last pushed 2mo ago), licensed MIT. It adds 53 tokens to every session and 968 once invoked, about $0.0003 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-31.

Related

Other skills, from other repositories

methodology

Analyzes captured HTTP traffic, designs the CLI architecture, and implements the Python CLI package (Phase 2): parse raw-traffic.json, identify the protocol, write api-spec.json, scaffold from templates, and implement endpoint methods and Click command groups. Use after a capture completes and raw-traffic.json exists.

ItamarZand88/CLI-Anything-WEB · 65 tokens

sync-check

Walks the documentation dependency web after a CLI code change and reports which downstream files (skills, SOPs, READMEs, plugin references) are out of sync. Use after fixing a bug, adding a command, changing auth behavior, refactoring, or before committing — and when the user says "sync check", "update docs"…

ItamarZand88/CLI-Anything-WEB · 95 tokens

boilerplate

Documents the template inventory and variable contract behind scaffold-cli.py — which Jinja2 template renders with which variables for each site profile. Use during Phase 2 scaffolding when choosing scaffold flags or understanding what the generated boilerplate contains. The scaffold-cli.py script is the primary path.

ItamarZand88/CLI-Anything-WEB · 60 tokens

airbnb-cli

Use cli-web-airbnb to search Airbnb stays, get listing details, check availability calendars, read guest reviews, and look up location suggestions. Invoke this skill whenever the user asks about Airbnb accommodations, vacation rentals, listing prices, availability, guest reviews, or wants to search for places to stay.…

ItamarZand88/CLI-Anything-WEB · 76 tokens

gap-analyzer

Compares a CLI's implemented commands against its APP.md API map and traffic-analysis.json to find missing endpoints, incomplete CRUD, dead client methods, and priority gaps. Runs as the mandatory first step of /cli-anything-web:refine and as an optional pre-review scan in standards.

ItamarZand88/CLI-Anything-WEB · 62 tokens

airbnb-cli

Searches Airbnb from the terminal via cli-web-airbnb — find stays by location, dates, and filters; get listing details, guest reviews, and availability calendars; autocomplete location names. Use when the user asks about Airbnb, vacation rentals, listing prices, availability, or finding places to stay. Prefer…

ItamarZand88/CLI-Anything-WEB · 78 tokens