vict00r99/rune-stone/rune-from-code
Claude Code and agent skill by vict00r99/rune-stone
- community
Checking that the SKILL.md file is still in the repository.
Reverse-engineer a RUNE specification from existing code. Use when adopting RUNE in existing projects or generating a spec from a current implementation.
Install
npx vskill@latest install vict00r99/rune-stone/rune-from-codeSKILL.md
How to Use
When given an existing function (or class method), analyze it and generate a complete RUNE spec that describes its current behavior.
Input: source code of one or more functions (any language). Output: a .rune YAML spec or Markdown section for each function.
Process
Step 1: Extract SIGNATURE
Read the function declaration exactly as written. Use the source language's actual syntax:
Python:
Go:
TypeScript:
If the language doesn't have type annotations (plain JavaScript, Ruby, Lua), infer types from:
- Parameter names and usage within the function body
- Default values and return statements
- Add a comment noting the inference:
# types inferred from usage
Step 2: Write INTENT
Summarize what the function does in 1-3 sentences based on:
- The function name
- The docstring/doc comment (if present)
- The overall behavior
Do NOT describe implementation details. Describe purpose.
Step 3: Extract BEHAVIOR Rules
Analyze the function's control flow and convert each branch to a WHEN/THEN rule. The source language varies, but the BEHAVIOR output is always the same WHEN/THEN format:
From Python:
From Go:
From Rust:
All extract to the same BEHAVIOR:
Rules for extraction:
- Each conditional branch that returns or raises/throws becomes a WHEN/THEN
- The final return or else branch becomes OTHERWISE
- Preserve the exact error messages from the code
- Preserve the order of checks (top to bottom)
- Collapse implementation details into business-level descriptions
- Map language-specific error mechanisms to neutral language:
- Python
raise ValueError/ Goreturn err/ RustErr()/ Javathrow-> "raise error" or "return error"
Step 4: Extract CONSTRAINTS
Look for input validation patterns in any language:
- Type checks (type annotations,
instanceof,is, type guards, pattern matching) - Range checks (comparisons against bounds)
- Format checks (regex, string operations, parsing)
- Size checks (length, count, capacity)
Step 5: Identify EDGE_CASES
Look for:
- Boundary values handled in conditions (
>=,<,==) - Special cases (empty input, null/nil/None/undefined, zero, max value)
- Comments mentioning edge cases
- Guard clauses at the top of the function
Step 6: Generate TESTS
Create test cases that cover:
- Happy path — normal inputs that succeed (2-3 tests)
- Boundary — values at the edges of conditions (2-3 tests)
- Error cases — inputs that trigger each error branch (1 per branch)
Step 7: Add Metadata
Step 8: Assemble and Validate
Combine all sections into a complete spec. Then self-validate:
- Does every BEHAVIOR rule have at least one test?
- Does every EDGE_CASE have a test?
- Do CONSTRAINTS map to BEHAVIOR rules?
- Is INTENT free of implementation details?
Output Format
Ask the user which format they prefer. Default to the format used elsewhere in their project.
Set meta.language to the language detected from the source code.
YAML format:
Markdown format:
Rules
- Extract behavior from the code AS-IS — do not improve or fix the function
- If the code has bugs, note them but spec the current behavior
- Preserve exact error messages from the source code
- If types are not annotated, infer and mark with a comment
- Always generate at least 3 tests per function
- Use the source language's syntax for SIGNATURE, not pseudocode
- Works with any programming language — adapt extraction to the language's idioms
- Ask the user to verify the spec matches their intent — code might not reflect original requirements
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/rune-from-code/SKILL.md
Popularity
- Repository stars
- 58
- Repository forks
- 10
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 18 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/vict00r99/rune-stone/rune-from-code)