Llm Patterns
Helps with LLMs, patterns as part of building AI and machine learning applications workflows.
Install on your platform
We auto-selected Claude Code based on this skill’s supported platforms.
Run in terminal (recommended)
claude mcp add llm-patterns npx -- -y @trustedskills/llm-patterns
Or manually add to ~/.claude/settings.json
{
"mcpServers": {
"llm-patterns": {
"command": "npx",
"args": [
"-y",
"@trustedskills/llm-patterns"
]
}
}
}Requires Claude Code (claude CLI). Run claude --version to verify your install.
About This Skill
What it does
This skill provides a collection of reusable patterns and templates specifically designed to optimize interactions with Large Language Models (LLMs). It helps structure complex requests, define clear constraints, and standardize output formats for more reliable agent behavior.
When to use it
- You need to enforce strict formatting rules, such as JSON or Markdown tables, in your agent's responses.
- You are building multi-step workflows where the LLM must maintain context across several turns without losing focus.
- You want to test different prompting strategies (e.g., few-shot learning, chain-of-thought) to see which yields better results for a specific task.
Key capabilities
- Structured Output Templates: Pre-built schemas to force consistent data formats from the model.
- Context Management Patterns: Techniques to preserve long-term memory and state within a session.
- Role-Playing Frameworks: Defined personas to guide the tone and expertise level of the AI agent.
- Constraint Enforcement: Specific phrasing patterns to prevent hallucinations or deviation from safety guidelines.
Example prompts
- "Apply the 'JSON Mode' pattern to extract only the customer's name and order ID from this unstructured text."
- "Use the 'Chain-of-Thought' pattern to analyze these sales figures before generating a recommendation."
- "Activate the 'Expert Critic' persona to review my draft code for security vulnerabilities."
Tips & gotchas
Ensure you have sufficient context window remaining when applying complex multi-step patterns, as they consume more tokens. Test each pattern with varied inputs to verify it handles edge cases before deploying it in production workflows.
Tags
TrustedSkills Verification
Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.
Security Audits
| Gen Agent Trust Hub | Pass |
| Socket | Pass |
| Snyk | Pass |
🌐 Community
Passed automated security scans.