Add Your Command
Contribute to the 1shot ecosystem by adding your own commands to the registry. Support standard prompts or enhanced MCP server integrations.
MCP Server Support
NEW1shot now supports MCP (Model Context Protocol) servers for enhanced functionality. MCP servers provide additional context and capabilities to your commands, enabling richer integrations with documentation, APIs, and specialized tools.
Currently Supported
assistant-ui
Full support for assistant-ui MCP documentation server, providing comprehensive integration guides and component documentation.
More MCP server integrations coming soon! We're actively working on expanding support.
Step-by-Step Guide
Edit the Registry
Open packages/1shot/src/registry.ts
and add your command:
export const registry: Record<string, RegistryEntry> = {
// ... existing entries ...
"your-command-name": {
prompt: "Your main prompt that describes what the command does",
systemPrompt: "Optional system prompt for additional context",
// Optional: Add MCP server configuration
mcpServers: {
"server-name": {
"command": "npx",
"args": ["-y", "@your-org/mcp-server"]
}
}
},
// ... more entries ...
};
Command Examples
Here are different types of commands you can create:
Simple Command
"readme": {
prompt: "Generate a comprehensive README.md file for this project"
}
Command with System Prompt
"stripe-integration": {
systemPrompt: "You are an expert in Stripe payment integration",
prompt: "Integrate Stripe payment processing into this application"
}
Command with MCP Server (Currently assistant-ui only)
"assistant-ui": {
systemPrompt: "You are helping integrate assistant-ui into a project",
prompt: "Integrate assistant-ui chat into this project",
mcpServers: {
"assistant-ui": {
"command": "npx",
"args": ["-y", "@assistant-ui/mcp-docs-server"]
}
}
}
Test Your Command
Build and test your command locally before submitting:
# Install dependencies
npm install
# Build the project
npm run build
# Test your command
npx ./packages/1shot your-command-name
Submit a Pull Request
Once your command is working, commit your changes and create a pull request:
# Commit your changes
git add packages/1shot/src/registry.ts
git commit -m "Add [your-command-name] command to registry"
# Push to your fork
git push origin main
# Create a pull request on GitHub
PR Description Tips:
- Describe what your command does
- Include example use cases
- Mention any dependencies or requirements
- Note if you're using MCP servers
Best Practices
Clear Naming
Use descriptive, kebab-case names that clearly indicate the command's purpose (e.g., `stripe-checkout`, `jwt-auth`)
Comprehensive Prompts
Write detailed prompts that provide clear context and expectations for the AI assistant
Use System Prompts
Add system prompts for specialized knowledge or when the command requires specific expertise
Consider MCP Servers
For complex integrations, consider adding MCP server support (currently assistant-ui only) to provide enhanced documentation and context
Test Thoroughly
Always test your command in different project contexts before submitting