Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Design and implement MCP resource URI schemes and templates with proper naming, hierarchy, and documentation.
.claude/skills/a5c-ai-mcp-resource-uri-designer/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 14% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 47% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 9% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 252% | 0% |
Design 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) |
json{ "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" } } } ] }
typescriptimport { 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}| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 13,582 | 9,524 | -30% | 1 | 1 | 0% | 3,008 | 3,430 | +14% | 0 | 0 | — |
case-02 | fail→pass | 16,147 | 15,367 | -5% | 1 | 1 | 0% | 3,677 | 4,524 | +23% | 0 | 0 | — |
case-03 | fail→fail | 17,805 | 16,681 | -6% | 1 | 1 | 0% | 3,962 | 5,178 | +31% | 0 | 0 | — |
case-04 | fail→pass | 13,081 | 11,515 | -12% | 1 | 1 | 0% | 2,365 | 3,486 | +47% | 0 | 0 | — |
case-05 | pass→pass | 12,476 | 12,149 | -3% | 1 | 1 | 0% | 2,185 | 3,552 | +63% | 0 | 0 | — |
case-06 | fail→fail | 13,903 | 22,826 | +64% | 1 | 1 | 0% | 2,378 | 4,315 | +81% | 0 | 0 | — |
case-07 | fail→fail | 9,877 | 7,797 | -21% | 1 | 1 | 0% | 1,784 | 2,548 | +43% | 0 | 0 | — |
case-08 | fail→fail | 13,703 | 9,851 | -28% | 1 | 1 | 0% | 2,590 | 2,924 | +13% | 0 | 0 | — |
case-09 | fail→fail | 10,655 | 4,465 | -58% | 1 | 1 | 0% | 1,898 | 1,835 | -3% | 0 | 0 | — |
case-10 | fail→fail | 7,962 | 2,876 | -64% | 1 | 1 | 0% | 1,535 | 1,596 | +4% | 0 | 0 | — |
case-11 | fail→fail | 10,148 | 6,391 | -37% | 1 | 1 | 0% | 1,628 | 2,212 | +36% | 0 | 0 | — |
case-12 | fail→fail | 10,561 | 7,734 | -27% | 1 | 1 | 0% | 1,907 | 2,608 | +37% | 0 | 0 | — |
case-13 | fail→fail | 7,992 | 1,292 | -84% | 1 | 1 | 0% | 1,243 | 1,301 | +5% | 0 | 0 | — |
case-14 | fail→fail | 12,646 | 15,850 | +25% | 1 | 1 | 0% | 2,248 | 4,027 | +79% | 0 | 0 | — |
case-15 | fail→pass | 9,055 | 2,036 | -78% | 1 | 1 | 0% | 1,329 | 1,451 | +9% | 0 | 0 | — |
case-16 | fail→pass | 2,832 | 2,374 | -16% | 1 | 1 | 0% | 419 | 1,476 | +252% | 0 | 0 | — |
case-17 | fail→pass | 9,272 | 4,992 | -46% | 1 | 1 | 0% | 1,651 | 2,050 | +24% | 0 | 0 | — |
case-18 | fail→fail | 13,567 | 10,259 | -24% | 1 | 1 | 0% | 2,365 | 2,987 | +26% | 0 | 0 | — |
case-19 | fail→fail | 12,184 | 7,712 | -37% | 1 | 1 | 0% | 2,145 | 2,685 | +25% | 0 | 0 | — |
case-20 | fail→fail | 11,087 | 8,304 | -25% | 1 | 1 | 0% | 2,253 | 2,842 | +26% | 0 | 0 | — |
case-21 | fail→fail | 15,435 | 9,898 | -36% | 1 | 1 | 0% | 2,376 | 3,236 | +36% | 0 | 0 | — |
case-22 | fail→fail | 7,677 | 6,008 | -22% | 1 | 1 | 0% | 1,716 | 2,528 | +47% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +27 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.