Automated summary
Guide for working on Splitrail's MCP server: adding tools, resources, and modifying the MCP interface in the Rust codebase.
Strengths
- Points to the exact source files involved (src/mcp/server.rs, types.rs, mod.rs)
- Documents the MCP tools and resources the project already exposes
- Gives a step-by-step procedure for adding a new tool or resource
Limitations
- Does not cover the underlying analytics queries, only the MCP wiring
- Assumes familiarity with Rust and the #[tool] macro
- Does not describe testing or input validation for tools
Use when adding or changing a tool, resource, or the MCP interface of Splitrail's server.
Avoid it when implementing the statistics themselves or working on parts of the project unrelated to MCP.
Security analysis
SafeThe skill is documentation for a specific project's MCP server. It includes a 'cargo run -- mcp' command and file path references, but no destructive, exfiltrating, or obfuscated actions. The instructions are limited to adding tools/resources and understanding the codebase, presenting no meaningful execution risk.
No concerns found
How this analysis is madeExamples
Add a new MCP tool to Splitrail called get_weekly_trends that returns usage aggregated by week, following the existing tool pattern in src/mcp/server.rs.Add an MCP resource at splitrail://projects that lists per-project cost breakdown, updating resource_uris, list_resources() and read_resource().Show me how the compare_tools MCP tool is implemented in src/mcp/server.rs and what request/response types it uses.name: mcp description: Guide for working with Splitrail's MCP server. Use when adding tools, resources, or modifying the MCP interface.
MCP Server
Splitrail can run as an MCP server, allowing AI assistants to query usage statistics programmatically.
cargo run -- mcp
Source Files
src/mcp/mod.rs- Module exportssrc/mcp/server.rs- Server implementation and tool handlerssrc/mcp/types.rs- Request/response types
Available Tools
get_daily_stats- Query usage statistics with date filteringget_model_usage- Analyze model usage distributionget_cost_breakdown- Get cost breakdown over a date rangeget_file_operations- Get file operation statisticscompare_tools- Compare usage across different AI coding toolslist_analyzers- List available analyzers
Resources
splitrail://summary- Daily summaries across all datessplitrail://models- Model usage breakdown
Adding a New Tool
- Define the tool handler in
src/mcp/server.rsusing the#[tool]macro - Add request/response types to
src/mcp/types.rsif needed
See existing tools in src/mcp/server.rs for the pattern.
Adding a New Resource
- Add URI constant to
resource_urismodule insrc/mcp/server.rs - Add to
list_resources()method - Handle in
read_resource()method
From the file to a first result
The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.
View the source and supporting filesThis download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.
1. Download the file
Download SKILL.mdFrom the root of a test project, save the file as .skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.
Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.
mkdir -p '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/splitrail-mcp-server-guide-msr1u7f1/download' --output '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md.part' && mv '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md.part' '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md'2. Check prerequisites
Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.
No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.
The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.
3. Load the skill
After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.
Claude Code
test -f '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && test -s '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/mcp' && cp -R '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1' '.claude/skills/mcp'Cursor
test -f '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && test -s '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/mcp' && cp -R '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1' '.cursor/skills/mcp'Codex
test -f '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && test -s '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/mcp' && cp -R '.skill-downloads/splitrail-mcp-server-guide-msr1u7f1' '.agents/skills/mcp'OpenSkills
OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.
Official OpenSkills installationopenskills install './.skill-downloads/splitrail-mcp-server-guide-msr1u7f1'openskills read 'splitrail-mcp-server-guide-msr1u7f1'Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.
For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.
openskills syncManual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.
4. Try a first task
Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:
Read .skill-downloads/splitrail-mcp-server-guide-msr1u7f1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.
React Hook Form Best Practices
Development
Master React Hook Form: avoid anti-patterns, manage subscriptions, and handle reset, dirty state, and controlled inputs correctly.
Emotion to Mantine Migration
Development
Migrate Emotion styled-components to Mantine components with style props and CSS modules. Use when converting .styled.tsx files or removing @emotion imports.
Scope Creep Detector
Development
Analyzes git diffs against a stated intent to detect scope creep, unrelated files, broad PRs, and oversized changes, then suggests keep, split, or justify actions.