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.
git clone --depth 1 https://github.com/bl1nk-bot/bl1nk-agents-managerWrote 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.
[](https://agentmods.dev/agents/bl1nk-bot/bl1nk-agents-manager/prompt-template-system)<a href="https://agentmods.dev/agents/bl1nk-bot/bl1nk-agents-manager/prompt-template-system"><img src="https://agentmods.dev/badge/agents/bl1nk-bot/bl1nk-agents-manager/prompt-template-system/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.
<a href="https://agentmods.dev/agents/bl1nk-bot/bl1nk-agents-manager/prompt-template-system"><img src="https://agentmods.dev/badge/agents/bl1nk-bot/bl1nk-agents-manager/prompt-template-system.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00020 | $0.00946 |
| Opus 5 | $0.00010 | $0.00473 |
| Sonnet 5 | $0.00004 | $0.00189 |
| Haiku 4.5 | $0.00002 | $0.00095 |
Grade A, and why
prompt-template-system 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 11d ago.
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.
What it actually says
TASK
[คำสั่งงาน]
User: "{user_input}" Assistant: """
3. **อัปเดต templates dictionary:**
```python
self.templates = {
PromptType.SCENE_ARCHITECT: self._get_scene_architect_prompt(),
# เพิ่มใหม่ที่นี่
PromptType.NEW_TEMPLATE: self._get_new_prompt_template(),
}
```text
## Context Injection Rules
### การใช้ Context Manager
```python
from src.core.context_manager import context_manager
from src.core.prompt_templates import prompt_template_manager, PromptType, PromptContext
# สร้าง context
context = context_manager.get_context_for_prompt(user_id="user123")
# สร้าง prompt
prompt = prompt_template_manager.get_prompt(
PromptType.SCENE_ARCHITECT,
context=context
)
```text
### Context Placeholders ที่ใช้ได้
- `{STORY_CONTEXT}` - ข้อมูลเรื่องราว "Bound Fate"
- `{PROJECT_STATUS}` - สถานะโปรเจกต์
- `{USER_PREFERENCES}` - ความชอบของผู้ใช้
- `{AVAILABLE_TOOLS}` - เครื่องมือที่ใช้ได้
- `{ERROR_CONTEXT}` - บริบทข้อผิดพลาด
## Model Routing Rules
### การใช้ Model Router
```python
from src.core.model_router import model_router
# Route request
model_name, task_category, model_tier = await model_router.route_request(
user_input="ช่วยเขียนฉากต่อสู้",
user_preferences=user_prefs
)
```text
### Task Categories
- `SIMPLE_QA` - คำถามง่ายๆ
- `TOOL_USE` - ใช้เครื่องมือ
- `COMPLEX_REASONING` - การคิดวิเคราะห์ซับซ้อน
- `CODE_GENERATION` - สร้างโค้ด
- `CREATIVE_WRITING` - เขียนสร้างสรรค์
- `AMBIGUOUS` - ไม่แน่ชัด
### Model Tiers
- `LOCAL` - โมเดลในเครื่อง (0 cost)
- `FAST_CLOUD` - โมเดลเร็ว (ต้นทุนต่ำ)
- `SMART_CLOUD` - โมเดลฉลาด (ต้นทุนสูง)
## การทดสอบ Prompt Templates
### สร้างไฟล์ทดสอบ
```python
# test_prompt_templates.py
async def test_scene_architect():
context = context_manager.get_context_for_prompt()
prompt = prompt_template_manager.get_prompt(
PromptType.SCENE_ARCHITECT,
context=context
)
# ทดสอบ prompt
```text
### การตรวจสอบ Context Injection
- ตรวจสอบว่า placeholders ถูกแทนที่
- ตรวจสอบ JSON format
- ตรวจสอบ encoding (ensure_ascii=False)
## การอัปเดต Context
### อัปเดต Story Context
```python
context_manager.update_story_context(
context_type="characters",
context_data={
"new_character": {
"name": "Erik",
"role": "Mercenary",
"personality": "Pragmatic"
}
}
)
```text
### อัปเดต Project Status
```python
context_manager.update_project_status(
component="prompt_templates",
status="active",
details={
"templates_available": 7,
"context_injection": "working"
}
)
Best Practices
การเขียน Prompt Template
- ชัดเจนและเฉพาะเจาะจง
- ใช้ placeholders สำหรับ context
- ระบุ output format ที่ต้องการ
- ให้ตัวอย่างการใช้งาน
การจัดการ Context
- อัปเดต context ทันทีเมื่อมีการเปลี่ยนแปลง
- ใช้ JSON format สำหรับ structured data
- บันทึกใน database สำหรับ persistence
- ใช้ in-memory cache สำหรับ performance
การเลือก Model
- วิเคราะห์ task complexity ก่อน
- พิจารณา cost optimization
- เคารพ user preferences
- มี fallback mechanism description: globs: alwaysApply: true
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.
- 11d ago First seen · 159 lines · 20 tokens per session scan A a6ba1c3acc9b
prompt-template-system is an agent published in the GitHub repository bl1nk-bot/bl1nk-agents-manager (8 stars, last pushed 1mo ago), licensed MIT. It adds 20 tokens to every session and 946 once invoked, about $0.0001 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.
Other agents, from other repositories
prompt-engineer
Author and adapt prompts — discover, draft, deliver — under HITL approvals. Full subagent.
prompt-engineer
Optimizes prompts for LLMs and AI systems. Use when building AI features, improving agent performance, or crafting system prompts. Expert in prompt patterns and techniques.
ai-engineer
Build LLM applications, RAG systems, and prompt pipelines. Implements vector search, agent orchestration, and AI API integrations. Use PROACTIVELY for LLM features, chatbots, or AI-powered applications.
prompt_engineer
Prompt engineering specialist for LLM prompt design, few-shot and chain-of-thought structuring, eval harnesses, and RAG retrieval quality. Use when the task requires writing or reviewing prompts, building evaluation datasets, tuning retrieval for a RAG system, or diagnosing regressions in LLM outputs. For example…
Agent Prompt: Prompt Suggestion Generator v2
V2 instructions for generating prompt suggestions for Claude Code.
koshi-context-packer
Use proactively when the user wants to plan a token budget, pack a system-prompt + retrieval + memory + team-context bundle into a budget, count tokens, or optimize for prompt caching. May read from retrieval and memory tools to assemble content. Does NOT index, store memories, or score teams.