mcp_mother_skills
Copilot instructions4 starsChanged 10 months agoMITView on GitHub
Only at the very start of a NEW conversation (when no context exists yet), call setup (for first-time use) or sync_skills (for ongoing updates) to ensure project-relevant skills are loaded. Do NOT call these repeatedly during the same conversation unless explicitly requested by the user. This is an MCP (Model Context Protocol) server that dynamically provisions AI agent skills based on project tech stack detection. It supports both Claude and GitHub Copilot agents.
The file
We split this copilot-instructions.md into the rules it gives an agent
11 rules. About 0 are common, 1 is distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 42
All imports must use .js extension: import { X } from './types.js'
- Very specific: line 46
All types live in src/types.ts.
- Very specific: line 81
Test files mirror source: src/foo.ts → tests/foo.test.ts
- Very specific: line 91
Add tool definition to TOOLS array in src/index.ts with inputSchema
- Very specific: line 92
Create handler function handleToolName(params: TypedParams)
- Very specific: line 93
Add case in CallToolRequestSchema switch statement
- Very specific: line 94
Add param types to src/types.ts
- Distinctive: line 111
When updating the project version (for new features or bug fixes), ensure version coherency across ALL files:
- Very specific: line 113
package.json: - Update "version" field following semantic versioning:
- Very specific: line 127
src/index.ts: - Update MCP server version to match package.json:
- Very specific: line 135
Documentation: - Update README, docs/index.html, and any version references
≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
Mother MCP Skills - AI Coding Instructions
Startup
Only at the very start of a NEW conversation (when no context exists yet), call setup (for first-time use) or sync_skills (for ongoing updates) to ensure project-relevant skills are loaded. Do NOT call these repeatedly during the same conversation unless explicitly requested by the user.
Project Overview
This is an MCP (Model Context Protocol) server that dynamically provisions AI agent skills based on project tech stack detection. It supports both Claude and GitHub Copilot agents.
Core Architecture
index.ts → MCP server entry, tool definitions, request routing
├── agent-detector.ts → Detects Claude vs Copilot (env vars, client info, project structure)
├── project-detector.ts → Scans files to detect tech stack (packages, configs, README)
├── enhanced-detector.ts → Tiered detection: GitHub SBOM → Specfy → Local fallback
├── github-sbom-client.ts → GitHub SBOM API client with PURL parsing
├── registry-client.ts → Fetches skills from GitHub registries with caching
├── skill-installer.ts → Downloads/installs skills to agent-specific paths
├── config-manager.ts → YAML config handling (.mcp/mother/)
├── agent-profiles.ts → Agent path configurations (claude → .claude/, copilot → .github/)
└── types.ts → All shared TypeScript interfacesData Flow
sync_skillstool called →EnhancedProjectDetectoruses 3-tier detection (GitHub SBOM → Specfy → Local) → matches againstRegistryClientskills →SkillInstallerdownloads to.github/skillsor.claude/skills
Development Commands
npm run build # TypeScript compilation to dist/
npm run dev # Run with tsx (no compile step)
npm test # Vitest test suite
npm run test:watch # Watch mode for TDDKey Patterns
Module System
- ESM-only (
"type": "module"in package.json) - All imports must use
.jsextension:import { X } from './types.js' - Target: ES2022 with NodeNext module resolution
Type Definitions
All types live in src/types.ts. Key interfaces:
AgentId:'claude' | 'copilot' | 'codex' | 'generic'DetectedStack:{ languages, frameworks, databases, infrastructure, tools }RegistrySkill: Skill metadata with triggers (packages[],files[])SyncResult: Operation result withadded/updated/removed/unchanged
Agent Detection Priority (in agent-detector.ts)
- Explicit config override (
config.agent.force) - Environment variables (
CLAUDE_CODE,GITHUB_COPILOT,CODEX_HOME) - MCP client info string
- Project structure (
.claude/,.codex/skills/,CLAUDE.md,AGENTS.md,.github/copilot-instructions.md) - Home directory (
~/.claude/skills,~/.copilot/skills,~/.codex/skills) - Fallback to
generic
Codex Compatibility
Skills follow the Open Agent Skills Standard:
- Codex skills stored in
.codex/skills/per OpenAI spec SKILL.mdfrontmatter usesname+description(required)- Optional:
scripts/,references/,assets/directories
Skill Matching (in skill-installer.ts)
Skills match via triggers defined in registry:
packages: Check againstpackage.jsondependenciesfiles: Glob patterns in project rootreadme_keywords: Extracted from README.md
Config Storage
Mother uses .mcp/mother/ directory:
config.yaml: User preferences (agent mode, registry sources, include/exclude lists)project-context.yaml: Auto-generated detection resultscache/: Registry response cache
Testing Conventions
- Tests use Vitest with mocked
fs/promises - Test files mirror source:
src/foo.ts→tests/foo.test.ts - Mock external dependencies (filesystem, network) at module level with
vi.mock() - Example pattern in tests/skill-installer.test.ts:
vi.mock('fs/promises');
const mockConfig: MotherConfig = { ...defaultConfig, skills: { always_include: ['react'] } };Adding New Tools
- Add tool definition to
TOOLSarray in src/index.ts withinputSchema - Create handler function
handleToolName(params: TypedParams) - Add case in
CallToolRequestSchemaswitch statement - Add param types to src/types.ts
Skill File Format
Skills use SKILL.md with YAML frontmatter (see examples/skills/example-skill/SKILL.md):
---
name: skill-name
version: "1.0.0"
description: "What this skill does"
dependencies: [other-skill]
---
# Skill instructions in markdown...Version Management
When updating the project version (for new features or bug fixes), ensure version coherency across ALL files:
- package.json - Update
"version"field following semantic versioning:- Patch (0.2.0 → 0.2.1): Bug fixes, minor changes
- Minor (0.2.1 → 0.3.0): New features, backwards compatible
- Major (0.3.0 → 1.0.0): Breaking changes
- CHANGELOG.md - Move [Unreleased] to new version section:
## [Unreleased] ## [0.3.0] - YYYY-MM-DD ### Added - New feature description - src/index.ts - Update MCP server version to match package.json:
const server = new Server({ name: 'mcp-mother-skills', version: '0.3.0', // Must match package.json }) - Documentation - Update README, docs/index.html, and any version references
Always keep these versions synchronized to maintain consistency across the project.
Documentation Updates
Whenever there is a new feature, update:
- README.md (usage examples, command table)
- CHANGELOG.md (with version and date)
- docs/index.html (static docs webpage)
- Any relevant guide files in docs/
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.

