skill-ai-ml
Skill0 starsChanged 3 months agoMITView on GitHub
AI/ML integrations, LLM models, embeddings, vector databases (Redis, ChromaDB), and agentic workflows. MUST ACTIVATE when integrating LLMs (Gemini, OpenAI, Anthropic, Ollama), implementing RAG pipelines, managing vector embeddings, or designing agent toolsets.
In this repository42 other files it gives its agents.
- AGENTS.mdAGENTS.md
- templates/AGENTS.mdAGENTS.md
- core/CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- avoid-ai-writingSkill
- c-cpp-systemsSkill
- doubt-driven-developmentSkill
- marketing-copywritingSkill
- mempalace-recallSkill
- mempalaceSkill
- mempalace-taskSkill
- retro-emulation-engineeringSkill
- seo-optimization-and-auditSkill
- skill-backend-architectSkill
- skill-codebase-onboardingSkill
- skill-code-reviewSkill
- skill-context-engineeringSkill
- skill-creative-designSkill
- skill-data-analysisSkill
- skill-data-scienceSkill
- skill-design-engineeringSkill
- skill-devops-cloudSkill
- skill-emulator-wasmSkill
- skill-frontend-architectSkill
- skill-graph-analyticsSkill
- skill-graphics-webglSkill
- skill-low-level-programmingSkill
- skill-master-orchestratorSkill
- skill-mcp-builderSkill
- skill-monorepo-architectSkill
- skill-osint-engineeringSkill
- skill-plugin-architectureSkill
- skill-qa-engineerSkill
- skill-researchSkill
- skill-resume-tailorSkill
- skill-stealth-scrapingSkill
- skill-system-diagnosticsSkill
- skill-web-architectureSkill
- skill-web-performanceSkill
- spec-driven-developmentSkill
- spec-minerSkill
- wasm-emscriptenSkill
The file
We split this skill into the rules it gives an agent
10 rules. About 0 are common, 10 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Token Counting: Always count tokens before sending requests to manage context limits and estimate costs accurately.
- Distinctive: line 30
System Instructions: Use robust system prompts to define persona, rules, and output formats.
- Distinctive: line 32
Grounding: Use Google Search grounding to reduce hallucinations for factual queries.
- Distinctive: line 37
Batch Prediction: Use Vertex AI Batch Prediction for asynchronous, large-scale inference jobs.
- Distinctive: line 41
Ollama Setup: Use Ollama for rapid, cost-free local prototyping with open-weights models (e.g., Llama 3, Mistral).
- Distinctive: line 46
ChromaDB Setup: Use Chroma for lightweight, local vector storage during development and prototyping.
- Distinctive: line 49
Similarity Search Patterns: Use Hybrid Search (dense + sparse vectors) and pre-filtering (metadata filtering) to improve relevance.
- Distinctive: line 62
Model Size Tradeoffs: Always benchmark the smallest adequate model for the task before scaling up.
- Distinctive: line 65
API Key Management: NEVER hardcode API keys. Use Secret Manager and inject via environment variables.
- Distinctive: line 68
Output Validation: Treat LLM outputs as untrusted.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AI & Machine Learning Skill
This skill provides patterns for building AI-powered applications, from local prototyping to cloud-scale inference and agentic workflows.
Overview
AI integration requires balancing capability with cost, latency, and security. This skill defines the standards for leveraging LLMs, vector databases, and agent frameworks responsibly and effectively.
When to Use
- Integrating Gemini or other LLMs via API.
- Building Retrieval-Augmented Generation (RAG) systems.
- Designing multi-agent systems and tool-use workflows.
- Deploying ML models for inference.
When NOT to Use
- Traditional statistical modeling (use data-science skill).
- Standard web application backends without AI components.
1. Gemini API Cheatsheet
- Model Selection:
- Gemini Flash: Use for high-volume, low-latency, and cost-sensitive tasks (routing, basic extraction).
- Gemini Pro: Use for complex reasoning, long-context analysis, and generation tasks.
- Gemini Ultra: Reserve for the most demanding, highly complex cognitive tasks.
- Token Counting: Always count tokens before sending requests to manage context limits and estimate costs accurately.
- Safety Settings: Configure explicit safety thresholds for harassment, hate speech, and dangerous content based on application context.
- System Instructions: Use robust system prompts to define persona, rules, and output formats.
- Function Calling: Strongly type arguments using OpenAPI schemas to enforce structured outputs.
- Grounding: Use Google Search grounding to reduce hallucinations for factual queries.
2. Vertex AI Integration
- Model Deployment: Deploy models to Vertex AI Endpoints for managed, scalable online inference.
- Endpoint Management: Implement traffic splitting for A/B testing new model versions.
- Batch Prediction: Use Vertex AI Batch Prediction for asynchronous, large-scale inference jobs.
- Custom Training: Leverage Vertex AI Custom Jobs for training proprietary models with hyperparameter tuning.
3. Local Development
- Ollama Setup: Use Ollama for rapid, cost-free local prototyping with open-weights models (e.g., Llama 3, Mistral).
- Model Pulling: Automate model fetching in setup scripts (
ollama pull <model>). - API Compatibility Layer: Expose local models through an OpenAI-compatible API to allow seamless switching between local and cloud providers.
4. Vector Search Integration
- ChromaDB Setup: Use Chroma for lightweight, local vector storage during development and prototyping.
- Redis Vector Search: Transition to Redis (or Vertex Vector Search) for low-latency, production-scale similarity search.
- Embedding Generation: Standardize on a robust embedding model (e.g., text-embedding-004) and batch requests for efficiency.
- Similarity Search Patterns: Use Hybrid Search (dense + sparse vectors) and pre-filtering (metadata filtering) to improve relevance.
- Index Management: Monitor index size and rebuild indexes periodically to maintain recall performance.
5. Agent Framework Patterns
- Tool Definition: Design tools with singular, specific purposes and comprehensive descriptions for the LLM to understand usage.
- Chain-of-Thought / ReAct: Prompt agents to explicitly reason ("Thought: ... Action: ...") before executing tools to improve reliability.
- Multi-Agent Orchestration: Decompose complex tasks into specialized sub-agents with clear communication protocols.
- Memory Management: Implement bounded memory (sliding window, summarization) to prevent context window exhaustion.
6. Performance & Cost
- Token Budgeting: Define strict limits on input and output tokens per user/session.
- Caching Strategies: Implement semantic caching (e.g., Redis) to return pre-computed responses for similar queries.
- Batching Requests: Group multiple small inference requests to maximize throughput and minimize latency.
- Model Size Tradeoffs: Always benchmark the smallest adequate model for the task before scaling up.
7. Security
- API Key Management: NEVER hardcode API keys. Use Secret Manager and inject via environment variables. Use Workload Identity where possible.
- PII Filtering: Implement pre-processing pipelines to scrub Personally Identifiable Information before sending data to external APIs.
- Prompt Injection Defense: Sanitize user inputs, use parameterization, and employ explicit instruction delimiters to mitigate injection attacks.
- Output Validation: Treat LLM outputs as untrusted. Validate structure, types, and content before executing downstream actions.
8. Anti-Rationalization Table
| Rationalization | Correction |
| "The largest model will give the best results" | BLOCKED: Start with the smallest adequate model to save costs and reduce latency. Only scale up when evaluation metrics demand it. |
| "I don't need to validate LLM output" | BLOCKED: LLM outputs require strict validation. Hallucinations and malformed JSON are guaranteed at scale. |
| "Prompt injection isn't a concern for internal tools" | BLOCKED: Internal tools process untrusted external data. Injection vulnerabilities apply everywhere. |
| "I'll add rate limiting later" | BLOCKED: Unbounded API calls can lead to massive runaway costs in minutes. Implement budgets immediately. |
| "The API key in the code is temporary" | BLOCKED: Never commit API keys. Use environment variables and secret managers from day one. |
9. Red Flags
- Trusting LLM-generated code or commands without a sandbox or human-in-the-loop.
- Failing to handle API rate limits and timeouts gracefully.
- Sending raw user input directly to the system prompt without sanitization.
- Lack of observability into token usage and latency.
10. Verification Gates
- Is the LLM output validated against a strict schema (e.g., Pydantic) before use?
- Are API keys securely managed and excluded from source control?
- Is there a fallback mechanism for when the model API is unavailable or returns an error?
- Are prompts version-controlled and evaluated against a benchmark dataset?
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

