sc-dirty-room
Lift-and-shift port of a repository, library, API, protocol, or other software artifact to a different language, runtime, or platform, with the original source available as a reference. This skill SHOULD be used when the user says "port from X to Y", "lift and shift", "rewrite in Go", "rewrite in Rust", "translate this codebase", "convert to TypeScript", "language migration", "rewrite in another language", "carry over the algorithms", "borrow techniques from", "dirty room", "dirty-room design", "sc-dirty-room", or wants to reimplement an existing artifact while studying its internals to preserve algorithms, data structures, or idioms worth keeping. NOT for legally-constrained reimplementation — use /sc-clean-room when copyright isolation matters.
What this skill does
# Dirty-Room Design
This is a bastardization of the technique used by Compaq 1982 to clone the IBM PC BIOS.
A structured approach to porting a software artifact to a different language or platform while consulting its internals. A **reading agent** examines the original and produces discovery, fixtures, and a translation brief — notes on which algorithms, data structures, and idioms are worth carrying across the language boundary. The implementation agent receives all three artifacts and explicit permission to read the original source directly.
The clean-room skill builds a wall between specification and implementation to preserve copyright independence; the dirty-room takes notes through the open window because the constraints here are technical, not legal. Use this when the goal is a faithful port rather than an independent reimplementation.
## EXECUTION MODEL
**Phases 0 through 6 run in sequence. The core phases (1-4) MUST NOT be skipped or reordered.**
- Phase 0 establishes scope, target language, and pins the artifact version
- Phase 1 (Read) examines the original via a `Task()` agent and produces discovery, fixtures, and a translation brief
- Phase 2 (Refine) finalises the spec and translation brief for handoff
- Phase 3 (Port) builds in a `Task()` agent that may consult the original directly
- Phase 4 (Verify) confirms equivalence via spec compliance and fixture replay
- Phases 5-6 present results and offer next steps
**After each phase, present the output to the user and wait for approval before proceeding.**
### No isolation, by design
The implementation agent in Phase 3 receives the original artifact's path and may read it freely. The reading agent's notes flow through to the porter. This is the explicit difference from /sc-clean-room — the wall is gone because the work is a translation, not a clean reimplementation. Process-level separation between agents is preserved only for token efficiency; it is no longer load-bearing for independence.
## Phase 0: Resolve Target, Scope, and Languages
Parse $ARGUMENTS. The first argument is the target, anything after is a scope, focus, or target-language hint.
### Target resolution
| Argument | Target | Version pin |
|----------|--------|-------------|
| Repository URL | Clone or fetch the repo | Record commit SHA |
| Local path | Examine directly | Record git commit SHA; if not a git repo, record a checksum |
| Package name | Locate via registry (npm, PyPI, RubyGems, crates.io, etc.) | Record exact package version |
| Protocol or API name | Fetch public docs and specs | Record document revision or access date |
**Version pinning is mandatory.** Record an immutable identifier so all artifacts reference the same version.
### Scope and language negotiation
Use `AskUserQuestion`:
- Source language and runtime
- **Target language and runtime** (this is the defining input; if same as source, ask whether /sc-work is a better fit)
- Which parts to port (the whole thing, a subset, a single module)
- Quality attributes that matter (performance parity, API compatibility, idiomatic target-language code)
- What is explicitly out of scope
- **Licence check**: confirm the user has rights to study the original and produce a port. If unclear, redirect to /sc-clean-room.
Tell the user: "Target: [what]. Scope: [boundaries]. Languages: [source] → [target]."
### Run directory
**Slug**: `<artifact-name>-<source-lang>-to-<target-lang>` (lowercase, hyphens). Create with `mkdir -p .agent-history/dirty-room/<slug>`.
Run `git check-ignore -q .agent-history/` — if it fails, warn the user to add the ignore rule.
If the directory already exists, ask: start fresh, resume, or abort.
### Classify the artifact
| Type | Reading focus |
|------|---------------|
| **Library/Package** | Exported functions, types, behaviour contracts, internal algorithms |
| **CLI Tool** | Command interface, input/output formats, exit codes, argument parsing strategy |
| **API/Service** | Routes, request/response schemas, error codes, middleware ordering |
| **Protocol** | Message types, sequencing, state transitions, framing |
| **Data Format** | Syntax, semantics, edge cases, error recovery, parser strategy |
| **Algorithm** | Inputs, outputs, invariants, complexity, optimisations worth preserving |
### Run State
Before leaving Phase 0, fix the following named variables.
**Substitution contract.** Two grammars appear in this skill and must not be confused:
- Tokens of the form `<UPPER_SNAKE>` are Run State variables. The orchestrator MUST replace them with the resolved value before sending any prompt to a `Task()` agent. Every Phase 1 and Phase 3 prompt body performs this literal substitution before invocation.
- Tokens of the form `[brief description]` inside example artifact templates (the `discovery.md`, `fixtures.md`, `specification.md`, and `verification.md` blocks) are human-readable scaffolds the spawned agent fills with its findings — do NOT replace these.
| Variable | Definition | Derivation rule |
|----------|------------|-----------------|
| `ARTIFACT_NAME` | Short canonical name of the original artifact | Lowercase, hyphens; strip versions, namespaces, and registry decorations. For repo URLs, use the repo's basename; for packages, the registry name without scope (`@org/foo` → `foo`); for protocols, the common abbreviation (e.g. `http2`, `grpc`). |
| `SOURCE_LANG` / `TARGET_LANG` | Canonical language tokens | Lowercase, hyphens. Use the canonical short names: `go`, `rust`, `python`, `typescript`, `javascript`, `ruby`, `java`, `kotlin`, `swift`, `c`, `cpp`, `csharp`, `elixir`, `erlang`, `scala`, `clojure`, `haskell`, `ocaml`. Pick the closest match for variants (`ts` → `typescript`, `py` → `python`). |
| `SLUG` | Run identifier | `<ARTIFACT_NAME>-<SOURCE_LANG>-to-<TARGET_LANG>` |
| `RUN_DIR` | Run directory (absolute path) | `<repo-root>/.agent-history/dirty-room/<SLUG>/` |
| `SOURCE_PATH` | Absolute path to the materialised original | Set by Phase 0 Materialisation, below. |
| `TARGET_PATH` | Absolute path where the port will be written | Confirm with the user; default to `<repo-root>/<ARTIFACT_NAME>-<TARGET_LANG>/` if unspecified. |
| `SOURCE_VERSION` | Immutable version pin of the materialised source | Read after Materialisation; this is the `version_pin` field recorded by the Materialisation recipe in `<RUN_DIR>provenance.json`. |
| `SCOPE` | Negotiated scope of the port | Captured during Phase 0 scope negotiation. A short prose summary of which parts are in scope and out of scope. |
| `IMPL_PREFS` | Porter's preferred architecture, test strategy, libraries | Captured at the start of Phase 3, immediately before the porting Task() is launched, via `AskUserQuestion`. |
| `APPROVAL_SIGNAL` | What counts as user approval at each blocking gate | An explicit affirmative from the user — "yes", "approved", "proceed", "lgtm", "go ahead", or equivalent. Silence, partial approval ("looks mostly good but…"), or any qualified response does NOT count; re-ask explicitly until you receive an unambiguous affirmative or an explicit halt. |
Echo the Run State back to the user as a compact block before Phase 1 so they can confirm:
```
SLUG=<resolved>
RUN_DIR=<resolved>
ARTIFACT_NAME=<resolved>
SOURCE_LANG=<resolved>
TARGET_LANG=<resolved>
SOURCE_PATH=<resolved>
TARGET_PATH=<resolved>
SOURCE_VERSION=<resolved>
SCOPE=<resolved>
```
(`IMPL_PREFS` is filled in at Phase 3.)
### Phase 0 Materialisation
After resolving Run State, the orchestrator MUST materialise the source on disk and record its version pin to `<RUN_DIR>provenance.json` before proceeding to Phase 1. Run exactly one row from the table below — the row whose target type matches what the user supplied.
`provenance.json` shape (uniform across all rows):
```json
{
"target_type": "repo_url | local_path | package | protocol",
"identifier": "<the original argument as supplied>",
"version_pin": "<commit SHA, package version, or doc revision/access date>",
"capturRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.