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.
npx agentmods add commands/dewtech-technologies/dare-method/dare-llm-integrationgit clone --depth 1 https://github.com/dewtech-technologies/dare-methodWrote 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/commands/dewtech-technologies/dare-method/dare-llm-integration)<a href="https://agentmods.dev/commands/dewtech-technologies/dare-method/dare-llm-integration"><img src="https://agentmods.dev/badge/commands/dewtech-technologies/dare-method/dare-llm-integration.svg" alt="Measured on agentmods" 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.00000 | $0.01056 |
| Opus 5 | $0.00000 | $0.00528 |
| Sonnet 5 | $0.00000 | $0.00211 |
| Haiku 4.5 | $0.00000 | $0.00106 |
Grade A, and why
dare-llm-integration 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 2d 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.
How it starts
The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/dare-llm-integration
Integração segura e eficiente com LLMs (Gemini, Claude, OpenAI, Ollama) em projetos DARE.
Como usar
/dare-llm-integration # audita uso de LLM no projeto
/dare-llm-integration scaffold # gera LLMProvider + cache + rate limit
/dare-llm-integration prompts # extrai prompts inline para arquivos versionados
Os 5 pilares
1. LLMProvider abstraction
Nunca chame SDK do Gemini/OpenAI direto em Handler ou Service de negócio. Sempre via interface LLMProvider.
2. Cache TTL
Toda chamada passa por cache. Key = hash(promptId + input + model). TTL default 1h.
3. Rate limit via token bucket
Token bucket por provider:
- Gemini Free: 15 RPM, 1M tokens/dia
- Claude tier 1: 50 RPM
- OpenAI tier 1: 500 RPM
4. Prompts versionados
Nunca inline em código. Vivem em prompts/<id>.v<n>.md com frontmatter (model, temperature, schema).
5. Validação via schema
LLM mente — sempre valide output com Zod/Pydantic/serde.
Métricas obrigatórias
| ID | Métrica |
|---|---|
| M-01 | 100% das chamadas LLM via LLMProvider injetado |
| M-02 | 100% das responses LLM cacheadas |
| M-03 | 100% das requests com rate limit |
| M-04 | 100% das respostas validadas contra schema |
Antipatterns
| AP | Antipattern | Por quê |
|---|---|---|
| AP-01 | SDK direto em Handler | impossível mockar/trocar provider |
| AP-02 | Sem cache | custo explode |
| AP-03 | Prompt em código | impossível versionar/A-B |
| AP-04 | User input direto em prompt | prompt injection trivial |
| AP-05 | Trusting LLM output | LLM mente, schema é defesa |
Defesa contra prompt injection
# ❌ Concatenação direta
system = f"You are an assistant. {user_question}"
# ✅ Separação por delimitador + escape
messages = [
{"role": "system", "content": "You are an assistant. Answer based on the document below."},
{"role": "user", "content": f"<document>{escape(doc)}</document>\n<question>{escape(q)}</question>"}
]
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.
- 2d ago First seen · 149 lines · 0 tokens per session scan A 26627d3fc4ba
dare-llm-integration is a command published in the GitHub repository dewtech-technologies/dare-method (5 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,056 tokens. 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-09-03.
Other commands, from other repositories
dev-ai-integration
Integration of language models (LLM) and AI APIs into applications.
contract-version-bump
Classify and apply a version bump to a machine-readable contract (JSON Schema, API spec, config schema) — version literals, consumer compatibility, changelog entry, downstream drift.
api-gen
Generate REST API endpoints with routes, validation, error handling, and tests.
data-pipeline
Design and implement ETL/ELT data pipelines.
dev-api
Create or document REST, GraphQL, or tRPC endpoints, with a versioning strategy.
dev-error-handling
Implements a robust and consistent error handling strategy.