소스 정보
- 저장소
- tools-only/X-Skills
- 최근 소스 활동
- 2026년 2월 9일 04:08
- 감지된 SKILL.md 언어
- 영어
- 스타
- 7
- 포크
- 1
설치 방법
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
소스 파일 검토
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
메뉴
기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.
설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tools-only/X-Skills --skill track-position명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
SOC 직업 분류 기준
| name | track-position |
| description | Track crypto positions with entry prices, current values, and PnL calculations |
| shortcut | tp |
Comprehensive position tracking for cryptocurrency investments with real-time price updates and advanced analytics.
When the user wants to track a crypto position, gather the following information and implement a complete tracking system:
Create a structured database to track positions:
CREATE TABLE IF NOT EXISTS crypto_positions (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
symbol VARCHAR(10) NOT NULL,
entry_price DECIMAL(20,8) NOT NULL,
quantity DECIMAL(20,8) NOT NULL,
entry_date TIMESTAMP NOT NULL,
current_price DECIMAL(20,8),
last_updated TIMESTAMP,
exchange VARCHAR(50),
target_price DECIMAL(20,8),
stop_loss DECIMAL(20,8),
status VARCHAR(20) DEFAULT 'open',
notes TEXT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE TABLE IF NOT EXISTS position_history (
id UUID PRIMARY KEY DEFAULT gen_random_uuid(),
position_id UUID REFERENCES crypto_positions(id),
price DECIMAL(20,8) NOT NULL,
value DECIMAL(20,8) NOT NULL,
pnl DECIMAL(20,8) NOT NULL,
pnl_percentage DECIMAL(10,4) NOT NULL,
recorded_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
CREATE INDEX idx_positions_symbol ON crypto_positions(symbol);
CREATE INDEX idx_positions_status ON crypto_positions(status);
CREATE INDEX idx_history_position ON position_history(position_id);
class CryptoPositionTracker {
constructor() {
this.priceFeeds = {
coingecko: 'https://api.coingecko.com/api/v3',
binance: 'https://api.binance.com/api/v3',
coinbase: 'https://api.coinbase.com/v2'
};
}
async trackPosition(positionData) {
const {
symbol,
entryPrice,
quantity,
entryDate,
exchange = 'Unknown',
targetPrice = null,
stopLoss = null,
notes = ''
} = positionData;
// Validate input
this.validatePositionData(positionData);
// Get current price
const currentPrice = await this.getCurrentPrice(symbol);
// Calculate metrics
const metrics = this.calculateMetrics({
entryPrice,
quantity,
currentPrice
});
// Store position
const position = await this.storePosition({
symbol: symbol.toUpperCase(),
entry_price: entryPrice,
quantity,
entry_date: entryDate,
: currentPrice,
exchange,
: targetPrice,
: stopLoss,
notes
});
.(position., currentPrice, metrics);
{
position,
metrics,
: .(position, metrics)
};
}
() {
entryValue = entryPrice * quantity;
currentValue = currentPrice * quantity;
unrealizedPnL = currentValue - entryValue;
pnlPercentage = ((currentValue - entryValue) / entryValue) * ;
{
: (entryValue.()),
: (currentValue.()),
: (unrealizedPnL.()),
: (pnlPercentage.()),
: pnlPercentage,
: .({
entryPrice,
currentPrice,
: position.,
: position.
})
};
}
() {
(!targetPrice || !stopLoss) ;
potentialReward = targetPrice - entryPrice;
potentialRisk = entryPrice - stopLoss;
(potentialRisk === ) ;
((potentialReward / potentialRisk).());
}
() {
analysis = {
: .(metrics),
: .(position, metrics),
: .(position, metrics),
: .(position, metrics)
};
analysis;
}
() {
(metrics. > ) ;
(metrics. > ) ;
(metrics. > -) ;
(metrics. > -) ;
;
}
() {
recommendations = [];
(position. && position. <= position.) {
recommendations.({
: ,
: ,
:
});
}
(position. && position. >= position.) {
recommendations.({
: ,
: ,
:
});
}
(metrics. > ) {
recommendations.({
: ,
: ,
:
});
}
(metrics. < - && !position.) {
recommendations.({
: ,
: ,
:
});
}
recommendations;
}
() {
{
prices = .([
.(symbol),
.(symbol)
]);
prices.( sum + price, ) / prices.;
} (error) {
();
}
}
() {
openPositions = .();
updates = [];
( position openPositions) {
{
currentPrice = .(position.);
metrics = .({
: position.,
: position.,
currentPrice
});
.(position., {
: currentPrice,
: ()
});
.(position., currentPrice, metrics);
updates.({
: position.,
currentPrice,
metrics,
:
});
} (error) {
updates.({
: position.,
: ,
: error.
});
}
}
updates;
}
}
When displaying position information, format it clearly:
function displayPosition(position, metrics) {
const output = `
╔════════════════════════════════════════════════════════════════╗
║ CRYPTO POSITION TRACKER ║
╠════════════════════════════════════════════════════════════════╣
║ Symbol: ${position.symbol.padEnd(48)} ║
║ Entry Price: $${position.entry_price.toFixed(2).padEnd(47)} ║
║ Current Price: $${position.current_price.toFixed(2).padEnd(47)} ║
║ Quantity: ${position.quantity.toString().padEnd(48)} ║
╠════════════════════════════════════════════════════════════════╣
║ METRICS ║
╠════════════════════════════════════════════════════════════════╣
║ Entry Value: $${metrics.entryValue.toFixed(2).padEnd(47)} ║
║ Current Value: $${metrics.currentValue.toFixed(2).padEnd(47)} ║
║ Unrealized P&L: ${formatPnL(metrics.unrealizedPnL).padEnd(47)} ║
║ P&L %: ${formatPnLPercentage(metrics.pnlPercentage).padEnd(48)} ║
╠════════════════════════════════════════════════════════════════╣
║ Status: ${determineStatusEmoji(metrics.pnlPercentage)} ${metrics.status.padEnd(43)} ║
╚════════════════════════════════════════════════════════════════╝
`;
return output;
}
function formatPnL(value) {
const formatted = `$${Math.abs(value).toFixed(2)}`;
if (value >= 0) {
;
} {
;
}
}
() {
formatted = ;
(percentage >= ) {
;
} {
;
}
}
() {
(percentage > ) ;
(percentage > ) ;
(percentage > -) ;
(percentage > -) ;
;
}
Set up automatic alerts for significant events:
class PositionAlertSystem {
constructor() {
this.alertThresholds = {
profitTarget: 0.20, // 20% profit
lossWarning: -0.10, // 10% loss
criticalLoss: -0.25, // 25% loss
volatilitySpike: 0.15 // 15% daily move
};
}
async checkAlerts(position, previousPrice, currentPrice) {
const alerts = [];
const priceChange = ((currentPrice - previousPrice) / previousPrice) * 100;
// Check profit targets
if (metrics.pnlPercentage >= this.alertThresholds.profitTarget * 100) {
alerts.push({
type: 'PROFIT_TARGET',
message: ` ${position.symbol} hit profit target: +${metrics.pnlPercentage.toFixed(2)}%`,
severity: 'INFO',
action: 'Consider taking profits'
});
}
// Check loss warnings
if (metrics.pnlPercentage <= .. * &&
metrics. > .. * ) {
alerts.({
: ,
: ,
: ,
:
});
}
(metrics. <= .. * ) {
alerts.({
: ,
: ,
: ,
:
});
}
(.(priceChange) >= .. * ) {
alerts.({
: ,
: ,
: ,
:
});
}
alerts;
}
}
Always implement comprehensive error handling:
try {
const position = await tracker.trackPosition({
symbol: 'BTC',
entryPrice: 45000,
quantity: 0.5,
entryDate: new Date('2024-01-01'),
targetPrice: 60000,
stopLoss: 40000
});
displayPosition(position.position, position.metrics);
} catch (error) {
if (error.code === 'INVALID_SYMBOL') {
console.error(`Invalid cryptocurrency symbol: ${error.symbol}`);
} else if (error.code === 'API_ERROR') {
console.error(`Failed to fetch price data: ${error.message}`);
} else {
console.error(`Unexpected error: ${error.message}`);
}
}
This command provides comprehensive position tracking with real-time updates, PnL calculations, risk analysis, and actionable recommendations for crypto investments.