Expert assistant for projen-managed projects. Helps with task execution, configuration changes, and dependency management while respecting projen's workflow and generated files.
An expert assistant for working with projen-managed projects. This skill helps you execute tasks, modify configuration, manage dependencies, and follow best practices while respecting projen's workflow.
This skill provides guidance for working with projects managed by [projen](https://github.com/projen/projen), a project configuration management tool. It ensures you follow projen's conventions: running tasks through projen, modifying configuration in `.projenrc` files instead of generated files, and maintaining proper workflow.
1. **Always use projen for task execution**
- Run tasks using `node ./projen.js <task-name>` instead of npm, yarn, or other package managers
- Example: `node ./projen.js build` not `npm run build`
2. **Check available tasks first**
- Read `.projen/tasks.json` to see all available tasks, their descriptions, and steps
- Common tasks:
- `node ./projen.js` - Synthesize project configuration files
- `node ./projen.js build` - Build project and run tests
- `node ./projen.js test` - Run tests only
- `node ./projen.js compile` - Compile source code only
- `node ./projen.js eslint` - Run linter
3. **When developing projen itself**
- Avoid running full builds (they're slow)
- Run specific tests: `node ./projen.js test test/path-to-test.test.ts`
- Always run linter: `node ./projen.js eslint` frequently
1. **NEVER edit generated files directly**
- Files with comments like "~~ Generated by projen. To modify..." are off-limits
- These files will be overwritten when projen regenerates
2. **Always modify configuration in .projenrc**
- Look for `.projenrc.ts`, `.projenrc.py`, or `.projenrc.json`
- Make changes there, then run `node ./projen.js` to regenerate
3. **Check .projenrc before suggesting changes**
- Before recommending changes to `package.json`, `tsconfig.json`, or other config files
- Verify if they're managed by projen
- If so, suggest changes to `.projenrc` instead
1. **Add dependencies through projen configuration**
- Don't manually edit `package.json`
- Don't run `npm install` or `yarn add` directly
2. **Use projen's dependency methods**
- `addDeps()` for runtime dependencies
- `addDevDeps()` for development dependencies
- `addPeerDeps()` for peer dependencies
- Add these to your `.projenrc` file
Follow this workflow for all changes:
1. Make changes to `.projenrc` configuration file
2. Run `node ./projen.js` to synthesize and update generated files
3. Review the changes to generated files
4. Run `node ./projen.js build` to ensure everything works
5. Commit both `.projenrc` and the generated files together
A task is NOT complete until:
1. **Always run build after changes**
- After modifying source or test files
- Run `node ./projen.js build` to verify everything compiles and passes tests
2. **Be efficient when developing projen**
- Run specific tests instead of the full suite
- Use linter frequently to catch issues early
3. **Understand the project structure**
- Check `.projen/tasks.json` when unsure about available commands
- Review `.projenrc` to understand project configuration
```typescript
// In .projenrc.ts
project.addDeps('lodash');
project.addDevDeps('@types/lodash');
```
Then run: `node ./projen.js`
```bash
node ./projen.js test
node ./projen.js test test/my-feature.test.ts
```
```bash
node ./projen.js
node ./projen.js build
```
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/projen-project-manager-uc8pbm/raw