Skip to content

feat: implement skills system - #117

Merged
JeremyDev87 merged 1 commit into
masterfrom
feat/116
Dec 29, 2025
Merged

feat: implement skills system#117
JeremyDev87 merged 1 commit into
masterfrom
feat/116

Conversation

@JeremyDev87

Copy link
Copy Markdown
Owner

implement skills system

📋 Summary

This PR implements a cross-platform skills system that allows AI assistants to access reusable workflows and best practices. Skills are stored as YAML frontmatter + Markdown files and can be accessed via MCP tools (list_skills, get_skill). The implementation includes comprehensive validation, security checks, and initial skill library.

🎯 Reason for Change

The skills system enables consistent development practices across different AI assistants (Claude Code, Codex, Cursor). By providing reusable workflows as structured skills, we can:

  • Standardize development practices
  • Enable AI assistants to follow proven workflows
  • Reduce repetitive instructions in prompts
  • Create a library of reusable best practices

🔧 Key Changes

1. Skill Schema and Validation

  • Implemented Zod-based schema validation for skill files
  • YAML frontmatter parsing with required fields (name, description)
  • Prototype pollution prevention (shared utility)
  • Content validation (non-empty after frontmatter)

2. MCP Tools

  • list_skills: Returns all available skills with name and description
  • get_skill: Retrieves full skill content by name
  • Input validation and error handling
  • Path traversal protection

3. Initial Skill Library

Added 9 core skills:

  • test-driven-development: Red-Green-Refactor cycle guidance
  • systematic-debugging: Root cause investigation process
  • writing-plans: Implementation plan creation
  • executing-plans: Plan execution workflow
  • subagent-driven-development: Subagent dispatch patterns
  • dispatching-parallel-agents: Parallel agent coordination
  • brainstorming: Brainstorming techniques
  • frontend-design: Frontend design workflow

4. Code Organization

  • Extracted containsDangerousKeys to shared security utils (used by both agent and skill schemas)
  • Refactored agent schema to use shared security utility
  • Comprehensive test coverage for all new functionality

5. Documentation

  • Skills README with usage guide
  • Adapter documentation updates (claude-code, codex, cursor)
  • Implementation plan document

⚠️ Breaking Changes

None

📌 Migration Guide

No migration needed. This is a new feature addition.

✅ Testing

All changes include comprehensive test coverage:

  • Skill schema validation tests (valid/invalid cases, security)
  • Skill loading tests (list, get, error cases)
  • MCP tool integration tests
  • Path traversal protection tests

Run tests:

yarn test

📦 Changed Files

Core Implementation:

  • apps/mcp-server/src/rules/skill.schema.ts - Skill schema and validation
  • apps/mcp-server/src/rules/skill.schema.spec.ts - Schema tests
  • apps/mcp-server/src/mcp/mcp-serverless.ts - Skill loading and MCP tools
  • apps/mcp-server/src/mcp/mcp-serverless.spec.ts - Integration tests
  • apps/mcp-server/src/shared/security.utils.ts - Shared security utilities

Skills:

  • packages/rules/.ai-rules/skills/README.md - Skills catalog
  • packages/rules/.ai-rules/skills/*/SKILL.md - 9 skill files

Documentation:

  • packages/rules/.ai-rules/adapters/*.md - Adapter updates
  • docs/skills-implementation-plan.md - Implementation plan

Dependencies:

  • apps/mcp-server/package.json - Added yaml package
  • yarn.lock - Dependency lock file

Total: 21 files changed, 2717 insertions(+), 48 deletions(-)

🔍 Review Checklist

  • Skill schema validation implemented and tested
  • MCP tools registered and functional
  • Path traversal protection applied
  • Prototype pollution prevention implemented
  • Comprehensive test coverage added
  • Initial skill library created
  • Documentation updated
  • Review skill file format and validation rules
  • Verify MCP tool integration works correctly
  • Check that skills are accessible via MCP tools

🔗 Related Issues

Closes #116

- Implement cross-platform skills system and add initial skills
- Implement skill schema and validation logic (Zod-based, YAML frontmatter parsing)
- Add MCP tools (list_skills, get_skill)
- Add initial skills (TDD, systematic-debugging, writing-plans, executing-plans, etc.)
Update adapter documentation (claude-code, codex, cursor)
- Add implementation plan documents
- Add yaml package dependency

close #116
@JeremyDev87 JeremyDev87 self-assigned this Dec 29, 2025
@JeremyDev87
JeremyDev87 marked this pull request as ready for review December 29, 2025 16:18
@JeremyDev87
JeremyDev87 merged commit 7ef1e11 into master Dec 29, 2025
9 checks passed
@JeremyDev87
JeremyDev87 deleted the feat/116 branch December 29, 2025 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cross-Platform Skills System for CodingBuddy

2 participants