home / skills / oimiragieo / agent-studio / monorepo-and-tooling

This skill helps enforce monorepo structure and tooling conventions, guiding shared packages, Taskfile usage, and secure env handling across projects.

npx playbooks add skill oimiragieo/agent-studio --skill monorepo-and-tooling

Review the files below or copy the command above to add this skill to your agents.

Files (3)
SKILL.md
1.7 KB
---
name: monorepo-and-tooling
description: Outlines the monorepo structure and tooling conventions, emphasizing the use of Taskfile.yml, and proper handling of environment variables.
version: 1.0.0
model: sonnet
invoked_by: both
user_invocable: true
tools: [Read, Write, Edit, Bash]
globs: '**/packages/**/*, **/app/**/*'
best_practices:
  - Follow the guidelines consistently
  - Apply rules during code review
  - Use as reference when writing new code
error_handling: graceful
streaming: supported
---

# Monorepo And Tooling Skill

<identity>
You are a coding standards expert specializing in monorepo and tooling.
You help developers write better code by applying established guidelines and best practices.
</identity>

<capabilities>
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
</capabilities>

<instructions>
When reviewing or writing code, apply these guidelines:

- If using a monorepo structure, place shared code in a `packages/` directory and app-specific code in `app/`.
- Use `Taskfile.yml` commands for development, testing, and deployment tasks.
- Keep environment variables and sensitive data outside of code and access them through `.env` files or similar configuration.
  </instructions>

<examples>
Example usage:
```
User: "Review this code for monorepo and tooling compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
</examples>

## Memory Protocol (MANDATORY)

**Before starting:**

```bash
cat .claude/context/memory/learnings.md
```

**After completing:** Record any new patterns or exceptions discovered.

> ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.

Overview

This skill defines monorepo structure and tooling conventions to keep multi-package JavaScript projects consistent and maintainable. It emphasizes placing shared libraries in packages/, app-specific code in app/, using Taskfile.yml for task automation, and keeping environment variables out of source. The goal is predictable developer workflows, safer deployments, and easier code sharing across teams.

How this skill works

The skill inspects repository layout and looks for a packages/ directory and an app/ directory to validate separation of concerns. It checks for a Taskfile.yml and recommends commands for development, testing, and deployment. It also verifies that sensitive values are not committed and suggests .env or other secret management approaches for environment variables.

When to use it

  • When starting a new multi-package JavaScript project
  • When migrating several repositories into a single monorepo
  • When standardizing developer tooling and CI/CD tasks
  • When auditing repository layout and secrets handling
  • When onboarding new engineers to a shared codebase

Best practices

  • Place reusable code under packages/ and keep application-specific code under app/ to minimize coupling.
  • Define common tasks (dev, test, build, deploy) in Taskfile.yml to provide a single entry point for workflows.
  • Never commit secrets; read environment variables from .env or a secret store and document required keys.
  • Version packages independently but keep a clear release process and change logs for cross-package changes.
  • Keep Taskfile.yml idempotent and portable; avoid machine-specific paths and rely on environment variables for config.

Example use cases

  • Review a repository and produce a checklist to convert it to monorepo structure with packages/ and app/.
  • Create or update a Taskfile.yml that standardizes development, test, lint, and deployment commands.
  • Audit commits for accidentally committed environment files and replace them with .env references and secure storage guidance.
  • Refactor duplicated utilities into packages/ and update dependent apps to use the shared module.
  • Prepare onboarding docs that explain Taskfile commands and required environment variables for local development.

FAQ

What should go in packages/ vs app/?

Shared libraries, reusable utilities, and cross-cutting code belong in packages/. Application entry points and product-specific code belong in app/.

Why use Taskfile.yml instead of npm scripts?

Taskfile.yml centralizes tasks, supports dependencies between tasks, and can orchestrate multi-package workflows more cleanly than scattered npm scripts.

How do I handle environment variables in CI?

Keep keys out of source and inject them through your CI provider's secret store or environment variable settings. Document required keys in an example .env.example file.