Invoke-PSClaudeCode -dangerouslySkipPermissions 'create a fn greet, save to ps1, create tests, make sure they pass. create a privete repo on owner dfinke, push the code, show the link to the repo'
[16:36:43] 🤖 Processing request...
[16:36:43] 🤖 Consulting Claude...
[16:36:52] 🤖 Response received, analyzing...
[16:36:53] 🔧 Write-File: {"path":"Greet.ps1","content":"function Greet {\n <#\n .SYNOPSIS\n Greets a person with a friendly message.\n \n .DESCRIPTION\n Takes a name as input and returns a greeting message.\n \n .PARAMETER Name\n The name of the person to greet.\n \n .EXAMPLE\n Greet -Name \"John\"\n Returns \"Hello, John! Welcome!\"\n #>\n [CmdletBinding()]\n param(\n [Parameter(Mandatory=$true)]\n [string]$Name\n )\n \n return \"Hello, $Name! Welcome!\"\n}\n"}
[16:36:53] → Successfully wrote to Greet.ps1...
[16:36:53] 🔧 Write-File: {"path":"Greet.Tests.ps1","content":"BeforeAll {\n . $PSScriptRoot/Greet.ps1\n}\n\nDescribe
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ParseISPF.ps1 - Reads and parses ISPF panel syntax from ISPFPanel.txt | |
| # Then generates a PowerShell script that creates a WinForm based on the layout | |
| $panelFile = "ISPFPanel.txt" | |
| $content = Get-Content $panelFile -Raw | |
| # Split into sections | |
| $sections = @{} | |
| $currentSection = $null | |
| $lines = $content -split "`n" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [Parameter(Mandatory = $true)] | |
| [string]$Title, | |
| [Parameter(Mandatory = $true)] | |
| [string]$Description | |
| ) | |
| Write-Host "Starting issue creation and assignment process..." -ForegroundColor Green |
Cyclomatic Complexity Analysis
Cyclomatic Complexity is a software metric used to indicate the complexity of a program. The metric measures the number of linearly independent paths through a program's source code. A higher value means the code is more complex and potentially harder to test and maintain. Values above 10 are generally considered a warning sign.
- Total Complexity: 11 (Threshold is typically 10)
- File:
.\Samples\ComplexSample.ps1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. Load the project file | |
| $project = Get-Content "YourProject.tscproj" -Raw | ConvertFrom-Json | |
| # 2. Set the frame rate (editRate) from the project settings | |
| $fps = $project.editRate | |
| # 3. Extract markers and convert frame locations to timestamps | |
| $project.timeline.parameters.toc.keyframes | Select-Object ` | |
| @{Name="Timestamp"; Expression={"{0:hh\:mm\:ss}" -f [timespan]::fromseconds($_.time / $fps)}}, ` | |
| @{Name="MarkerText"; Expression={$_.value}} | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Modules PSAI | |
| function Get-BootStrapPrompt { | |
| <# | |
| .SYNOPSIS | |
| Generates prompt engineering best practices for specified AI models. | |
| .DESCRIPTION | |
| For each AI model in the FavoriteAI array, this function uses an agent to research and produce | |
| #> | |
| param( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Module PSAISuite | |
| # Install-Module PSAISuite | |
| $messages = @() | |
| while ($true) { | |
| $userQuery = Read-Host "User" | |
| $messages += @{ role = "user"; content = $userQuery } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Module PSAISuite | |
| $feature = 'Implement a GO program to chat with OpenAI models' | |
| $prompt = @' | |
| Based on this engineering spec for `{0}`, write a JIRA ticket that includes: | |
| - problem statement | |
| - context | |
| - goals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -Module PSAISuite | |
| function Find-Date { | |
| param( | |
| [string]$question, | |
| [string]$model = 'github:openai/gpt-4.1' | |
| ) | |
| $instructions = @" | |
| Current Date: $(Get-Date -Format "yyyy-MM-dd") |
| AI CLI Tool | Provider | Open Source | Key Features | Cost/Access | Unique Aspects | Link |
|---|---|---|---|---|---|---|
| Gemini CLI | Yes (Apache 2.0) | Code generation, debugging, file system interaction, real-time web search, task automation, supports large codebases with 1M token context window. | Free tier: 60 requests/min, 1,000/day with Google a |
NewerOlder