clay-goodclay-goodCommunityยท8 Agent Skills Included

spec-gen

Codebase analysis, spec generation, refactoring, and test writing

Analyzes existing codebases to build a structural map of functions, callers, specs, and test coverage. Generates OpenSpec specifications from real code, detects drift between specs and implementation, and plans safe refactors with test gates. Guides debugging, story implementation, and change reviews so coding work starts oriented instead of guessing through files.
npx skills add clay-good/spec-gen --all -g -y
Available:

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 Indicators

Frequently Asked Questions

FAQPage Schema
How 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โ†’