llm-prompt-template-override

Inject external document context into LLM worker prompt templates via XML-tagged placeholder replacement.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/transreal/claudecode --skill llm-prompt-template-override
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llm-prompt-template-override
Source: https://github.com/transreal/claudecode/tree/main/Claude%20Directives/skills/llm-prompt-template-override
Command: npx skills add https://github.com/transreal/claudecode --skill llm-prompt-template-override

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It prevents prompt-template injection from causing the LLM to wrongly treat provided documents as non-dependency reference material, which can lead to missing or hallucinated answers.

Core Features & Use Cases

  • Dependency-aligned document injection: Wraps injected content in XML tags that align with the host template’s notion of dependencies/artifacts.
  • Template-aware placeholder replacement: Uses StringReplace-style substitution to replace the host template’s empty-dependency literal (including Japanese/English variants) with the injected attached-documents section.
  • Two-step fallback behavior: Falls back to safe prepend injection when placeholder replacement is unavailable or when dependency artifacts are already present.
  • Instruction/intent signaling: Embeds explicit intent via HTML comments and structured document indexing to improve citation-like referencing and reduce response distortion.

Quick Start

Ask your system to inject external notes into the worker prompt by replacing the host template’s dependency placeholder with an <attached-documents> block, using a prepend-only fallback if the placeholder literal cannot be found.

Frequently Asked Questions about llm-prompt-template-override

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

FAQPage Schema
How do I inject external document context into an LLM prompt template without breaking dependencies?

To inject external document context without breaking dependencies, wrap the injected content in XML tags that align with the host template's dependency sections. This ensures the LLM treats the provided documents as valid dependencies rather than non-dependency reference material.

Why does my LLM worker ignore injected documents and hallucinate answers in orchestrated flows?

An LLM worker ignores injected documents and hallucinates when the prompt template lacks explicit dependency alignment. Applying deterministic placeholder StringReplace substitution wraps context correctly, preventing the no dependency provided misinterpretation.

Can I use StringReplace to substitute language-specific placeholders in prompt templates?

Yes, you can use StringReplace to substitute language-specific placeholders in prompt templates. This approach supports replacing empty-dependency literals including Japanese and English variants with an attached-documents block for reliable context injection.

What is the best way to handle prompt injection when the dependency placeholder is missing?

The best way to handle prompt injection when the dependency placeholder is missing is using a two-step fallback behavior. If placeholder replacement is unavailable or artifacts already exist, the system safely prepends the injected context.

How do I reduce response distortion when adding external notes to ClaudeOrchestrator workers?

To reduce response distortion when adding external notes to ClaudeOrchestrator workers, embed explicit intent via HTML comments and structured document indexing. This instruction signaling improves citation-like referencing within the prompt template.

Does prompt templating work with bilingual label matching for context injection?

Yes, prompt templating works with bilingual label matching for context injection. The template-aware replacement strategy satisfies requirements for matching both Japanese and English dependency literal placeholders during the StringReplace substitution process.