AskCodi Prompts
A user guide for AskCodi's Prompt stacking, covering the creation of prompts, configuration of prompts, stacking of prompts and usage of prompts.
What Are Prompts?
Prompts are reusable text templates with variable placeholders. Instead of typing the same instructions repeatedly, you create a prompt once and reuse it everywhere.
The prompt library lets you create reusable AI prompts with dynamic variables. Prompts can be private (only you can see) or public (shared with the community).
Example Prompt:
You are a {{language}} expert. Help me {{task}} with best practices
for {{project_type}} projects. Focus on {{priority}} and provide
code examples.
Variables Detected:
{{language}}- Programming language{{task}}- What you need help with{{project_type}}- Type of project{{priority}}- What to prioritize
When you use this prompt, you fill in the variables and the AI receives the complete, customized instruction.
Creating Prompts
From the Prompts Page
- Navigate to Prompts in the left sidebar
- Click "Create Prompt" button
- Fill in the form:
- Name: Short identifier (e.g., "Code Review Helper")
- Description: What this prompt does
- Content: The actual prompt text with
{{variables}} - Tags: Categories for organization (optional)
- Visibility: Private or Public
- Click Save
Variable Auto-Detection
As you type content with {{variable}} syntax, the system automatically:
- Extracts all unique variable names
- Displays them below the content field
- Stores them in the database
You don't manually specify variables—they're detected automatically.
From the Chat Sidebar
- Click the floating arrow to open the right sidebar
- Expand the "Prompts" section
- Click "Create Prompt" inline
- Same form as above, but stays in the sidebar
- Newly created prompts appear immediately
Using Prompts
Single Prompt Usage
- Open the right sidebar in chat
- Find your prompt in the top 5 list
- Click "Add to Stack" button
- If the prompt has variables, a dialog appears:
- Shows all variables from the prompt
- Input fields for each variable value
- Save button to confirm
- Prompt added to active stack
- Send your next message—prompt is included as system message
Prompt Stack System
The prompt stack lets you combine multiple prompts for complex instructions.
Adding to Stack
- Prompts stack in order (first added is #1, second is #2, etc.)
- Each prompt can have independent variable mappings
- Active stack shows in the sidebar with order indicators
Reordering Prompts
- Drag and drop prompts to change order
- Order determines sequence sent to AI
- Visual indicators show #1, #2, #3 positions
Toggling Active/Inactive
- Click the toggle switch on any stacked prompt
- Inactive prompts stay in stack but aren't sent to AI
- Useful for temporarily disabling prompts without removing
Removing from Stack
- Click the remove button (X icon)
- Prompt removed from stack immediately
- Returns to available prompts list
Variable Mapping
- Click "Edit Variables" on any stacked prompt
- Update variable values without removing from stack
- Changes apply to next message
Prompt Stack Behavior
Before Conversation Exists (Draft Stack)
You can prepare prompts before starting a conversation:
- Add prompts to the draft stack
- Configure variables
- Reorder as needed
- No "No active conversation" errors
When you send your first message:
- Conversation is created
- Draft stack transfers to conversation
- Draft stack clears automatically
- Prompts persist with the conversation
During Conversation (Conversation Stack)
Once a conversation exists:
- Stack is saved to the database
- Persists across sessions
- Syncs across devices
- Updates in real-time
How Prompts Are Sent
When you send a message with an active stack:
- System fetches full prompt data (if not already loaded)
- Replaces variables with your mapped values
- Creates system messages for each active prompt (in order)
- Sends: [Prompt 1 system message] → [Prompt 2 system message] → [Your conversation history] → [Your new message]
- AI receives complete context
Searching and Filtering Prompts
Search Bar
The search box filters prompts in real-time:
- Searches prompt names
- Searches descriptions
- Searches content (full text)
- Searches tags
Type "Python" and see all prompts related to Python, regardless of where the word appears.
Sort Options
Two sort modes available:
- Newest: Recently created prompts first (default)
- Most Used: Highest usage count first
Usage count increments every time you use a prompt in a message.
Tag Filtering
Click any tag to filter by that tag. Tags are dynamic—the filter shows all tags from your prompts. Click "All" to clear the filter.
Refresh Button
Click the refresh icon to manually reload prompts:
- Fetches your latest private prompts
- Fetches latest public prompts
- Updates the display
- Shows loading spinner during fetch
Prompts load automatically when you open chat, but refresh is available for manual sync.
Public vs Private Prompts
Private Prompts
- Only you can see them
- Full CRUD operations (Create, Read, Update, Delete)
- Counted in "My Prompts" section
- Cannot be shared with others
- Stored with your user ID
Public Prompts
- Visible to all users
- Managed by service role (admins)
- Read-only for regular users
- Can be used by anyone
- Optional content hiding (
can_read_promptflag)
Content Visibility
Public prompts can hide their content:
can_read_prompt = true: Everyone sees full contentcan_read_prompt = false: Only name/description visible
This allows sharing prompt concepts without revealing implementation details.
Pro Tips
Tip 1: Use Prompt Stacking for Complex Tasks
Instead of writing long prompts, break them into multiple specialized prompts:
- Prompt 1: Role definition ("You are a Python expert")
- Prompt 2: Output format ("Always provide code examples")
- Prompt 3: Specific task ("Review this code for security issues")
Stack them in order and get consistent, high-quality results.
Tip 2: Search Prompts by Content, Not Just Name
The search bar searches full prompt content. If you remember a phrase from a prompt but forgot its name, just search the phrase.
Tip 3: Use Tags Strategically
Tag prompts by:
- Language:
python,javascript,sql - Task:
review,debug,optimize - Domain:
backend,frontend,data
This makes finding the right prompt instant.
Tip 4: Toggle Prompts Instead of Removing
If you're not sure if you need a prompt, toggle it inactive instead of removing it. Easy to reactivate later without re-adding and mapping variables.
Tip 5: Build a Personal Library
Create prompts for your most common tasks:
- Code review checklists
- Bug investigation workflows
- Documentation templates
- Refactoring guidelines
Over time, you'll build a powerful library of reusable AI instructions.
Tip 6: Use Variables for Flexibility
Add {{variables}} to make prompts adaptable:
{{language}}for different programming languages{{framework}}for different frameworks{{context}}for different project contexts
One prompt becomes many use cases.
Falta algo ou está errado neste guia? Fale connosco