← Cursor Slash Commands · ENGINEERING
/ai-feature
AI Integration & Vector Pipeline Builder
OpenAI/Anthropic integration, streaming chat, embeddings, and vector search.
/ai-feature Add semantic search over document embeddings using pgvector and OpenAIWhere it installs
# .cursor/commands/ai-feature.md
# no frontmatter, the file opens with its H1 title# .claude/commands/ai-feature.md
---
description: ...
argument-hint: [AI feature description]
allowed-tools: Read, Grep, Glob, Skill, TodoWrite, Task, ...
---What it does
/ai-feature is a Cursor slash command. Type it in chat to run a saved workflow: AI Integration & Vector Pipeline Builder.
Integrates LLMs into your product: streaming completions, prompt templates, pgvector embeddings, and token cost budgeting.
OpenAI/Anthropic integration, streaming chat, embeddings, and vector search. Unlike a skill, a command is something you invoke on purpose. The agent does not decide to run /ai-feature for you.
Why it exists
Founders retype the same multi-step prompt until it rots. /ai-feature exists so the pipeline, all 4 steps of it, is a file in .cursor/commands, versioned with the repo.
It ships in the Engineering Kit. It is wired to the AI & Vector Engineer (ai-engineer) and Senior Backend Architect (backend-architect) agents. Required skills: LLM Integration & Streaming AI Workflows; Vector Databases & Embeddings Storage; System Prompt Engineering & Few-Shot Design.
When to use it
- Use when adding AI features like document summarization, semantic search, or smart assistants.
- Use /ai-feature when you want that pipeline, not a freeform chat. If you only need one step, use a narrower command or a single agent.
- Start a new chat. Do not run this command in a thread that just wrote marketing copy.
When not to use it
- Do not run /ai-feature as a substitute for reading the diff. The command produces files; you still gate them.
- Do not chain it into a 40-turn chat. Fresh context is part of the design.
- Do not run it if you have not filled CURSOR.md. The pipeline will invent a stack.
Example workflow
- Configure AI provider SDK with streaming response handler
- Generate embeddings for incoming text records and save to pgvector
- Implement cosine similarity search endpoint with relevance filtering
- Build streaming frontend UI with markdown rendering and token counters
Example usage
Type this in Cursor chat: /ai-feature Add semantic search over document embeddings using pgvector and OpenAI
The command file tells the session which agents to adopt and which skills to read. You should see phase headers, not a single dump of code.
If a phase fails its gate, stop. Do not add 'just continue'.
Example output
- Expected artifact: src/app/api/ai/.../route.ts
- Expected artifact: src/lib/ai.ts
- Expected artifact: src/components/ai/...
Best practices
- Keep the prompt specific. /ai-feature Add semantic search over document embeddings using pgvector and OpenAI is the shape: object, constraint, and outcome.
- Let the listed agents work in order: ai-engineer → backend-architect.
- Save outputs in the repo. Chat-only answers evaporate.
- Engineering commands should leave tests or an audit note, not only implementation files.
Common mistakes
- Typing /ai-feature with no object ('do the thing'). The pipeline will guess.
- Re-running the command in the same chat after a failed gate instead of fixing the failing file.
- Editing the command file to skip review so it 'goes faster'.
- Skipping the LLM Integration & Streaming AI Workflows skill that the command depends on.
Frequently asked questions
What does /ai-feature do in Cursor?
Integrates LLMs into your product: streaming completions, prompt templates, pgvector embeddings, and token cost budgeting.When should I run /ai-feature?
Use when adding AI features like document summarization, semantic search, or smart assistants.What is an example /ai-feature prompt?
/ai-feature Add semantic search over document embeddings using pgvector and OpenAIWhich skills does /ai-feature load?
LLM Integration & Streaming AI Workflows; Vector Databases & Embeddings Storage; System Prompt Engineering & Few-Shot DesignIs /ai-feature a Cursor skill?
No. /ai-feature is a slash command you type. Skills are playbooks the agent may load. Use both: the command runs the workflow, the skills constrain how it writes.
Run /ai-feature from your own repo
AgenticKit installs 47 slash commands, 46 agents, and 61 skills. One command installation.