spec-gen
Codebase analysis, spec generation, refactoring, and test writing
Instructs the agent to act as a code archaeologist that reverse-engineers OpenSpec specifications from real code, and tells it which OpenLore analysis tool to call for each situation such as orientation, drift checks, and impact review.
All Skills in This Repository (8)
Pure Emerald Level Indicatorsspec-gen-implement-story
Implement stories on brownfield codebases using spec-gen structural context.
spec-gen-plan-refactor
Plan high-priority refactors and save executable plans to .spec-gen/refactor-plan.md.
spec-gen-debug
Debug reproducible bugs using spec-gen structural analysis and hypothesis-first workflows.
spec-gen-execute-refactor
Execute refactor plans with read-edit-diff-test gates per change.
spec-gen-analyze-codebase
Analyze codebases with spec-gen to extract architecture, call graphs, and refactoring issues.
spec-gen-generate
Extract OpenSpec specifications from codebases using static analysis and LLM-assisted inference.
spec-gen-brainstorm
Transform feature ideas into testable annotated stories with greenfield or brownfield detection.
spec-gen-write-tests
Generate and run framework-specific tests from implementations and spec contracts.
Frequently Asked Questions
FAQPage SchemaHow to install spec-gen?โผ
Run `npx skills add clay-good/spec-gen --all -g -y` in your terminal to install all skills in this suite globally.
How to generate specs from existing code?โผ
The openlore-generate skill surveys your codebase, extracts entities, behaviors, and API surfaces, then writes OpenSpec specification files with requirements traced back to actual source files.
How to detect when specs no longer match code?โผ
The suite includes drift detection that compares git changes against spec file mappings and reports gaps, stale references, and uncovered files with actionable fixes.
Can it plan and execute a safe refactor?โผ
Yes. The plan-refactor skill ranks targets by risk and test coverage, then the execute-refactor skill applies each change in small steps with a mandatory test gate after every edit.
Does spec-gen work with Claude Code and other coding agents?โผ
Yes. The skills follow the standard SKILL.md format and run in Claude Code, OpenCode, Mistral Vibe, and other compatible coding environments.
Related Repositories in Software Engineering
View All in Software Engineeringโopenclaw
Run a personal AI assistant across your devices and chat apps
superpowers
Gives coding agents a disciplined workflow from idea to merged code
react
AI agent skills for building, testing, and porting React core