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

Written for no agent in particular: nothing here depends on one.

Good fit Use it to design prompt templates, define structured AI outputs, and extract tagged content from text.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aegntic/compound-engineering/xml-tag-structure
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 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/github.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/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for xml-tag-structure

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.00053 $0.00968
Opus 5.5 $0.00021 $0.00387
Sonnet 5.5 $0.00011 $0.00194
Haiku 4.5 $0.00005 $0.00097

Measured 3mo ago against content hash 362aec3df3f4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 3mo 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. 3mo 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 3d ago), licensed MIT. It adds 53 tokens to every session and 968 once invoked, about $0.0002 per session on Opus 5.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

xml-tag-structure compared with skills from other repositories

xml-tag-structure next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
xml-tag-structureaegntic/compound-engineeringSkill23d agoMITA53Claude Code, Codex
gemini-promptingarcobaleno64/agy-plugin-ccSkill18yesterdayMITA31Claude Code
skill-meta-promptnyldn/claude-octopusSkill4.5ktodayMITA19Claude Code
ai-workflow-architectcbrock84/headcountSkill2.6kyesterdayMITA89Claude Code
cloudflare-workers-aisecondsky/claude-skillsSkill2578d agoMITA39Claude Code
chatgpt-cliItamarZand88/CLI-Anything-WEBSkill24921d agoMITA84Claude Code
cortex-prompttonone-ai/tononeSkill843d agoMITA55Claude Code