Spec Miner
Reverse-engineering specialist that extracts specifications from existing codebases.
Before & after
Same prompt, same agent — the only difference is the skill.
You can analyze the code to understand how it works. Look at the function signatures and method names to get a sense of what's happening. Read through the implementation line by line and try to understand the logic flow. You could also look for comments or docstrings that might explain intent. Creating a summary as you go would help you build up understanding. It's tedious but doable with careful reading.
SPEC EXTRACTION: Payment API Handler
DISCOVERED ENDPOINTS
POST /api/payments/charge
INPUT: { amount: number, currency: 'USD'|'EUR', customer_id: string, metadata: object }
OUTPUT: { id: string, status: 'pending'|'completed'|'failed', error?: string }
SIDE EFFECTS:
-> Calls Stripe API (external)
-> Logs to Datadog
-> Updates customer.last_charge_at timestamp in database
ERROR HANDLING:
-> Network timeout (>10s): retries 3x with exponential backoff
-> Invalid amount (<0.50 USD): returns 400 'amount_too_small'
-> Unknown customer_id: returns 404
-> Rate limit (>100 req/min): returns 429, client backs off
GET /api/payments/status/:transaction_id
READ-ONLY, returns full transaction object including webhook_status
WEBHOOK: POST /webhooks/stripe
LISTENS FOR: charge.succeeded, charge.failed, dispute.created
ACTIONS:
-> succeeded: marks transaction complete, updates customer credits
-> failed: notifies customer via email, initiates retry
-> dispute: flags account for manual review, holds balance
KNOWN QUIRKS / BUGS
-> Webhook retry logic has 24-hour window (should be 72h per Stripe docs)
-> Currency conversion cached hourly; can be stale in volatile markets
-> No idempotency key support; double-POST = double-charge risk
DEPENDENCIES
-> Stripe v2024.03.0
-> Database: PostgreSQL transactions table
-> Message queue: Redis for async webhooks
-> Auth: Bearer token in Authorization header
TYPES (inferred from usage)
type Transaction = { id, amount, currency, customer_id, status, created_at, webhook_status, metadata }
NEXT STEPS
1. Add idempotency key to prevent double-charges
2. Extend webhook retry window
3. Document this spec in READMEAbout this skill
name: spec-miner description: Use when Reverse-engineering specialist that extracts specifications from existing codebases.
Spec Miner
Reverse-engineering specialist that extracts specifications from existing codebases. Use when working with legacy or undocumented systems, inherited projects, or old codebases with no documentation. Invoke to map code dependencies, generate API documentation from source, identify undocumented business logic, figure out what code does, or create architecture documentation from implementation. Trigger phrases: reverse engineer, old codebase, no docs, no documentation, figure out how this works, inherited project, legacy analysis, code archaeology, undocumented features.
What you get
- Public GitHub repo
- the skills/spec-miner folder with SKILL.md and references.
Customize your output
- Fork the repo and extend the skill's reference files for your own stack conventions.
Example output
Activates on a matching request (e.g. building or reviewing Spec Miner code) and can chain with other skills in the pack.
Best for
Full-stack developers and engineering teams using Claude Code.
SKILL.md preview
---
name: spec-miner
description: Use this skill when working with legacy or undocumented codebases and specifications need to be reverse-engineered from the implementation itself.
version: 1.0.0
category: Development / Engineering
author: AgentVolt
license: proprietary
tags:
- development
- engineering
---
# Spec Miner
Reverse-engineers specifications directly from source code: dependency maps, API documentation, business rules, and architecture notes for systems that were never written down.
## When to use
- Inheriting a project with little or no documentation
… (sign up to view the full skill)More development skills
View all Development skills →Generate
Scaffold code, tests, and boilerplate from a short spec.
Performance Profiler
Systematic performance profiling for Node.js, Python, and Go applications.
Threat Detection
Use when hunting for threats in an environment, analyzing IOCs, or detecting behavioral anomalies in telemetry.
Agent Harness
Turns a domain folder of skills into a bounded agentic loop: compile a goal into a task plan, execute with the domain's tools, verify every task, retry within a budget.