xia

Borrow and adapt code patterns from GitHub repositories into a local codebase via a six-phase protocol.

2|3|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/spideynolove/claude-dotfiles --skill xia-spideynolove
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xia
Source: https://github.com/spideynolove/claude-dotfiles/tree/main/.claude-global/skills/xia
Command: npx skills add https://github.com/spideynolove/claude-dotfiles --skill xia-spideynolove

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually studying another GitHub project and porting its useful patterns into your own codebase is slow and error-prone. This Skill structures that process into a repeatable protocol that analyzes your codebase, ingests a reference repo, identifies gaps, and adapts patterns while respecting your project's coding rules. ## Core Features & Use Cases - Structured 6-phase protocol: Know your codebase, ingest the reference repo with repomix, run gap analysis, confirm targets with the user, adapt the pattern, then save and commit the result. - Constraint-aware adaptation: Reads your CLAUDE.md coding rules first and applies them to every line of adapted code, matching your naming conventions and style. - Persistent borrow history: Stores adapted patterns in .claude/xia/patterns/ and maintains a XIALOGUE.md log tracking your project's evolved state across sessions. - Use Case: You want to add retry logic like the one in a popular open-source CLI tool. Run the protocol against that repo, review the gap analysis table, confirm the target, and get an adapted implementation committed to your project. ## Quick Start Ask the AI to run /xia with a GitHub repo URL and an optional focus keyword to borrow a pattern into the current project.

Frequently Asked Questions about xia

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

FAQPage Schema
How do I borrow a code pattern from a GitHub repo into my project?

Run /xia with the GitHub repo URL or user/repo shorthand, plus an optional focus keyword. The protocol analyzes your codebase, packs the reference repo with repomix, presents a gap analysis table, and adapts the confirmed pattern to your coding rules.

How does xia analyze a reference GitHub repository?

It invokes the repomix skill to pack the entire repository into a single context blob, then greps the packed output for focus keywords and gap-relevant patterns. Sequential-thinking is used to compare what the reference solves versus what your codebase lacks.

Where are borrowed patterns stored after adaptation?

Patterns are saved project-locally in .claude/xia/patterns/ as markdown files with source, gap, and delta metadata. A XIALOGUE.md file in .claude/xia/ tracks the project's evolved state and full borrow history, and everything is committed to git.

Does xia respect my project's coding style and rules?

Yes. Before writing any code, it reads your CLAUDE.md and lists every coding constraint, then applies those rules during adaptation. Adapted code is renamed to match your conventions and stripped of anything that does not fit your context.

When should I not use xia for borrowing patterns?

Skip it when the gap analysis shows high integration friction, meaning the pattern conflicts with your codebase's existing architecture. The Phase 2 table scores friction as low, medium, or high so you can avoid costly adaptations.