Loading...
Loading...
Code Porter Skill: Prioritize adopting excellent open-source projects, avoid reinventing the wheel unnecessarily. Use when: You need to implement new features, select technical solutions, or evaluate whether to build something from scratch. Triggers: "implement", "develop", "create", "build", "write a", "make a"
npx skill4agent add dseirz-rgb/worker code-porter🚚 Core Principle: I'm a Code Porter, who prefers adopting excellent open-source projects into my own projects. Avoid reinventing the wheel unless absolutely necessary.
❌ Wrong mindset: "This is core logic, I need to write it myself"
✅ Correct mindset: "This is core logic, so I should look for mature solutions first—adopt then modify"
❌ Wrong mindset: "Security code is too important, I must implement it myself"
✅ Correct mindset: "Security code is too important, writing it myself is riskier—use time-tested open-source libraries"Requirement → Search for open-source solutions → Evaluate adaptability → Adopt/Integrate → Adapt and adjust
↓
No suitable solution found → Minimal self-implementation| Question | Purpose |
|---|---|
| 1. Are there any existing libraries/packages? | Search npm/pip/cargo |
| 2. Are there similar open-source projects? | Search GitHub |
| 3. Does the official documentation recommend any solutions? | Check official docs |
| 4. Are there community best practices? | Stack Overflow / Reddit |
| 5. Is it worth reinventing this wheel? | Cost/benefit analysis |
# 1. Package manager search
npm search <keyword>
pip search <keyword> # Or pip index versions <package>
# 2. GitHub search
# Sort by stars: stars:>1000 <keyword>
# Filter by language: language:typescript <keyword>
# Filter by recent updates: pushed:>2024-01-01 <keyword>
# 3. Awesome lists
# Search for "awesome-<domain>" repositories| Metric | Passing Line | Excellent Line |
|---|---|---|
| Stars | >100 | >1000 |
| Recent Update | <6 months | <1 month |
| Issue Response | Has responses | Responses within 24h |
| Documentation Quality | Has README | Has complete documentation site |
| Test Coverage | Has tests | >80% coverage |
| License | MIT/Apache | MIT |
| Number of Dependencies | <20 | <5 |
| Domain | Recommended Solutions |
|---|---|
| HTTP Requests | axios, fetch, ky |
| State Management | zustand, jotai, redux-toolkit |
| Form Validation | zod, yup, joi |
| Date Processing | date-fns, dayjs |
| UI Components | shadcn/ui, radix-ui, headless-ui |
| Charts | recharts, chart.js, echarts |
| Animations | framer-motion, react-spring |
| Database ORM | drizzle, prisma, typeorm |
| API Clients | openapi-typescript, trpc |
| Testing | vitest, jest, playwright |
| Build Tools | vite, esbuild, turbopack |
| Code Formatting | prettier, eslint |
| Authentication & Authorization | next-auth, passport, lucia |
| Encryption & Hashing | bcrypt, argon2, crypto-js |
| JWT Handling | jose, jsonwebtoken |
| Trading Systems | ccxt, hummingbot |
| Risk Control Engines | riskfolio-lib, pyfolio |
| Quantitative Analysis | qlib, backtrader, zipline |
npm install <package>
# Or
pnpm add <package>// Source: https://github.com/xxx/yyy
// License: MIT
// Original Author: @author
// Modification Notes: Adapted for TypeScript types in this project
// ... Code ...# 1. Fork the repository
# 2. Modify and adapt
# 3. Import as a git submodule or private package// Reference: https://github.com/xxx/yyy/blob/main/src/utils.ts
// Rewritten based on the original implementation to adapt to this project's architecturenpm search websocket reactsocket.io-client@tanstack/react-queryuse-websocketuse-websocketuse-websocketpnpm add react-use-websocketimport useWebSocket from 'react-use-websocket';
function MyComponent() {
const { sendMessage, lastMessage } = useWebSocket('wss://api.example.com');
// ...
}npm search markdown reactreact-markdownmarkedmarkdown-itreact-markdownreact-syntax-highlighterreact-markdownreact-syntax-highlighterpnpm add react-markdown react-syntax-highlighter @types/react-syntax-highlighternpm search drag drop react@dnd-kit/corereact-beautiful-dndreact-dnd@dnd-kit@dnd-kitpnpm add @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities1. Clarify functional requirements
2. Determine technical constraints (language, framework, performance requirements)
3. Evaluate complexity1. Package manager search
2. GitHub search (stars:>500)
3. Look for Awesome lists
4. Official documentation recommendations
5. Community discussions (Reddit, HN, Twitter)1. Activity check (recent commits, issue responses)
2. Quality check (tests, documentation, TypeScript support)
3. Compatibility check (dependency conflicts, version requirements)
4. License check (prefer MIT/Apache)
5. Security check (npm audit, snyk)1. Install dependencies
2. Read documentation/examples
3. Write adaptation code
4. Test and verify
5. Document records (source, version, modifications)references/index.mdreferences/awesome-lists.mdreferences/license-guide.md