code
Code domain. Composes with implement, review, and test skills for code-specific operations.
What this skill does
## Pre-loaded Context
Git status:
!`git status --short 2>/dev/null`
Languages detected:
!`find . -maxdepth 3 -name "*.py" -o -name "*.go" -o -name "*.rs" -o -name "*.ts" -o -name "*.js" 2>/dev/null`
# Code Domain
Composes generic skills (`implement`, `review`, `test`) with code-specific context.
> **Protocol:** [dispatch/protocol.md](../dispatch/protocol.md)
---
## Auto-Detect Rules
Parse `$ARGUMENTS` in order:
| Pattern | Route | Action |
|---|---|---|
| `implement [target]` | Implement | `Skill(implement, $REST)` with code context below |
| `review [target]` | Review | `Skill(review, $REST)` with code context below |
| `test [target]` | Test | `Skill(test, $REST)` with code context below |
| No argument | Menu | AskUserQuestion |
---
## Menu Fallback
When no argument, use **AskUserQuestion**:
```
Header: Code
Question: What code operation?
multiSelect: false
Options:
- Implement: Build features with language guidelines and code intelligence
- Review: Multi-perspective code review (correctness, architecture, compliance)
- Test: Test-driven development (RED-GREEN-REFACTOR)
```
**Routing by selection:**
| Selection | Action |
|---|---|
| Implement | `Skill(implement)` with code context below |
| Review | `Skill(review)` with code context below |
| Test | `Skill(test)` with code context below |
---
## Code Context (Injected into Generic Skills)
When delegating to generic skills, provide this code-specific context:
### For Implement
**Language guidelines:** Read `~/.claude/skills/loqui/reference/loqui/languages/{language}/README.md` for language-specific conventions. Each language directory contains:
```
~/.claude/skills/loqui/reference/loqui/languages/{language}/
├── README.md # Overview, core principles, anti-patterns checklist
├── quality.md # Naming, comments, documentation conventions
├── composition.md # Structuring behavior (classes/functions/modules)
├── modules.md # Package structure, organization, public APIs
├── errors.md # Error handling patterns and practices
└── ... # Additional language-specific resources
```
**Use Read tool** (not Glob) to access resources — paths outside cwd require direct reads.
**Start with the language README** for quick reference and core principles, then dive into specific topic files as needed.
**Code intelligence:** Use `gestalt map` for codebase orientation, `gestalt callers`/`callees`/`refs` for symbol navigation.
### For Review
**Reviewer Cascade** — Three roles with distinct, non-overlapping concerns:
| Role | Concern | Primary Gates | Skill |
|------|---------|---------------|-------|
| **General** | Correctness, security, edge cases | Correctness, Security, Performance | code domain |
| **Architecture** | Structural impact, coupling, hotspots | Architecture | `gestalt` |
| **Compliance** | Language idioms, naming, patterns | Style | `loqui` |
**Review reference:** See [reference/roles/](reference/roles/) for reviewer concerns, [reference/playbook.md](reference/playbook.md) for edge case handling, [reference/checklist.md](reference/checklist.md) for review checklist.
**Compliance reviewer loqui path:** `~/.claude/skills/loqui/reference/loqui/languages/{language}/`
### For Test
**Language-specific test conventions:** Read loqui language guidelines for test patterns:
- `~/.claude/skills/loqui/reference/loqui/languages/{language}/test.md` (if exists)
- `~/.claude/skills/loqui/reference/loqui/languages/{language}/README.md` for general conventions
---
## Review Workflow
When routing to `review`, this domain skill provides the full code review methodology. See `code review` in the original skill for the complete workflow:
1. **Detect Input Type** — scope, git rev, git range, path, or diff
2. **Resolve Review Target** — pointers for reviewers to load code themselves
3. **Select Reviewers** — roles × harnesses (interactive or from validation.yaml)
4. **Dispatch Reviewers in Parallel** — full cartesian product: roles × harnesses
5. **Synthesize Reviews** — per `/review` infrastructure
6. **Write Review Output** — scope review.yaml or ephemeral markdown
7. **Present Review** — gate summary, issues by severity
8. **Recommend Action** — pass/fail guidance
### Reviewer Prompt Templates
All prompts use `review_target` variables. Reviewers load code themselves.
**Variables:** `{diff_cmd}`, `{range}`, `{workdir}`, `{context}`, `{paths}`
**General Review Prompt:**
```
You are the GENERAL reviewer. Your gates: Correctness, Security, Performance.
## What to Review
Working directory: {workdir}
[if diff_cmd] Run: `{diff_cmd}`
[if paths] Read these files: {paths}
Context: {context}
## Review Focus
1. **Correctness** - Logic errors, edge cases, error handling, type safety
2. **Performance** - Efficiency, data structures, unnecessary work
3. **Security** - Input validation, secrets, injection risks
Leave architecture and style to specialized reviewers.
## Output Constraint
Your ENTIRE final message must be ONLY the YAML report below.
No prose, no explanation, no summary. The full subagent conversation gets embedded
into the parent session context — every extra token costs budget.
## Output Format
Standard reviewer_report YAML - see reference/report.md
```
**Architecture Review Prompt:**
```
You are the ARCHITECTURE reviewer. Your gate: Architecture.
## What to Review
Working directory: {workdir}
[if diff_cmd] Run: `{diff_cmd}`
[if paths] Read these files: {paths}
Context: {context}
## Structural Analysis (run these from {workdir})
1. `gestalt analyze` — Current architecture: hotspots, seams, coupling
2. [if range] `gestalt diff {range}` — Definition-level changes
3. [if range] `gestalt diff {range} --verbose` — Impact propagation layers
4. Additional as needed:
- `gestalt callers <symbol>` for changed symbols with high fan-in
- `gestalt callees <symbol>` for changed symbols with high fan-out
- `gestalt rank --file <changed-file>` for centrality shifts
## Review Focus
1. **Coupling** — Did changes increase inter-module coupling?
2. **Hotspots** — Did changes create new high-centrality symbols?
3. **Cycles** — Did changes introduce dependency cycles?
4. **Seams** — Do changes respect existing cluster boundaries?
5. **Impact** — How far do changes propagate through the call graph?
Leave correctness, security, and style to other reviewers.
## Output Constraint
Your ENTIRE final message must be ONLY the YAML report below.
No prose, no explanation, no summary. The full subagent conversation gets embedded
into the parent session context — every extra token costs budget.
## Output Format
Architecture reviewer_report YAML - see reference/report.md
```
**Compliance Review Prompt:**
```
You are the COMPLIANCE reviewer. Your gate: Style.
## What to Review
Working directory: {workdir}
[if diff_cmd] Run: `{diff_cmd}`
[if paths] Read these files: {paths}
Context: {context}
## Loqui Guidelines (read these for each language in the diff)
1. Detect language(s) from file extensions
2. Read loqui language guidelines from:
`./skills/loqui/reference/loqui/languages/{language}/README.md`
3. Read topic files relevant to the changes:
- quality.md — naming, comments, documentation
- composition.md — structuring behavior
- modules.md — package structure, public APIs
- errors.md — error handling patterns
## Review Focus
1. **Naming** — Do names follow loqui conventions? 5x rule applied?
2. **Composition** — Composition over inheritance? Proper behavior structuring?
3. **Modules** — Feature-based organization? Clean public APIs?
4. **Errors** — Language-idiomatic error handling?
5. **Anti-patterns** — Any items from the language README checklist?
Leave correctness, security, and performance to other reviewers.
## Output Constraint
Your ENTIRE final message must be ONLY the YAML report below.
No prose, no explanation, no summary. The full subagent conversation gets embedded
into the parRelated in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.