Moai Workflow Ddd
modu-ai/moai-adk
Domain-Driven Development workflow specialist using ANALYZE-PRESERVE-IMPROVE cycle for behavior-preserving code transformation.
Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation.
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install rand/cc-polymath typed-holes-refactor --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/typed-holes-refactor .claude/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .claude/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactorType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install rand/cc-polymath typed-holes-refactor --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/typed-holes-refactor .agents/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .agents/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install rand/cc-polymath typed-holes-refactor --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/typed-holes-refactor .cursor/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .cursor/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/rand/cc-polymath.git --path skills/typed-holes-refactor--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install rand/cc-polymath typed-holes-refactor --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/typed-holes-refactor .gemini/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .gemini/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install rand/cc-polymath typed-holes-refactorInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/typed-holes-refactor .github/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .github/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add rand/cc-polymath --skill typed-holes-refactor -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install rand/cc-polymath typed-holes-refactor --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/rand/cc-polymath.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/typed-holes-refactor .opencode/skills/typed-holes-refactor && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "typed-holes-refactor" agent skill from https://github.com/rand/cc-polymath/tree/main/skills/typed-holes-refactor into .opencode/skills/typed-holes-refactor/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "typed-holes-refactor", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
typed-holes-refactorRefactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation.
Typed Holes Refactor is an agent skill from rand/cc-polymath. Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation. Use when refactoring existing code, optimizing architecture, or consolidating technical debt through systematic hole-driven development.
Its SKILL.md is about 5.6k tokens, which your agent loads only when the skill is triggered. The skill folder holds 19 other files, including scripts and reference files (for example `README.md`, `references/CONSTRAINT_RULES.md` and `references/EXAMPLES.md`).
It sits in Development, covering Refactoring, Test-driven development and Technical debt. The repository describes itself as: Claude Code skills and workflows, optimized for context-efficiency and skill quality. Skills ranging from cloud infrastructure to design to advanced maths. The licence is MIT.
9 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit baa2df1. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships 12 files in scripts/ (Python), which the agent can run.
Shell commands in SKILL.md call:
pythongitgoFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Typed Holes Refactor loads about 5.6k tokens when it runs, and up to ~20k if it reads all its reference files. Until then it costs about 83 tokens; SKILL.md has 1,717 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.
The full file from rand/cc-polymath at commit baa2df1, republished under its MIT licence (© rand). 1,717 words, ~5,602 tokens.
.claude/skills/typed-holes-refactor/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.Systematically refactor codebases using the Design by Typed Holes meta-framework: treat architectural unknowns as typed holes, resolve them iteratively with test-driven validation, and propagate constraints through dependency graphs.
1. Create safe working branch:
git checkout -b refactor/typed-holes-v1
# CRITICAL: Never work in main, never touch .beads/ in main2. Analyze current state and identify holes:
python scripts/discover_holes.py
# Creates REFACTOR_IR.md with hole catalogThe Refactor IR documents:
3. Write baseline characterization tests:
Create tests/characterization/ to capture exact current behavior:
# tests/characterization/test_current_behavior.py
def test_api_contracts():
"""All public APIs must behave identically post-refactor"""
for endpoint in discover_public_apis():
old_result = run_current(endpoint, test_inputs)
save_baseline(endpoint, old_result)
def test_performance_baselines():
"""Record current performance - don't regress"""
baselines = measure_all_operations()
save_json("baselines.json", baselines)Run tests on main branch - they should all pass. These are your safety net.
For each hole (in dependency order):
1. Select next ready hole:
python scripts/next_hole.py
# Shows holes whose dependencies are resolved2. Write validation tests FIRST (test-driven):
# tests/refactor/test_h{N}_resolution.py
def test_h{N}_resolved():
"""Define what 'resolved correctly' means"""
# This should FAIL initially
assert desired_state_achieved()
def test_h{N}_equivalence():
"""Ensure no behavioral regressions"""
old_behavior = load_baseline()
new_behavior = run_refactored()
assert old_behavior == new_behavior3. Implement resolution:
4. Validate resolution:
python scripts/validate_resolution.py H{N}
# Checks: tests pass, constraints satisfied, main untouched5. Propagate constraints:
python scripts/propagate.py H{N}
# Updates dependent holes based on resolution6. Document and commit:
git add .
git commit -m "Resolve H{N}: {description}
- Tests: tests/refactor/test_h{N}_*.py pass
- Constraints: {constraints satisfied}
- Propagates to: {dependent holes}"Generate comprehensive delta report:
python scripts/generate_report.py > REFACTOR_REPORT.mdReport includes:
Every commit must validate:
.beads/ intact in mainDesign complete when:
Every hole must be:
Specific: Clear, bounded question with concrete answer
Measurable: Has testable validation criteria
Achievable: Can be resolved with available information
Relevant: Blocks meaningful progress on refactoring
Typed: Clear type/structure for resolution
interface Architecture = { layers: Layer[], rules: Rule[] }Size holes using these categories:
| Size | Duration | Characteristics | Examples |
|---|---|---|---|
| Nano | 1-2 hours | Simple, mechanical changes | Rename files, update imports |
| Small | 4-8 hours | Single module refactor | Extract class, consolidate functions |
| Medium | 1-3 days | Cross-module changes | Define interfaces, reorganize packages |
| Large | 4-7 days | Architecture changes | Layer extraction, pattern implementation |
| Epic | >7 days | SPLIT THIS HOLE | Too large, break into smaller holes |
Estimation Red Flags:
Split a hole when:
Splitting strategy:
Epic hole: "Refactor entire authentication system"
→ Split into:
R10_auth_interface: Define new auth interface (Medium)
R11_token_handling: Implement JWT tokens (Small)
R12_session_management: Refactor sessions (Medium)
R13_auth_middleware: Update middleware (Small)
R14_auth_testing: Comprehensive test suite (Medium)After splitting:
python scripts/propagate.py to update graphpython scripts/holes_to_beads.py"?R1_target_architecture": "What should the ideal structure be?"
"?R2_module_boundaries": "How should modules be organized?"
"?R3_abstraction_layers": "What layers/interfaces are needed?"Validation: Architecture tests, dependency analysis, layer violation checks
"?R4_consolidation_targets": "What code should merge?"
"?R5_extraction_targets": "What code should split out?"
"?R6_elimination_targets": "What code should be removed?"Validation: Duplication detection, equivalence tests, dead code analysis
"?R7_test_strategy": "How to validate equivalence?"
"?R8_migration_path": "How to safely transition?"
"?R9_rollback_mechanism": "How to undo if needed?"Validation: Test coverage metrics, migration dry-runs, rollback tests
See HOLE_TYPES.md for complete catalog.
When: Interface hole resolved with concrete types
Then: Propagate type requirements to all consumers
Example:
Resolve R6: NodeInterface = BaseNode with async run()
Propagates to:
→ R4: Parallel execution must handle async
→ R5: Error recovery must handle async exceptionsWhen: Implementation resolved with resource usage
Then: Propagate limits to dependent holes
Example:
Resolve R4: Parallelization with max_concurrent=3
Propagates to:
→ R8: Rate limit = provider_limit / 3
→ R7: Memory budget = 3 * single_operation_memoryWhen: Validation resolved with test requirements
Then: Propagate data needs upstream
Example:
Resolve R9: Testing needs 50 examples
Propagates to:
→ R7: Metrics must support batch evaluation
→ R8: Test data collection strategy neededSee CONSTRAINT_RULES.md for complete propagation rules.
| Gate | Criteria | Check |
|---|---|---|
| Gate 1: Discovery Complete | All holes cataloged, dependencies mapped | python scripts/check_discovery.py |
| Gate 2: Foundation Holes | Core interfaces resolved, tests pass | python scripts/check_foundation.py |
| Gate 3: Implementation | All refactor holes resolved, metrics improved | python scripts/check_implementation.py |
| Gate 4: Production Ready | Migration tested, rollback verified | python scripts/check_production.py |
This skill is designed for effective Claude/LLM collaboration. Here's how to divide work:
Claude's Role:
discover_holes.py to analyze codebaseYour Role:
Claude's Role:
validate_resolution.py, check_foundation.pypython scripts/propagate.py H{N}Your Role:
Claude's Role:
Your Role:
Starting a session:
"I need to refactor [description]. Use typed-holes-refactor skill.
Start with discovery phase."Resolving a hole:
"Resolve H3 (target_architecture). Write tests first, then implement.
Use [specific pattern/approach]."Checking progress:
"Run check_completeness.py and show me the dashboard.
What's ready to work on next?"Generating visualizations:
"Generate dependency graph showing bottlenecks and critical path.
Use visualize_graph.py with --analyze."Claude CANNOT:
Claude CAN:
At session start:
"Continue typed-holes refactoring. Import beads state and
show current status from REFACTOR_IR.md."Claude will:
You should:
bd export -o .beads/issues.jsonlWhy beads + typed holes?
# Install beads (once)
go install github.com/steveyegge/beads/cmd/bd@latest
# After running discover_holes.py
python scripts/holes_to_beads.py
# Check what's ready
bd ready --jsonDuring hole resolution:
# Start work on a hole
bd update bd-5 --status in_progress --json
# Implement resolution
# ... write tests, implement code ...
# Validate resolution
python scripts/validate_resolution.py H3
# Close bead
bd close bd-5 --reason "Resolved H3: target_architecture" --json
# Export state
bd export -o .beads/issues.jsonl
git add .beads/issues.jsonl REFACTOR_IR.md
git commit -m "Resolve H3: Define target architecture"Syncing holes ↔ beads:
# After updating REFACTOR_IR.md manually
python scripts/holes_to_beads.py # Sync changes to beads
# After resolving holes
python scripts/holes_to_beads.py # Update bead statusesCross-session continuity:
# Session start
bd import -i .beads/issues.jsonl
bd ready --json # Shows ready holes
python scripts/check_completeness.py # Shows overall progress
# Session end
bd export -o .beads/issues.jsonl
git add .beads/issues.jsonl
git commit -m "Session checkpoint: 3 holes resolved"Bead advantages:
bd deps bd-5All scripts are in scripts/:
discover_holes.py - Analyze codebase and generate REFACTOR_IR.mdnext_hole.py - Show next resolvable holes based on dependenciesvalidate_resolution.py - Check if hole resolution satisfies constraintspropagate.py - Update dependent holes after resolutiongenerate_report.py - Create comprehensive delta reportcheck_discovery.py - Validate Phase 0 completeness (Gate 1)check_foundation.py - Validate Phase 1 completeness (Gate 2)check_implementation.py - Validate Phase 2 completeness (Gate 3)check_production.py - Validate Phase 3 readiness (Gate 4)check_completeness.py - Overall progress dashboardvisualize_graph.py - Generate hole dependency visualizationholes_to_beads.py - Sync holes with beads issuesRun any script with --help for detailed usage.
This skill uses its own principles:
| Typed Holes Principle | Application to Refactoring |
|---|---|
| Typed Holes | Architectural unknowns cataloged with types |
| Constraint Propagation | Design constraints flow through dependency graph |
| Iterative Refinement | Hole-by-hole resolution cycles |
| Test-Driven Validation | Tests define correctness |
| Formal Completeness | Gates verify design completeness |
We use the system to refactor the system.
For complex scenarios, see:
# 1. Setup
git checkout -b refactor/typed-holes-v1
python scripts/discover_holes.py
# 2. Write baseline tests
# Create tests/characterization/test_*.py
# 3. Resolve first hole
python scripts/next_hole.py # Shows H1 is ready
# Write tests/refactor/test_h1_*.py (fails initially)
# Refactor code until tests pass
python scripts/validate_resolution.py H1
python scripts/propagate.py H1
git commit -m "Resolve H1: ..."
# 4. Repeat for each hole
# ...
# 5. Generate report
python scripts/generate_report.py > REFACTOR_REPORT.mdSymptom: Tests that captured baseline behavior now fail
Resolution:
git diff to see what changed# Update baseline with reason
save_baseline("v2_api", new_behavior,
reason="Switched to async implementation")Prevention: Run characterization tests before AND after each hole resolution.
Symptom: Stuck on a hole for >3 days, unclear how to proceed
Resolution:
Check dependencies: Are they actually resolved?
python scripts/visualize_graph.py --analyze
# Look for unresolved dependenciesReview constraints: Are they contradictory?
Split the hole: If hole is too large
# Original: R4_consolidate_all (Epic, 10+ days)
# Split into:
R4a_consolidate_parsers (Medium, 2 days)
R4b_consolidate_validators (Small, 1 day)
R4c_consolidate_handlers (Medium, 2 days)Check for circular dependencies:
python scripts/visualize_graph.py
# Look for cycles: R4 → R5 → R6 → R4Escalation: If still stuck after 5 days, consider alternative refactoring approach.
Symptom: Cannot satisfy all constraints simultaneously
Example:
Resolution Framework:
Identify the conflict:
C1 requires: Keep synchronous operations
C5 requires: Switch to async operations
→ Contradiction: Can't be both sync and asyncNegotiate priorities:
| Option | C1 | C5 | Tradeoff |
|---|---|---|---|
| A: Keep sync | ✓ | ✗ | No performance gain |
| B: Switch to async | ✗ | ✓ | Breaking change |
| C: Add async, deprecate sync | ⚠️ | ✓ | Migration burden |
Choose resolution strategy:
Document decision:
## Constraint Resolution: C1 vs C5
**Decision**: Relax C1 to allow async migration
**Rationale**: Performance critical for user experience
**Migration**: 3-month deprecation period for sync API
**Approved by**: [Stakeholder], [Date]Symptom: visualize_graph.py shows cycles
Example:
R4 (consolidate parsers) → depends on R6 (define interface)
R6 (define interface) → depends on R4 (needs parser examples)Resolution strategies:
Introduce intermediate hole:
H0_parser_analysis: Analyze existing parsers (no dependencies)
R6_interface: Define interface using H0 analysis
R4_consolidate: Implement using R6 interfaceRedefine dependencies:
Accept iterative refinement:
R6_interface_v1: Initial interface (simple)
R4_consolidate: Implement with v1 interface
R6_interface_v2: Refine based on R4 learningsPrevention: Define architecture holes before implementation holes.
Symptom: Feeling stuck, no commits, uncertain how to proceed
Resolution checklist:
Review REFACTOR_IR.md: Are holes well-defined (SMART criteria)?
Check hole size: Is current hole >7 days estimate?
Run dashboard: python scripts/check_completeness.py
Visualize dependencies: python scripts/visualize_graph.py --analyze
Review constraints: Are they achievable?
Seek external review:
Consider alternative: Maybe this refactor isn't feasible
Reset protocol: If still stuck, revert to last working state and try different approach.
Symptom: Hole taking 3x longer than estimated
Analysis:
Why did estimate fail?
Immediate actions:
bd update bd-5 --note "Revised estimate: 5 days (was 2)"Future improvements:
Learning: Track actual vs estimated time in REFACTOR_REPORT.md for future reference.
Begin with Phase 0: Discovery. Always work in a branch. Test first, refactor second.
© rand, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 17 other files (scripts, references) in skills/typed-holes-refactor of rand/cc-polymath.
Open the folder on GitHubat commit baa2df1
Typed Holes Refactor next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Typed Holes Refactor this skillrand/cc-polymath | 181 | — | ~5.6k | Automated safety check: Pass | MIT | |
| Moai Workflow Dddmodu-ai/moai-adk | 1.2k | — | ~3.6k | Automated safety check: Pass | Apache-2.0 | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Code Simplification for ego-litecitrolabs/ego-lite | 17k | — | ~1.2k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT | |
| FIXME Resolvertailcallhq/forgecode | 7.6k | — | ~1.1k | Automated safety check: Pass | Apache-2.0 |
modu-ai/moai-adk
Domain-Driven Development workflow specialist using ANALYZE-PRESERVE-IMPROVE cycle for behavior-preserving code transformation.
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
citrolabs/ego-lite
Finds and implements evidence-backed simplifications in the ego-lite repository, such as dead code, duplicated state and speculative abstractions, without hiding behavior changes.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
tailcallhq/forgecode
Finds every FIXME comment in a codebase, groups related ones across files into one task, implements the work they describe and removes the comments once it is done.
ramziddin/solid-skills
A skill your agent uses when writing code, implementing features, refactoring, planning architecture, designing systems, reviewing code, or debugging.
rand/cc-polymath
Comprehensive toolkit for detecting and eliminating "AI slop" - generic, low-quality AI-generated patterns in natural language, code, and design.
rand/cc-polymath
Create world-class, accessible, responsive interfaces with sophisticated interactive elements including chat, terminals, code display, and streaming content.
rand/cc-polymath
Automatically discover agentic workflow skills when building AI agents, implementing tool use patterns, managing context windows, decomposing complex tasks, or designing multi-step autonomous…
rand/cc-polymath
Automatically discover API design skills when working with REST APIs, GraphQL schemas, API authentication, OAuth, JWT, rate limiting, API versioning, error handling, or endpoint design.
rand/cc-polymath
Automatically discover database skills when working with SQL, PostgreSQL, MongoDB, Redis, database schema design, query optimization, migrations, connection pooling, ORMs, or database selection.
rand/cc-polymath
Automatically discover frontend development skills when working with React, Next.js, UI components, state management, data fetching, forms, accessibility, performance optimization, or SEO.
Categories
Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation. Typed Holes Refactor is an agent skill from rand/cc-polymath. Refactor codebases using Design by Typed Holes methodology - iterative, test-driven refactoring with formal hole resolution, constraint propagation, and continuous validation.
Typed Holes Refactor fits situations like: refactoring existing code; optimizing architecture; consolidating technical debt through systematic hole-driven development.
Run `npx skills add rand/cc-polymath --skill typed-holes-refactor -a claude-code`. Or copy the skill folder (skills/typed-holes-refactor in rand/cc-polymath) into .claude/skills/typed-holes-refactor in your project. Claude Code loads it when a task matches its description.
Run `npx skills add rand/cc-polymath --skill typed-holes-refactor -a codex`. Or copy the skill folder (skills/typed-holes-refactor in rand/cc-polymath) into .agents/skills/typed-holes-refactor in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rand/cc-polymath --skill typed-holes-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/typed-holes-refactor, .gemini/skills/typed-holes-refactor, .github/skills/typed-holes-refactor and .opencode/skills/typed-holes-refactor in your project.
Going by SKILL.md and its folder, Typed Holes Refactor needs Python for the scripts in its folder and the command-line tools its instructions call (python, git and go). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.
Typed Holes Refactor is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 5.6k tokens (SKILL.md is roughly 22k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.
Skills that share tags, products or a category with Typed Holes Refactor: Moai Workflow Ddd (modu-ai/moai-adk, 1.2k stars), Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Code Simplification for ego-lite (citrolabs/ego-lite, 17k stars) and Code Refactoring Workflow (luongnv89/claude-howto, 42k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
rand (a GitHub user) maintains it in rand/cc-polymath, which has 181 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on February 28, 2026.
Source: rand/cc-polymath on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.