rune-graft

Port, copy, compare, or improve features from external GitHub repositories into a local codebase.

1|Updated Mar 22, 2026
One-click install
npx skills add https://github.com/dangvu008/VietTruyen --skill rune-graft-dangvu008
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rune-graft
Source: https://github.com/dangvu008/VietTruyen/tree/main/.agents/skills/rune-graft
Command: npx skills add https://github.com/dangvu008/VietTruyen --skill rune-graft-dangvu008

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Adopting proven features from other repositories often leads to blind copy-pasting, license violations, and foreign patterns leaking into your codebase. This Skill enforces a structured workflow that requires understanding source code and passing a license/stack/scope/quality/maintenance challenge gate before any code is grafted. ## Core Features & Use Cases - Four Graft Modes: Port (rewrite for your stack), Compare (side-by-side analysis only), Copy (minimal-change transplant), and Improve (copy plus refactoring and optimization). - Mandatory Challenge Gate: Scores license compatibility, stack fit, scope, code quality, and maintenance health across five dimensions, blocking grafts with two or more failures. - Scoped Fetching: Uses sparse git checkout or raw file fetching to read only the 2-5 files implementing the target feature, preventing context overflow. - Use Case: You find an authentication middleware in a Next.js GitHub repo and want it in your own project. The Skill fetches only the relevant files, verifies the MIT license is compatible, maps Redux patterns to your Zustand setup, and rewrites the code to match your conventions. ## Quick Start Ask the agent to graft the authentication feature from a specific GitHub repository URL into this project using port mode.

Frequently Asked Questions about rune-graft

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I port a feature from a GitHub repo into my project?

Provide the repository URL and optionally a mode flag such as port, copy, compare, or improve. The workflow fetches only the relevant files, analyzes the source architecture, scans your local conventions, runs a challenge gate, then rewrites the feature using your stack and patterns.

What is the difference between port, copy, and improve modes?

Port rewrites the feature for a different tech stack using source code as reference only. Copy transplants code with minimal changes for identical stacks. Improve copies the feature then fixes anti-patterns, adds tests, and upgrades deprecated APIs.

Can I copy GPL-licensed code into an MIT project?

No. The challenge gate checks license compatibility and scores GPL-2.0/3.0 sources as a failure for MIT or Apache-2.0 projects. Two or more failed dimensions block the graft entirely unless you explicitly override.

How does it handle very large repositories?

Large repos are fetched with git sparse checkout and blob filtering so only the target directory is downloaded. If the feature spans more than 15 files or 2000 lines, the workflow warns you and suggests narrowing scope before continuing.

When should I use compare mode instead of porting code?

Use compare mode when you want side-by-side analysis without any code changes, such as evaluating whether to adopt a feature or benchmarking your implementation. It outputs a structured comparison report and stops before any modification.