Stop writing the same AI prompts over and over. Get a library of proven commands for code reviews, PR management, and development workflows that work seamlessly across Claude, Cursor, Copilot, and Codex.
β One install β Works everywhere β‘ Ready-to-use PR workflows π Auto-sync across tools π Battle-tested commands
Every developer faces the same challenges:
- π Repetitive AI interactions - Writing similar prompts for code reviews, documentation, and PR management
- π― Inconsistent results - Different team members get different quality from AI tools
- β° Time waste - Recreating prompts and workflows across projects
- π€ No collaboration - Can't easily share effective AI commands with your team
This library solves all of that. You get:
- π¦ Pre-built workflows for common development tasks
- π§ Consistent setup across all your favorite AI tools
- π₯ Team collaboration with shared command libraries
- β‘ Instant productivity - no more prompt engineering from scratch
Get your first AI command working in under 2 minutes:
# For Claude Desktop/Code
npx @mkaczkowski/ai-command-library -p claude
# For Cursor IDE
npx @mkaczkowski/ai-command-library -p cursor
# For GitHub Copilot Workspace
npx @mkaczkowski/ai-command-library -p copilot
# For Codex CLI
npx @mkaczkowski/ai-command-library -p codex-global
# 1. Install
npm install -D @mkaczkowski/ai-command-library
# 2. Link to your AI tool
npx link-ai-commands --provider claude
Now you have powerful PR review commands in your AI tool! Try asking Claude:
"Use the PR review enhancement workflow to improve my code review comments"
π Success! Your AI tools now have access to professional-grade command workflows.
Think of this as a shared library for AI prompts. Instead of each developer writing their own prompts, you get:
library/commands/ β Proven command templates
β
link-ai-commands β Smart sync tool
β
.claude/commands/ β Ready to use in Claude
.cursor/commands/ β Ready to use in Cursor
.github/prompts/ β Ready to use in Copilot
~/.codex/prompts/ β Ready to use in Codex
Key concepts:
- π Commands - Markdown files with step-by-step AI instructions
- π§ Providers - Your AI tools (Claude, Cursor, Copilot, Codex)
- π Linking - Copying commands to where your tools can find them
- π€ Scripts - Helper utilities for GitHub API integration
The library works with all major AI development tools. Pick your setup:
Best for: Individual developers, project-specific commands
npx link-ai-commands --provider claude
- Result: Commands appear in
.claude/commands/
- What you get: PR workflows accessible via Claude's command palette
Best for: Teams using Cursor, integrated development
npx link-ai-commands --provider cursor
- Result: Commands appear in
.cursor/commands/
- What you get: AI commands directly in your IDE
Best for: Developers using GitHub Copilot with shared project workflows
npx link-ai-commands --provider copilot
- Result: Commands appear in
.github/prompts/
- What you get: Flattened
.prompt.md
files ready for Copilot Workspace
Best for: Terminal workflows, automation scripts
npx link-ai-commands --provider codex-global
- Result: Commands appear in
~/.codex/prompts/
- What you get: Command-line AI automation
Link to custom location:
npx link-ai-commands --provider claude --destination ./my-commands
Use symlinks (live updates):
npx link-ai-commands --provider claude --mode symlink
Preview before linking:
npx link-ai-commands --provider claude --dry-run
See all available providers:
npx link-ai-commands --list-providers
- Node.js 22+ and npm 10+
- GitHub CLI for PR workflows
- Run
gh auth login
and ensurerepo
scope is granted - Enterprise users: set
GH_HOST
or use--repo
flags
- Run
Install directly from GitHub:
npm install -D git+https://github.com/mkaczkowski/ai-command-library.git
π Provider Reference Table
Provider | Destination | Best For |
---|---|---|
claude |
.claude/commands |
Project-specific Claude commands |
claude-global |
~/.claude/commands |
User-wide Claude setup |
cursor |
.cursor/commands |
Project-specific Cursor commands |
cursor-global |
~/.cursor/commands |
User-wide Cursor setup |
copilot |
.github/prompts |
Project-specific Copilot prompts |
codex-global |
~/.codex/prompts |
Terminal-based AI workflows |
π Special note for Codex: Commands are flattened to single filenames (e.g.,
pr__enhance-review.md
) while scripts stay in folders. The linker prevents naming conflicts. π Special note for Copilot: Prompts are flattened to hyphenated names ending in.prompt.md
, whilescripts/
keep their directory structure.
Commands can reference helper scripts using placeholder syntax that works across all providers:
# This works everywhere:
node {{script:pr/scripts/fetch-pr-comments.js}} --pr=123
# Resolves to:
# Claude: .claude/commands/pr/scripts/fetch-pr-comments.js
# Cursor: .cursor/commands/pr/scripts/fetch-pr-comments.js
# Copilot: .github/prompts/pr/scripts/fetch-pr-comments.js
# Codex: ~/.codex/prompts/pr/scripts/fetch-pr-comments.js
Path placeholders:
{{script:path/to/script.js}}
- References helper scripts{{path:commandsRoot}}
- References the commands directory
Ready-to-use workflows that solve real development problems. Each workflow includes commands plus helper scripts for GitHub integration.
π‘ How to use: After linking commands to your AI tool, reference these workflows in your conversations. Helper scripts gather the data your AI needs to provide accurate, actionable guidance.
Problem: Your code review comments are technically accurate but sound harsh or overly critical.
Solution: Transform blunt feedback into collaborative, constructive guidance while preserving all technical requirements.
What you get:
- β¨ Professional, collaborative tone
- π― Same technical accuracy
- π₯ Better team relationships
- β‘ Consistent review quality
When to use: After writing initial review comments but before posting them.
# First, gather existing comments
node {{script:pr/scripts/fetch-pr-comments.js}} --pr=123
# Then ask your AI:
# "Use the comment enhancement workflow to improve my review tone"
What happens: Your AI reads your draft comments and rewrites them to sound more collaborative while keeping all technical points intact.
Output: Polished comments ready for posting (tmp/pr-[PR_NUMBER]-comments.md
)
When to use: After reviewing and approving your enhanced comments.
# Generate update instructions for GitHub
# (Your AI will guide you through this)
# Apply the updates
node {{script:pr/scripts/edit-pr-comments.js}} --pr=123
What happens: Your enhanced comments replace the original ones on GitHub, automatically maintaining the same technical accuracy with better tone.
π Workflow Diagram
flowchart TD
Fetch[Fetch PR comments]
Fetch --> Context[Review diff and project standards for tone and accuracy]
Context --> Rewrite[Rewrite each comment in a collaborative voice]
Rewrite --> Output[Save improved feedback]
Output --> Decide{Ready to push updates to GitHub?}
Decide -->|Yes| Update[Update comments]
Decide -->|No| Share[Manual review or async feedback]
Problem: You need to provide a thorough code review but don't want to miss important issues or spend hours crafting detailed feedback.
Solution: AI-powered systematic review that catches issues you might miss and generates professional, actionable comments.
What you get:
- π Comprehensive issue detection
- π Professional, helpful comment text
- β‘ Faster review process
- π― Consistent review quality across your team
When to use: When you need to review a new PR thoroughly.
# Gather PR context and changes
node {{script:pr/scripts/fetch-pr-context.js}} --pr=123
# Then ask your AI:
# "Use the review preparation workflow to analyze this PR"
What happens: Your AI systematically reviews the entire PR, cataloging potential issues, improvements, and positive points.
Output: Structured findings ready to convert into GitHub comments (tmp/pr-[PR_NUMBER]-findings.md
)
When to use: After preparing your review findings.
# Generate GitHub-ready comments
# (Your AI will guide you through this)
# Post the review to GitHub
node {{script:pr/scripts/create-pr-review.js}} --input=tmp/pr-123-review-comments.json --pr=123
What happens: Your AI converts findings into polished GitHub comments with proper file/line mappings.
Output: Professional review comments posted to GitHub
π Workflow Diagram
flowchart TD
Context[Fetch PR context]
Context --> Inspect[Study patches, docs, and neighbouring code]
Inspect --> Analyze[Assess risks, gaps, and strengths across files]
Analyze --> Output[Generate structured plan]
Output --> Craft[Compose concise, inline comments]
Craft --> Map[Align paths and line numbers with PR diffs]
Map --> Export[Export comments to JSON]
Export --> RunScript[Create pending PR review]
Problem: You have review feedback to address but need to ensure you handle every comment systematically and respond appropriately.
Solution: Structured approach to analyzing, implementing, and tracking resolution of all review feedback.
What you get:
- π Systematic tracking of all feedback
- β Nothing gets missed or forgotten
- π― Appropriate responses to reviewers
- β‘ Faster resolution cycles
When to use: When you have unresolved review comments to address.
# Get latest feedback with reactions
node {{script:pr/scripts/fetch-pr-comments.js}} --reaction=+1 --ignore-outdated --include-diff-hunk --pr=123
# Then ask your AI:
# "Use the resolution planning workflow to address this feedback"
What happens: Your AI creates a systematic plan for addressing each piece of feedback.
Output: Implementation plan with validation steps (tmp/pr-[PR_NUMBER]-address-plan.md
)
When to use: After your resolution plan is approved.
# Follow your AI-generated plan to implement changes
# (Your AI will guide you through each step)
What happens: Your AI helps you implement each planned change and validates the results.
Output: Detailed resolution report with commit references (tmp/pr-[PR_NUMBER]-address-report.md
)
When to use: After implementing fixes to close the feedback loop.
# Reply to resolved comments with commit references
node {{script:pr/scripts/reply-to-comments.js}} --pr=123 --dry-run
# When ready, apply the replies
node {{script:pr/scripts/reply-to-comments.js}} --pr=123
What happens: Courteous acknowledgments are posted to each resolved comment thread with links to the implementing commits.
π Complete Address Workflow
flowchart TD
Gather[Fetch unresolved threads + PR context]
Gather --> Study[Review diffs, standards, and previous discussion]
Study --> Strategize[Define fixes, validation, and sequencing per comment]
Strategize --> Document[Write implementation plan]
Document --> Implement[Apply fixes, docs, and tests per planned steps]
Implement --> Validate[Run targeted checks]
Validate --> Report[Generate final report]
Report --> Reply[Reply to comments with commit references]
Reply --> Wrap{Everything resolved?}
Wrap -->|Yes| Share[Push commits and close feedback loop]
Wrap -->|No| Loop[Return to implement remaining feedback]
The workflows above use helper scripts to integrate with GitHub. These scripts handle API calls, data processing, and file management automatically.
π₯ Data Fetching Scripts
fetch-pr-comments.js
- Get review comments with filtering optionsfetch-pr-context.js
- Gather PR metadata, files, commits, and participants
# Examples
node {{script:pr/scripts/fetch-pr-comments.js}} --pr=123 --reaction=+1
node {{script:pr/scripts/fetch-pr-context.js}} --pr=123
π€ GitHub Integration Scripts
create-pr-review.js
- Submit comment JSON as GitHub reviewedit-pr-comments.js
- Update existing comments with enhanced versionsreply-to-comments.js
- Post resolution acknowledgments to comment threads
# Examples
node {{script:pr/scripts/create-pr-review.js}} --input=tmp/pr-123-review-comments.json --pr=123
node {{script:pr/scripts/edit-pr-comments.js}} --input=tmp/pr-123-comments.json
node {{script:pr/scripts/reply-to-comments.js}} --input=tmp/pr-123-address-resolved.json --dry-run
π‘ Tip: All scripts support
--help
to show available options and usage examples.
Add automatic syncing to your project workflow:
{
"scripts": {
"postinstall": "link-ai-commands --provider claude"
}
}
Using multiple AI tools? Run once per provider:
npx link-ai-commands --provider claude # For Claude
npx link-ai-commands --provider cursor # For Cursor
Want to contribute or customize the library? Here's how to get started:
git clone https://github.com/mkaczkowski/ai-command-library.git
cd ai-command-library
npm install
Run checks before committing:
npm run lint # Check code style
npm run format:check # Verify formatting
Auto-fix issues:
npm run lint:fix # Fix linting issues
npm run format # Apply consistent formatting
ai-command-library/
βββ library/commands/ # π Canonical command source (your templates)
βββ providers/ # βοΈ Provider configurations (claude.json, cursor.json)
βββ scripts/ # π§ Core linking logic
βββ bin/ # π¦ CLI entry point
- Update: Bump version in
package.json
and updateCHANGELOG.md
- Verify: Run
npm run release
to check linting and formatting - Publish:
npm publish --access public
(requires NPM_TOKEN env var) - Tag: Push the release commit and tag to GitHub
- Bug reports: GitHub Issues
- Feature requests: GitHub Issues
- Security concerns: Follow guidance in
SECURITY.md
- Check the workflows above for common use cases
- Review script help with
--help
flag - Search existing issues for solutions
- Add new command workflows
- Improve existing templates
- Enhance provider support
- Update documentation
Released under the MIT License.
Happy coding! π