agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…
Guidelines for implementing LLM (Language Model) functionality in the application
Claude Code
$ npx -y skills add elie222/inbox-zero --skill llm --agent claude-code
Codex
$ npx skills add elie222/inbox-zero --skill llm -a codex -y
Cursor
$ npx skills add elie222/inbox-zero --skill llm -a cursor -y
Gemini CLI
$ npx skills add elie222/inbox-zero --skill llm -a gemini-cli -y
GitHub Copilot
$ npx skills add elie222/inbox-zero --skill llm -a github-copilot -y
OpenCode
$ npx skills add elie222/inbox-zero --skill llm -a opencode -y
Windsurf
$ npx skills add elie222/inbox-zero --skill llm -a windsurf -y
name: llm description: Guidelines for implementing LLM (Language Model) functionality in the application
LLM-related code is organized in specific directories:
For product features with a static model choice, use `getModelForUseCase(emailAccount.user, LlmUseCase.FeatureName)` from `utils/llms/use-cases.ts`. Keep direct `getModel(user, modelType)` calls for generic helpers where the model role is intentionally passed from upstream. When adding or changing a use case, update `utils/llms/use-cases.test.ts`.
Follow this standard structure for LLM-related functions:
import { z } from "zod";
import { createScopedLogger } from "@/utils/logger";
import { chatCompletionObject } from "@/utils/llms";
import type { EmailAccountWithAI } from "@/utils/llms/types";
import { createGenerateObject } from "@/utils/llms";
import { getModelForUseCase, LlmUseCase } from "@/utils/llms/use-cases";
export async function featureFunction(options: {
inputData: InputType;
emailAccount: EmailAccountWithAI;
}) {
const { inputData, user } = options;
if (!inputData || [other validation conditions]) {
logger.warn("Invalid input for feature function");
return null;
}
const system = `[Detailed system prompt that defines the LLM's role and task]`;
const prompt = `[User prompt with context and specific instructions]
<data>
...
</data>
${emailAccount.about ? `<user_info>${emailAccount.about}</user_info>` : ""}`;
const modelOptions = getModelForUseCase(
emailAccount.user,
LlmUseCase.FeatureName,
);
const generateObject = createGenerateObject({
userEmail: emailAccount.email,
label: "Feature Name",
modelOptions,
});
const result = await generateObject({
...modelOptions,
system,
prompt,
schema: z.object({
field1: z.string(),
field2: z.number(),
nested: z.object({
subfield: z.string(),
}),
array_field: z.array(z.string()),
}),
});
return result.object;
}1. **System and User Prompts**:
2. **Schema Validation**:
3. **Logging**:
4. **Error Handling**:
5. **Input Formatting**:
6. **Type Safety**:
7. **Code Organization**:
8. **AI-First Behavior**:
9. **Draft Attribution Versioning**:
10. **Drafts Answer as the User**:
See [llm-test.mdc](mdc:.cursor/rules/llm-test.mdc)
The world's best AI personal assistant for email. Open source app to help you reach inbox zero fast.
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…
Cursor Cloud VM setup and service startup instructions for local development
Simplify and refine recently modified code for clarity, consistency, and maintainability while preserving exact behavior. Use…
Review the working tree, commit it safely, and open a GitHub pull request. Use when the user asks to create, open, raise, or…
Shape output for a reader with ADHD: lead with the next action, number multi-step work, restate state across turns, suppress…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…