Claude-skill-registry julien-dev-powershell-profile
Manage PowerShell profile, aliases, functions. Triggers: add alias, update profile, modify claude command, Microsoft.PowerShell_profile.ps1
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/julien-dev-powershell-profile" ~/.claude/skills/majiayu000-claude-skill-registry-julien-dev-powershell-profile && rm -rf "$T"
skills/data/julien-dev-powershell-profile/SKILL.mdPowerShell Profile Manager
Profile:
C:\Users\julien\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
Workflow
Observability
First: At the start of execution, display:
🔧 Skill "julien-dev-powershell-profile" activated
- Read profile to identify correct section (11 numbered sections)
- Edit profile (or use Python if OneDrive sync fails)
- User runs
to reloadrup
Performance Optimizations
Lazy Loading MCP Secrets
Location: profile:349-431 (
Load-MCPSecrets function)
Impact: Saves ~700ms on EVERY PowerShell startup (-64% faster)
How it works:
- CredentialManager Add-Type compilation deferred until needed
- Only loaded when launching
orclaude
commandshappy - Check
to avoid reloading$env:MCP_SECRETS_LOADED
Critical: When modifying secret loading, ensure it stays lazy!
Get-ClaudeArgs - DRY Common Logic
Location: profile:427-457
Purpose: Shared argument generation for
claude, happy, claude-official
Features:
- Auto-detects
in current directory.mcp.json - Auto-resume (unless
,--new
,-n
,new
passed). - Sets
(prevents title override)CLAUDE_CODE_DISABLE_TERMINAL_TITLE=1
When modifying: Update Get-ClaudeArgs, not individual functions
Claude/Happy Architecture
Three Functions, One Goal
| Function | Command | Purpose |
|---|---|---|
| happy.cmd | Default - uses Happy wrapper (mobile control) |
| happy.cmd | Alias for claude |
| claude.cmd | Bypass Happy wrapper if needed |
Why Happy?
Happy (npm: happy-coder) provides enhanced mobile control over Claude Code.
CRITICAL ISSUE: Both
happy.cmd and claude.cmd contain:
title %COMSPEC%
This overwrites terminal title to "C:\WINDOWS\system32\cmd.exe"
Solution: Multi-layered hook system (SessionStart + PostToolUse)
See CLAUDE.md section "Solution Complète pour les Titres d'Onglets Dynamiques"
Requires 4 components:
- Prompt wrapper AFTER Zoxide (profile:86-104) ✅
- Windows Terminal suppressApplicationTitle: false ✅
- SessionStart hook restore-terminal-title-on-start.ps1 ✅
- PostToolUse hook update-terminal-title.js (after every Bash command) ✅
Reference Files
| Need | File |
|---|---|
| Section details | references/profile-structure.md |
| Code patterns | references/code-patterns.md |
| OneDrive issues | references/troubleshooting.md |
| Terminal title fix | CLAUDE.md "Solution Complète pour les Titres d'Onglets" |
Skill Chaining
Skills Required Before
- None (entry point skill)
Input Expected
- User request to modify profile/alias/function
- Clear description of desired behavior
Output Produced
- Format: Modified
Microsoft.PowerShell_profile.ps1 - Side effects: Changes apply after
or new terminalrup
Compatible Skills After
- None typically (standalone modifications)
Tools Used
(read current profile state)Read
(modify profile sections)Edit
with Python (workaround for OneDrive sync)Bash
Visual Workflow
User: "Add/modify PowerShell alias" ↓ [THIS SKILL] ├─► Read profile + refs as needed ├─► Identify correct section ├─► Edit (or Python workaround) └─► Verify modification ↓ User runs `rup` or opens new terminal