スキル一覧に戻る
RithyTep

artemis-debug-secure

by RithyTep

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: artemis-debug-secure description: Database investigation skill for Jira tickets with secure credential handling. Multi-Agent Swarm for 3x faster parallel execution. Auto-learns from investigations, searches similar tickets, integrates with Jira, and detects anomalies.

Artemis Database Debug Skill (SWARM Edition)

Performance

MetricClassicSwarmImprovement
Investigation time45-60s15-20s3x faster
Browser loginsEvery timePooled (3)No login wait
Query executionSequentialParallel2-3x faster
ScreenshotsOne-by-oneBatched50% faster

Features

FeatureDescription
Multi-Agent Swarm5 specialized agents working in parallel
Connection Pooling3 pre-logged browser sessions, reused
Auto-LearnLearns patterns from resolved tickets
Similar SearchFinds past tickets with same issue
Jira IntegrationAuto-fetch ticket, auto-comment results
Error DetectionFlags anomalies in query results
Multi-UserPer-laptop credentials, shareable

Multi-Agent Swarm Architecture

                         ┌────────────────────────┐
                         │   COORDINATOR AGENT    │
                         │   (Orchestrates all)   │
                         └───────────┬────────────┘
                                     │
          ┌──────────────┬───────────┼───────────┬──────────────┐
          ▼              ▼           ▼           ▼              ▼
    ┌──────────┐  ┌──────────┐  ┌──────────┐  ┌──────────┐
    │ DB AGENT │  │JIRA AGENT│  │ ANALYSIS │  │ LEARNING │
    │          │  │          │  │  AGENT   │  │  AGENT   │
    │ -Queries │  │ -Fetch   │  │ -Errors  │  │ -Brain   │
    │ -Pool    │  │ -Similar │  │ -RCA     │  │ -Patterns│
    │ -Screen  │  │ -Comment │  │ -Summary │  │ -Learn   │
    └──────────┘  └──────────┘  └──────────┘  └──────────┘
          │              │           │              │
          └──────────────┴───────────┴──────────────┘
                                │
                   ┌────────────┴────────────┐
                   │    SHARED RESOURCES     │
                   │  • Message Bus (async)  │
                   │  • Connection Pool (3)  │
                   │  • Result Store         │
                   └─────────────────────────┘

4-Phase Parallel Workflow

PhaseTasksExecution
1. InitFetch ticket, Load brain, Get customer_idPARALLEL
2. DataExecute queries, Search similar, ScreenshotsPARALLEL
3. AnalysisDetect errors, Determine RCA, Find solutionsPARALLEL
4. OutputGenerate summary, Format To CAS, LearnSequential

Claude Workflow (AUTO)

Step 1: Check Credentials

SKILL_DIR=~/.claude/skills/artemis-debug-secure
USER=$(whoami)
if [ -f "$SKILL_DIR/users/$USER/.credentials" ]; then
  echo "READY"
else
  echo "NEED_SETUP"
fi

Step 2: If NEED_SETUP -> Ask User

Use AskUserQuestion tool:

Questions:
1. "Artemis username?"
2. "Artemis password?"

Then save credentials:

SKILL_DIR=~/.claude/skills/artemis-debug-secure
USER=$(whoami)
mkdir -p "$SKILL_DIR/users/$USER"
cat > "$SKILL_DIR/users/$USER/.credentials" << 'EOF'
ARTEMIS_URL=https://artemis.568winex.com
ARTEMIS_USER={username_from_user}
ARTEMIS_PASS={password_from_user}
EOF
chmod 600 "$SKILL_DIR/users/$USER/.credentials"

Step 3: Fetch Jira Ticket (if ticket key provided)

Use mcp__jira__jira_get_issue(ticketKey)
Parse description to extract: username, webId, date, type

Step 4: Search Similar Tickets

Use mcp__jira__jira_search_issues with JQL:
  project = TCP AND summary ~ "{ticket_type}" AND status = Done ORDER BY created DESC
Review past solutions before investigating

Step 5: Run Investigation

cd ~/.claude/skills/artemis-debug-secure
python3 scripts/investigate.py -t {type} -w {webId} -u "{username}" -k {ticket_key} --learn

Step 6: Add Jira Comment

Use mcp__jira__jira_add_comment(ticketKey, body)
Include: findings, root cause, conclusion, screenshots

Step 7: Output To CAS (500 chars max)

To CAS:
{Root cause}. {Conclusion}. {Details}.

Auto-Detect Type

Keywords in TicketType
promotion, bonus, reject, FP, lucky wheelpromotion
deposit, withdrawal, pending, paymentpayment
vip, upgrade, level, benefitsvip
bet, settlement, winning, voidbetting
login, locked, 2fa, suspendedlogin

Auto-Detect WebId

Site MentionWebId
Saffaluck, SFL20154
NocmakatiInc, NMI20107
Bet2520120
GBW, gbw77720109
Lucky720132

See docs/webids.md for full list.


SQL Rules (MUST FOLLOW)

RuleCorrectWrong
ColumnsSELECT [Id], [Name]SELECT *
CountCOUNT(1)COUNT(*)
HintWITH(NOLOCK)None
LimitTOP 100None
SortORDER BY DESCNone

Error Detection (AUTO)

The skill automatically detects these issues:

TypeDetection
CustomerSuspended, Closed, Deleted, Negative balance
PromotionMultiple rejections, Same FP/IP conflicts
TransactionRejected, Balance mismatch, Large amounts
VIPDowngrades, Rejected bonuses
BettingVoided bets, Resettlements, Large stakes

Detected issues are flagged as ALERTS (critical) or WARNINGS (potential).


Auto-Learn System

After each investigation, the skill learns:

  • Pattern: ticket type + root cause + solution
  • Indicators: key fields from results (RejectSetting, Status, etc.)
  • Frequency: how often each cause appears

Use learned data:

# Show common causes for a type
python3 scripts/investigate.py --show-common promotion

# Output: [5x] SameFP: Fingerprint conflict...
#         [3x] TurnoverNotMet: Wagering requirement...

File Reference

NeedFile
Query templatesdocs/queries.md
Status codesdocs/status-codes.md
WebId mappingdocs/webids.md
Playbooksplaybooks/{type}.md
Brain patternsmemory/brain.json
Learningsmemory/learnings.json
Rulesmemory/rules.md

Script Reference

ScriptPurpose
scripts/swarm_investigate.pyMain entry point - Multi-agent parallel
scripts/agents/coordinator.pyOrchestrates 4-phase workflow
scripts/agents/db_agent.pyDatabase operations with pooling
scripts/agents/jira_agent.pyTicket parsing & formatting
scripts/agents/analysis_agent.pyError detection & RCA
scripts/agents/learning_agent.pyPattern learning & matching
scripts/swarm/pool.pyConnection pool (3 browsers)
scripts/swarm/bus.pyAsync message bus
scripts/swarm/context.pyShared investigation context
scripts/swarm/store.pyResult aggregation

Classic (Legacy)

ScriptPurpose
scripts/investigate.pyClassic sequential investigation
scripts/core.pyCore classes (Artemis, UserConfig)
scripts/brain.pyAuto-learning module
scripts/jira_integration.pyJira parsing & formatting
scripts/error_detector.pyAnomaly detection
scripts/queries.jsonQuery definitions

CLI Options

python3 scripts/swarm_investigate.py [options]

Required (one of):
  --ticket          Jira ticket key (e.g., TCP-12345)
  OR
  -t, --type        Type: promotion, payment, vip, betting, login
  -w, --webid       WebId number
  -u, --username    Player username

Optional:
  --customer-id     CustomerId (auto-fetched if not provided)
  --headless        Run browsers in headless mode
  --pool-size       Connection pool size (default: 3)
  --benchmark       Run performance benchmark (3 iterations)
  --json            Output results as JSON

Classic (Legacy)

python3 scripts/investigate.py [options]

Required:
  -t, --type        Type: promotion, payment, vip, betting, login
  -w, --webid       WebId number
  -u, --username    Player username

Optional:
  -k, --ticket      Jira ticket key (e.g., TCP-12345)
  -c, --customerid  CustomerId (auto-fetched if not provided)
  --headless        Run without browser window
  --learn           Save learning from this investigation
  --show-common     Show common causes for a type
  -o, --output      Save results to JSON file

Multi-User Support

The users/ folder is gitignored. Each laptop creates its own:

  • users/{system_username}/.credentials

When skill is shared, new user's credentials are auto-created on first run.


Output Format

To CAS (500 chars max)

{Root cause}. {Conclusion}. {Details}.

Jira Comment

*DATABASE INVESTIGATION RESULTS*
*Ticket:* TCP-12345
*Player:* username
*WebId:* 20154

*Queries Executed:*
- Customer Info
- Rejection Records
- Balance History

*Key Findings:*
- Rejected: Same Fingerprint
- FP used by: other_player

*ROOT CAUSE:* Fingerprint conflict
*CONCLUSION:* Player's device was used by another account

Example Usage

With Jira Ticket

User: Investigate TCP-92018

Claude:
1. Fetch TCP-92018 via mcp__jira__jira_get_issue
2. Parse: username=player123, webId=20154 (Saffaluck), type=promotion
3. Search similar: mcp__jira__jira_search_issues(JQL)
4. Found 3 similar tickets - TCP-91234 had same root cause
5. Check credentials
6. Run: python3 investigate.py -t promotion -w 20154 -u player123 -k TCP-92018 --learn
7. Auto-detect: Fingerprint conflict
8. Comment results to Jira
9. Output To CAS response

Manual Mode

User: Check promotion for player123 on Saffaluck

Claude:
1. Infer: webId=20154, type=promotion
2. Check credentials
3. Run: python3 investigate.py -t promotion -w 20154 -u player123
4. Output To CAS response

スコア

総合スコア

40/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です