project-detection

Detect and apply the correct project context for CCPM commands.

9|1|Updated Nov 20, 2025
One-click install
npx skills add https://github.com/duongdev/ccpm --skill project-detection-duongdev
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: project-detection
Source: https://github.com/duongdev/ccpm/tree/main/skills/project-detection
Command: npx skills add https://github.com/duongdev/ccpm --skill project-detection-duongdev

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill ensures every CCPM command runs with the correct project context, especially in multi-project repos and monorepos, by auto-detecting or using manual settings.

Core Features & Use Cases

  • Priority-based detection: Manual setting > Git remote > Subdirectory patterns > Local path > Custom patterns.
  • Monorepo support: Pattern-based subdirectory detection for multiple active subprojects.
  • Error handling: Clear messages when no project or ambiguous matches are found.

Quick Start

Set a manual project: /ccpm:project:set my-project, or enable auto-detection: /ccpm:project:set auto.

Frequently Asked Questions about project-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically detect the correct project context in a monorepo?

Auto-detection identifies the active CCPM project by matching git remotes, subdirectory patterns, local paths, or custom patterns, then applies it automatically when you run commands. Enable it with /ccpm:project:set auto to resolve context misalignment across multi-project repos.

What happens when multiple projects match in my monorepo?

Ambiguous matches are resolved using priority-based detection: manual settings override git remote matches, which override subdirectory patterns, local paths, and custom patterns. The highest-priority match is applied; actionable error messages display the detected project if needed.

Can I set a manual project context instead of auto-detection?

Yes, manual project context setting takes highest priority and remains stable with zero millisecond latency. Use /ccpm:project:set my-project to lock a specific project; this overrides all automatic detection methods.

How fast is project auto-detection in monorepos?

Auto-detection completes in under 100 milliseconds with per-command caching, ensuring minimal overhead. Manual context settings have zero latency, and detection applies automatically on command start without user intervention.

What pattern types does project detection support?

Detection matches git remotes, subdirectory patterns, local file paths, and custom regex patterns. Each pattern type feeds into priority-based resolution, enabling flexible monorepo layouts from flat to deeply nested project structures.