Design and implement MCP resource URI schemes and templates with proper naming, hierarchy, and documentation.
Creates MCP resource URI schemes with templates, parsing utilities, and documentation.
npx claudepluginhub a5c-ai/babysitterThis skill is limited to using the following tools:
README.mdDesign and implement resource URI schemes for MCP servers.
Invoke this skill when you need to:
| Parameter | Type | Required | Description |
|---|---|---|---|
| domain | string | Yes | Resource domain (e.g., files, database) |
| resources | array | Yes | Resource definitions |
| language | string | No | Implementation language (default: typescript) |
{
"domain": "database",
"resources": [
{
"pattern": "db://{database}/tables/{table}",
"name": "Database Table",
"description": "Access database table schema and data",
"mimeType": "application/json",
"parameters": {
"database": { "description": "Database name" },
"table": { "description": "Table name" }
}
}
]
}
import { Resource, ResourceTemplate } from '@modelcontextprotocol/sdk/types.js';
// URI Templates
const URI_TEMPLATES = {
table: 'db://{database}/tables/{table}',
schema: 'db://{database}/schema',
query: 'db://{database}/query/{queryId}',
} as const;
// Parse URI to extract parameters
export function parseResourceUri(uri: string): {
type: keyof typeof URI_TEMPLATES;
params: Record<string, string>;
} | null {
const patterns = [
{ type: 'table' as const, regex: /^db:\/\/([^/]+)\/tables\/([^/]+)$/ },
{ type: 'schema' as const, regex: /^db:\/\/([^/]+)\/schema$/ },
{ type: 'query' as const, regex: /^db:\/\/([^/]+)\/query\/([^/]+)$/ },
];
for (const { type, regex } of patterns) {
const match = uri.match(regex);
if (match) {
if (type === 'table') {
return { type, params: { database: match[1], table: match[2] } };
} else if (type === 'schema') {
return { type, params: { database: match[1] } };
} else if (type === 'query') {
return { type, params: { database: match[1], queryId: match[2] } };
}
}
}
return null;
}
// Build URI from parameters
export function buildResourceUri(
type: keyof typeof URI_TEMPLATES,
params: Record<string, string>
): string {
let uri = URI_TEMPLATES[type];
for (const [key, value] of Object.entries(params)) {
uri = uri.replace(`{${key}}`, encodeURIComponent(value));
}
return uri;
}
// List available resource templates
export function listResourceTemplates(): ResourceTemplate[] {
return [
{
uriTemplate: URI_TEMPLATES.table,
name: 'Database Table',
description: 'Access database table schema and data',
mimeType: 'application/json',
},
{
uriTemplate: URI_TEMPLATES.schema,
name: 'Database Schema',
description: 'Full database schema information',
mimeType: 'application/json',
},
];
}
file:// - File system resourcesdb:// - Database resourceshttp://, https:// - Web resourcesgit:// - Git repository resourcesdb://{database}/tables/{table}
db://{database}/tables/{table}/rows/{rowId}
db://{database}/views/{view}
db://{database}/functions/{function}
file:///{path}
file:///projects/{project}/src/{file}
git://{repo}/branches/{branch}/files/{path}
Activates when the user asks about AI prompts, needs prompt templates, wants to search for prompts, or mentions prompts.chat. Use for discovering, retrieving, and improving prompts.
Search, retrieve, and install Agent Skills from the prompts.chat registry using MCP tools. Use when the user asks to find skills, browse skill catalogs, install a skill for Claude, or extend Claude's capabilities with reusable AI agent components.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.