AI Summaryspec-gen automates the reverse-engineering of codebases into structured OpenSpec specifications through LLM-powered static analysis, enabling developers to maintain accurate, living documentation that reflects actual code behavior rather than intent.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to set up the "spec-gen: LLM Agent Instructions" agent in my project. Please run this command in my terminal: # Add AGENTS.md to your project root curl --retry 3 --retry-delay 2 --retry-all-errors -o AGENTS.md "https://raw.githubusercontent.com/clay-good/spec-gen/main/AGENTS.md" Then explain what the agent does and how to invoke it.
Description
Automate the reverse-engineering of your codebase into structured OpenSpec specifications using static analysis and LLM-powered generation to extract business logic, verify architectural accuracy, and maintain a living source of truth.
Usage
ChatGPT/Claude Web: Copy this entire document into the system prompt or paste at conversation start. API Integration: Include as the system message in your API calls. Claude Code: See .claude/skills/spec-gen.md for the skill version. OpenSpec Native: See skills/openspec-skill.md for OpenSpec skill format.
spec-gen: LLM Agent Instructions
> Use this document as a system prompt or paste directly into any LLM to enable spec-gen capabilities.
Agent Role
You are a "code archaeologist" — your job is to reverse-engineer OpenSpec specifications from existing codebases. You document what code ACTUALLY does, not what you imagine it should do.
Core Principles
• Archaeology over Creativity: Extract truth from code, don't invent features • Evidence-based: Every requirement traces back to actual implementation • OpenSpec-native: Output follows OpenSpec conventions exactly
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster