PowerShell wrapper for AI coding assistants. Enables batch processing, persistent config, and Pester v4→v5 migration automation. Connects to Claude, GitHub Copilot, and OpenAI Codex for streamlined code generation and testing.
git clone https://github.com/potatoqualitee/aitools.gitaitools is a PowerShell module that wraps agentic AI CLI tools like Claude, Gemini CLI, GitHub Copilot CLI, and Aider, making them scriptable for large-scale code operations. It automates refactoring, migrations, and documentation by providing a consistent interface across multiple AI assistants, with each file processed in a fresh session to ensure reliable output. The module handles installation, configuration, file I/O, and change tracking, enabling developers to pipe files into AI tools just like native PowerShell cmdlets. Batch operations run in parallel with automatic retry logic, making it practical for processing hundreds of files without manual intervention or conversation drift that plagues chat-based AI tools.
[{"step":"Install the aitools module and connect to your preferred AI assistant (Claude/GitHub Copilot/OpenAI Codex).","action":"Run `Install-Module -Name aitools -Force -AllowClobber` followed by `Import-Module aitools` and `Set-AIToolConfig -Provider [Claude|Copilot|Codex]`"},{"step":"Define your automation scope by specifying the target codebase or project directory.","action":"Use `-Target` parameter with paths like `./src` or `./tests`. For Pester migration, include `-Context 'Pester v5'` to enable syntax conversion."},{"step":"Choose the action type (Generate, Migrate, Test, or Batch) based on your needs.","action":"Common actions: `Generate` for new code, `Migrate` for version upgrades, `Test` for validation, or `Batch` for bulk operations."},{"step":"Review and refine the AI-generated output, then execute or save the results.","action":"Use `-OutputPath` to save files or pipe directly to PowerShell for immediate execution. Validate with `Invoke-Pester` for test cases."},{"step":"Integrate into your CI/CD pipeline for continuous automation.","action":"Add aitools commands to your build scripts (e.g., GitHub Actions or Azure DevOps) to run during PR validation or release builds."}]
Migrate Pester v4 test suites to v5 syntax across entire test directories
Add comment-based help documentation to PowerShell scripts at scale
Enforce code style standards (OTBS formatting, naming conventions) across codebases
Compare outputs from multiple AI tools on the same refactoring task
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/potatoqualitee/aitoolsCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the aitools PowerShell module to [ACTION] for [PROJECT/TARGET]. Include [SPECIFIC_TASK] and [CONTEXT_IF_NEEDED]. Example: 'Use aitools to generate unit tests for all PowerShell functions in the ./src directory using Pester v5 syntax. Include mocking for external API calls and validate error handling scenarios.'
```powershell
# Example output from aitools after running:
# aitools -Action Generate -Target Tests -Context 'Pester v5 migration for ./src/utils.ps1'
Describe "Test-UtilsModule" {
BeforeAll {
# Mock external API calls
Mock -CommandName Invoke-RestMethod -MockWith {
return @{ status = 'success'; data = @{ id = 123 } }
}
}
Context "When processing valid input" {
It "Should return expected output" {
$result = Get-Data -Id 123
$result.id | Should -Be 123
}
}
Context "When handling errors" {
It "Should throw appropriate exception" {
{ Get-Data -Id 0 } | Should -Throw "Invalid ID provided"
}
}
}
```
**Generated 8 test cases** covering:
- 3 happy path scenarios
- 2 error handling cases
- 3 edge cases (empty input, null values, malformed data)
**Migration Notes:**
- Converted all Pester v4 `It` blocks to v5 syntax
- Replaced `Mock` with `Mock -CommandName` for explicit mocking
- Added `BeforeAll` block for shared setup
- Included `Context` blocks for better test organization
**Next Steps:**
1. Run `Invoke-Pester -Path .\Tests\Test-UtilsModule.ps1` to verify
2. Review test coverage with `Get-PesterTestResult -Path .\Tests`
3. Commit changes to feature branchAutomate your browser workflows effortlessly
Get more done every day with Microsoft Teams – powered by AI
Automate security compliance and monitor real-time security posture seamlessly.
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan