skills/accelint-ts-audit-all/SKILL.md
Comprehensive TypeScript file audit system. Command-only skill (no natural triggers). Accepts file or directory path to systematically audit through accelint-ts-testing, accelint-ts-best-practices, accelint-ts-performance, and accelint-ts-documentation skills. Maintains progress tracking across sessions with interactive change approval. Uses isolated git worktrees to enable parallel audits without conflicts.
npx skillsauth add gohypergiant/agent-skills accelint-ts-audit-allInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Comprehensive TypeScript file audit system that systematically applies multiple audit skills with progress tracking and interactive approval.
accelint-ts-testing before any code changes.npm test, bun test, or similar unless they match the documented commands exactly.// PERF: comments when they provide meaningful insight that future developers wouldn't discover on their own.Apply these tests before launching a comprehensive audit:
.agents/audit/ before creating new ones.This skill creates and maintains an audit process file that tracks progress across sessions. It systematically runs four audit skills on each file with interactive approval.
Check for existing audit: Look in .agents/audit/ directory (in the original repository root) for existing audit-process files.
Note: Ensure .agents/audit/ is in your project's .gitignore to prevent committing audit tracking files.
If resuming an existing audit, read the audit-process file to understand current status:
Check completion status:
Check worktree status (backwards compatibility):
Continue from "Resume Instructions" section
Skip to Step 2 if resuming.
For new audits, create isolated worktree:
BLOCKING: All audit work MUST happen in an isolated worktree to prevent conflicts with parallel audits and allow safe rollback.
Create worktree with timestamped branch:
timestamp=$(date +%Y%m%d-%H%M%S)
git worktree add .agents/worktrees/audit-${timestamp} -b audit/${timestamp}
Switch to the worktree directory:
cd .agents/worktrees/audit-${timestamp}
Log the worktree path - You will work in this directory for the entire audit
Important: The worktree is created in .agents/worktrees/ (not .agents/audit/) to avoid conflicts with the gitignored .agents/audit/ directory where tracking files are stored.
Create tracking files:
MANDATORY - READ ENTIRE FILE: Before creating any tracking files, you MUST read
assets/audit-process-template.md completely
from start to finish to understand the exact format and structure required.
NEVER set any range limits when reading this file.
Similarly, you MUST read assets/audit-history-template.md
to understand the archival format.
Do NOT load these templates again after the initial setup - they are only needed once at the start of a new audit.
Create timestamped tracking files in the ORIGINAL repository (not in the worktree):
cd $(git rev-parse --show-toplevel).agents/audit/audit-process-${timestamp}.md (use same timestamp as worktree).agents/audit/audit-history-${timestamp}.md (same timestamp)cd .agents/worktrees/audit-${timestamp}Important: Tracking files live in the original repo's .agents/audit/ directory (which should be gitignored) so they are NOT committed with audit changes.
Build the TODO list:
Find all TypeScript files in the target directory, excluding .test.ts, .spec.ts, and .bench.ts files. If given a single file, validate it's not a test/benchmark file.
Populate the audit-process file:
For each file in the pending list, follow this exact sequence:
Step 1: Run accelint-ts-testing skill
/skill accelint-ts-testing <file-path>
Step 2: Interactive Changes
BLOCKING - Interactive Approval Required:
You MUST complete all three checkpoints before proceeding:
- ✅ Display emoji severity table with ALL issues (see "Interactive Change Approval Pattern")
- ✅ Show detailed before/after code for EVERY issue
- ✅ Ask "Apply which issues?" with numbered list acceptance NO EXCEPTIONS. If you skip any checkpoint, you are violating the workflow.
# Run test suite 100 times to verify PBT stability
for i in {1..100}; do <test-command> || break; done
Step 3: Run BOTH skills in parallel
CRITICAL: Run these together to avoid contradictory suggestions:
/skill accelint-ts-best-practices <file-path>
/skill accelint-ts-performance <file-path>
Step 4: Interactive Changes
BLOCKING - Interactive Approval Required:
You MUST complete all three checkpoints before proceeding:
- ✅ Display emoji severity table with ALL issues from BOTH skills (see "Interactive Change Approval Pattern")
- ✅ Show detailed before/after code for EVERY issue
- ✅ Ask "Apply which issues?" with numbered list acceptance NO EXCEPTIONS. If you skip any checkpoint, you are violating the workflow.
// PERF: comments only where they add genuine insightStep 5: Run verification commands
⚠️ CRITICAL: Use EXACT commands from audit-process file "Verification Commands" section. DO NOT improvise or run one-off commands.
Run ALL verification commands documented in audit-process file:
# Example commands (MUST match audit-process file exactly):
cd <project-root>; npm test
cd <project-root>; npm run build
cd <project-root>; npm run lint
Step 6: Interactive Changes (if needed)
If verification passes, skip to documenting results. Otherwise:
BLOCKING - Interactive Approval Required:
You MUST complete all three checkpoints before proceeding:
- ✅ Display emoji severity table with ALL verification failures (see "Interactive Change Approval Pattern")
- ✅ Show detailed before/after code for EVERY issue
- ✅ Ask "Apply which fixes?" with numbered list acceptance NO EXCEPTIONS. If you skip any checkpoint, you are violating the workflow.
Step 7: Run accelint-ts-documentation skill
/skill accelint-ts-documentation <file-path>
Step 8: Interactive Changes
BLOCKING - Interactive Approval Required:
You MUST complete all three checkpoints before proceeding:
- ✅ Display emoji severity table with ALL documentation issues (see "Interactive Change Approval Pattern")
- ✅ Show detailed before/after code for EVERY issue
- ✅ Ask "Apply which issues?" with numbered list acceptance NO EXCEPTIONS. If you skip any checkpoint, you are violating the workflow.
When all 9 steps complete for a file:
Move detailed progress to history file
Update audit-process file
Save both files
If more pending files exist:
If all files completed:
Run final verification in worktree:
Merge worktree back to original branch:
# Extract timestamp from current worktree directory name
# We're in .agents/worktrees/audit-YYYYMMDD-HHMMSS
timestamp=$(basename $(pwd) | sed 's/audit-//')
# Get the original branch from this audit's process file (in original repo)
repo_root=$(git rev-parse --show-toplevel)
audit_process_file="${repo_root}/.agents/audit/audit-process-${timestamp}.md"
original_branch=$(grep "^**Original Branch:**" ${audit_process_file} | cut -d'`' -f2)
# Commit all changes in worktree
git add -A
git commit -m "refactor: complete TypeScript audit
- Improved test coverage across all files
- Applied type safety and best practice improvements
- Optimized performance where beneficial
- Enhanced documentation
Co-Authored-By: {current_model}"
# Switch back to original branch
cd "${repo_root}"
git checkout ${original_branch}
# Merge the audit branch
git merge --no-ff audit/${timestamp}
Clean up worktree:
# Remove the worktree (use the timestamp extracted earlier)
git worktree remove .agents/worktrees/audit-${timestamp}
# Optionally delete the audit branch
git branch -d audit/${timestamp}
Update audit-process file with completion:
Report results:
File Status Markers:
[ ] - Pending (not started)[x] - Completed (all 9 steps done, moved to history)Step Status Markers:
Detailed Progress Template:
### filename.ts - Audit Status 🔄 IN PROGRESS
**Overall Progress:** X% complete (Step Y of 8)
#### ✅ Step 1: Test Coverage - COMPLETE
[Findings, changes applied, test results]
#### 🔄 Step 2: Interactive Changes - IN PROGRESS
[Current change being reviewed, user decision needed]
#### ⏸️ Step 3: Code Quality Analysis - PENDING
[Not started yet]
CRITICAL: Always use the two-phase presentation pattern. NEVER present issues one-by-one or ask for approval before showing all changes.
Present ALL issues in a numbered table using emoji severity indicators:
## Found Issues Summary (X total)
| # | Severity | Type | Lines | Description |
|---|----------|------|-------|-------------|
| 1 | 🛑 Critical | Type Safety | 45-47 | Missing null check on user object |
| 2 | ⚠️ High | Performance | 89 | N+1 query in loop - use batch fetch |
| 3 | ⚡ Medium | Performance | 120-125 | Filter+map → single pass with reduce |
| 4 | 🔵 Low | Best Practice | 78 | Use const assertion for readonly array |
| 5 | ✅ Info | Documentation | 12 | Missing JSDoc return type |
Severity Legend:
After showing the overview table, display each issue with complete before/after code:
---
### Issue #1: Missing null check (🛑 Critical - Type Safety)
**Lines:** 45-47
**Problem:** Function doesn't handle null user case
**Impact:** Runtime TypeError when user is null
❌ **Before:**
```typescript
function getUsername(user: User | null) {
return user.name; // TS error + runtime crash
}
✅ After:
function getUsername(user: User | null) {
return user?.name ?? 'Anonymous';
}
Expected Benefit: Prevents runtime TypeError, fixes TS compilation error
[... same detailed format for each issue ...]
[... same detailed format for each issue ...]
[Continue for all issues...]
Apply which issues? Enter numbers (e.g., "1, 2, 5" or "all" or "skip"):
**Key Benefits:**
- Overview table allows quick scanning for conflicts across parallel processes
- Numbered list makes acceptance explicit and trackable
- All code changes shown upfront before any approval
- Emoji severity indicators enable instant visual prioritization
- Consistent format prevents wildly varying presentations
Wait for user response with numbered list before applying any changes.
## Verification Commands
The audit-process file MUST document exact verification commands. Common patterns:
**Node.js projects:**
```bash
cd <project-root>; npm test
cd <project-root>; npm run build
cd <project-root>; npm run lint
Bun projects:
cd <project-root>; bun run test
cd <project-root>; bun run build
cd <project-root>; bun run lint
cd <project-root>; bun run bench # if applicable
Monorepo packages:
cd <workspace-root>/packages/<package-name>; npm test
Always use the EXACT commands from the audit-process file. Never guess.
.agents/worktrees/audit-${timestamp} to avoid conflicts with the gitignored .agents/audit/ directory..agents/audit/ directory (gitignored) and are NOT committed with audit changes.tools
Implement QRSPI-planned OpenSpec changes with intelligent parallelization. Use when the user wants to apply a QRSPI change, implement tasks with parallelization, or says "apply this QRSPI change", "implement with parallelization", "run the parallel slices". This skill is specifically designed for changes created via accelint-qrspi that include "Parallelization Strategy" sections in tasks.md. It orchestrates parallel sub-agent execution for independent task slices using OpenSpec CLI workflows. Make sure to use this skill when the user mentions applying QRSPI changes, running parallel implementation, or working on changes with vertical slices.
development
Generate or update an ARCHITECTURE.md living document for any codebase. Use this skill whenever a user mentions "architecture.md", "ARCHITECTURE.md", "document my architecture", "architecture overview", "system architecture", "generate architecture doc", "create architecture file", "update architecture", "architecture diagram", or wants a technical overview of how their project is structured. Make sure to use this skill whenever users want to document how their system works — even if they phrase it as "write up the system", "document the tech stack", "create a technical overview", or "help me describe the architecture". Always prefer this skill over ad-hoc architecture documentation.
development
Automate the QRSPI + OpenSpec planning workflow (Questions → Research → Design → Structure) for spec-driven development. Use this skill when the user wants to plan a ticket, start a QRSPI workflow, create a change with QRSPI, or says "plan this with QRSPI", "use QRSPI to plan", "start QRSPI workflow", "create spec-driven change", or asks about planning a feature/change before implementation. This skill handles ONLY the planning phase — it does NOT implement code. After completion, the user continues with /opsx:apply for implementation.
development
Comprehensive TypeScript/JavaScript coding standards focusing on type safety, defensive programming, and code correctness. Use when (1) Writing or reviewing TS/JS code, (2) Fixing type errors or avoiding any/enum/null, (3) Implementing control flow, state management, or error handling, (4) Applying zero-value pattern or immutability, (5) Code review for TypeScript anti-patterns. Covers naming conventions, function design, return values, bounded iteration, input validation. For performance optimization, use accelint-ts-performance skill. For documentation, use accelint-ts-documentation skill.