xclaude-plugin
CLAUDE.md182 starsChanged 13 months agoMITView on GitHub
This file provides essential guidance to Claude Code when working with the xclaude-plugin repository. xclaude-plugin is a production-ready MCP (Model Context Protocol) plugin for iOS development automation. It provides 8 modular, workflow-specific MCP servers that consolidate 23 iOS operations across build, test, simulator control, and UI automation. Status: ✅ Production-ready (v0.4.0) - All operations fully implemented, tested, and with codecov integration. Key Features: Default Load (in .mcp.json): Optional Load (documented in README): Users can customize .mcp.json to load any combination…
In this repository8 other files it gives its agents.
- accessibility-testingSkill
- crash-debuggingSkill
- ios-testing-patternsSkill
- performance-profilingSkill
- simulator-workflowsSkill
- state-managementSkill
- ui-automation-workflowsSkill
- xcode-workflowsSkill
The file
Show its rules and text
We split this CLAUDE.md into the rules it gives an agent
14 rules. About 0 are common, 9 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 79
IMPORTANT: Always follow CODESTYLE.md when writing or modifying code.
- Very specific: line 83
Zero tolerance for
any: - All types explicitly defined (MCP SDK constraint exception documented) - Distinctive: line 84
No silent failures: - Always handle and log errors
- Very specific: line 85
Constants over magic numbers: - All config in constants.ts per server
- Distinctive: line 86
Progressive disclosure: - Document essentials, details on-demand
- Distinctive: line 87
Function size: - Prefer <50 lines, maximum 100 lines
- Distinctive: line 88
Security first: - Use spawn (not shell) for command execution
- Distinctive: line 89
Comprehensive JSDoc: - All public APIs must be documented
- Very specific: line 103
Implement operation: - Add to src/operations/ with JSDoc
- Distinctive: line 104
Define types: - Update types in same file or shared types
- Very specific: line 105
Add tests: - Create matching .test.ts file with full coverage
- Distinctive: line 106
Update README: - Document in server-specific README
- Very specific: line 107
Build & validate: - Ensure npm run build && npm run test passes
- Distinctive: line 193
All external commands use spawn-based execution:
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md - AI Assistant Context
This file provides essential guidance to Claude Code when working with the xclaude-plugin repository.
Project Overview
xclaude-plugin is a production-ready MCP (Model Context Protocol) plugin for iOS development automation. It provides 8 modular, workflow-specific MCP servers that consolidate 23 iOS operations across build, test, simulator control, and UI automation.
Status: ✅ Production-ready (v0.4.0) - All operations fully implemented, tested, and with codecov integration.
Key Features:
- 8 modular MCP servers - Workflow-specific, composable architecture
- 23 total operations across Xcode, Simulator, and IDB domains
- 8 procedural Skills (on-demand documentation with examples)
- 100% TypeScript with zero tolerance for
anytypes - Full test coverage with codecov reporting
Repository Structure
xclaude-plugin/
├── README.md # User-facing plugin documentation
├── CLAUDE.md # This file - AI assistant context
├── CODESTYLE.md # Development guidelines
├── .claude-plugin/ # Plugin configuration
│ ├── plugin.json # Plugin manifest (entry point)
│ └── marketplace.json # Marketplace configuration
├── mcp-servers/ # 8 modular MCP servers
│ ├── xc-build/ # Build, clean, list schemes
│ ├── xc-launch/ # Simulator lifecycle: install and launch
│ ├── xc-interact/ # Simulator + IDB UI automation
│ ├── xc-ai-assist/ # AI-specific workflows
│ ├── xc-setup/ # Health check, project info
│ ├── xc-testing/ # Test execution, results parsing
│ ├── xc-meta/ # Metadata and introspection
│ └── xc-all/ # All-in-one consolidated server
│ └── [each server]/
│ ├── src/
│ │ ├── index.ts # Server entry point
│ │ └── operations/ # Operation implementations
│ ├── package.json
│ ├── tsconfig.json
│ └── dist/ # Compiled JavaScript (committed for distribution)
├── skills/ # 8 procedural Skills (on-demand)
│ ├── xcode-workflows/
│ ├── simulator-workflows/
│ ├── ui-automation-workflows/
│ ├── accessibility-testing/
│ ├── ios-testing-patterns/
│ ├── crash-debugging/
│ ├── performance-profiling/
│ └── state-management/
├── .mcp.json # Default MCP configuration (loads xc-setup, xc-build)
├── .mcp.json.example # Full configuration showing all 8 servers
└── .gitignore # Version control exclusionsDefault vs Optional Servers
Default Load (in .mcp.json):
xc-setup- Environment validation, project introspectionxc-build- Build, clean, list schemes
Optional Load (documented in README):
xc-launch- Simulator lifecycle: install and launch appxc-testing- Test execution and result analysisxc-interact- Simulator and IDB UI automationxc-ai-assist- AI-specific workflowsxc-meta- Metadata and introspectionxc-all- All 24 operations in one server
Users can customize .mcp.json to load any combination of servers based on their workflow.
Code Style Principles
IMPORTANT: Always follow CODESTYLE.md when writing or modifying code.
Key principles across all servers:
- Zero tolerance for
any- All types explicitly defined (MCP SDK constraint exception documented) - No silent failures - Always handle and log errors
- Constants over magic numbers - All config in constants.ts per server
- Progressive disclosure - Document essentials, details on-demand
- Function size - Prefer <50 lines, maximum 100 lines
- Security first - Use spawn (not shell) for command execution
- Comprehensive JSDoc - All public APIs must be documented
- Consistent error handling - Structured error responses
Pre-commit validation:
npm run build # TypeScript compilation for all servers
npm run test # Run test suites for all servers
npm run coverage # Generate coverage reportsWhen Adding/Modifying Operations
- Add to specific server - Choose appropriate server (or add to xc-all if generic)
- Implement operation - Add to
src/operations/with JSDoc - Define types - Update types in same file or shared types
- Add tests - Create matching
.test.tsfile with full coverage - Update README - Document in server-specific README
- Build & validate - Ensure
npm run build && npm run testpasses
Development Commands
# Build all servers
npm run build # TypeScript compilation
# Testing
npm run test # Run all tests
npm run coverage # Generate coverage reports
# Individual server commands (from root)
npm run build --workspace=xc-build # Build specific server
npm run test --workspace=xc-build # Test specific server
# Development
npm run clean # Remove all dist/ directoriesTesting Strategy
All servers include:
- Unit tests for each operation
- Integration tests for workflows
- Edge case coverage
- Error handling validation
Coverage target: >80% (enforced by codecov integration)
Tests run via:
npm run test # All servers
npm run test --workspace=xc-setup # Specific server
npm run coverage # Generate reports for CIKey Implementation Details
Server Architecture
Each server in mcp-servers/ follows the same pattern:
// src/index.ts - Server entry point
export const server = new Server({
name: "xc-build",
version: "0.2.0",
tools: [
{
name: "xc_build",
description: "Build iOS project",
inputSchema: {
/* ... */
},
},
// ... more tools
],
});
// Implement handlers for each tool
server.setRequestHandler(CallToolRequestSchema, async (request) => {
// Route to appropriate operation handler
});Type Safety
Zero any types in implementation code:
// ❌ Bad - violates zero-any policy
const args = toolInput as any;
// ✅ Good - explicit typing
interface BuildInput {
scheme: string;
configuration?: "Debug" | "Release";
}
const args = toolInput as BuildInput;Command Execution (Safe Spawn)
All external commands use spawn-based execution:
// ❌ Vulnerable to shell injection
await executeCommand(`xcodebuild -scheme ${scheme}`);
// ✅ Safe - arguments as array
const { execAsync } = await import("./exec");
const result = await execAsync("xcodebuild", ["-scheme", scheme]);Error Handling
Consistent error response format:
interface OperationResult<T> {
success: boolean;
data?: T;
error?: {
code: string;
message: string;
details?: Record<string, unknown>;
};
}Resources
- MCP Documentation: https://modelcontextprotocol.io/
- Xcode Command Line Reference:
man xcodebuild,man simctl - IDB Documentation: https://fbidb.io/
- Plugin Repository: https://github.com/conorluddy/xclaude-plugin
xclaude-plugin v0.4.0 - Modular iOS development automation for Claude Code
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

