working-in-monorepos

Execute commands from correct subproject directories using absolute paths.

25|6|Updated Feb 24, 2010
One-click install
npx skills add https://github.com/technicalpickles/dotfiles --skill working-in-monorepos
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: working-in-monorepos
Source: https://github.com/technicalpickles/dotfiles/tree/main/home/.claude/skills/working-in-monorepos
Command: npx skills add https://github.com/technicalpickles/dotfiles --skill working-in-monorepos

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents common monorepo pitfalls like directory confusion, redundant cd commands, and commands executing from the wrong location. It ensures reliable command execution by enforcing the use of absolute paths, saving you valuable time and preventing frustrating errors in complex multi-project repositories.

Core Features & Use Cases

  • Absolute Path Enforcement: Guarantees commands run from the correct subproject directory by always using absolute paths, regardless of the current shell state, eliminating guesswork.
  • Config-Driven Execution: Utilizes a .monorepo.json file to define monorepo structure and command-specific execution rules, simplifying complex workflows and ensuring consistency.
  • Automated Config Generation: Offers to run a helper script (monorepo-init) to auto-detect subprojects and generate the .monorepo.json configuration, significantly reducing manual setup time.
  • Use Case: In a monorepo with ruby/ and cli/ subprojects, you need to run bundle exec rspec in ruby/ and npm test in cli/. This skill ensures each command executes from its correct absolute path, preventing errors that arise from incorrect directory context.

Quick Start

Use the working-in-monorepos skill to run bundle exec rspec in the 'ruby' subproject of the current monorepo.