# Music Brain88 Dotfiles Context

> コンテキスト読み込み

- Skill: `tomevault-io/music-brain88-dotfiles-context` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/music-brain88-dotfiles-context`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/music-brain88-dotfiles-context/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/music-brain88-dotfiles-context

---


# コンテキスト読み込み

GitHub の Issue / Discussion / PR をコンテキストとして読み込みます。

## 使い方

- `123` または `issue 123` → Issue #123
- `discussion 45` または `d 45` → Discussion #45
- `pr 67` または `pull 67` → Pull Request #67

## 手順

### 1. 引数のパース

ユーザーの入力を解析して、タイプと番号を特定する:

- 数字のみ（例: `123`）→ Issue として扱う
- `discussion N` または `d N` → Discussion #N
- `pr N` または `pull N` → Pull Request #N
- `issue N` または `i N` → Issue #N

### 2. リポジトリの特定

```bash
gh repo view --json nameWithOwner -q .nameWithOwner
```

### 3. コンテンツの取得

**Issue の場合:**
```bash
gh issue view <number> --json title,body,comments,labels,state,author,createdAt
```

**Pull Request の場合:**
```bash
gh pr view <number> --json title,body,comments,reviews,labels,state,author,commits,createdAt
```

**Discussion の場合:**
GraphQL API を使用:
```bash
gh api graphql -f query='
query($owner: String!, $repo: String!, $number: Int!) {
  repository(owner: $owner, name: $repo) {
    discussion(number: $number) {
      title
      body
      createdAt
      author { login }
      comments(first: 50) {
        nodes {
          body
          createdAt
          author { login }
        }
      }
    }
  }
}' -f owner=<owner> -f repo=<repo> -F number=<number>
```

### 4. コンテキストとして整形

取得した情報を以下の形式で出力:

```markdown
## [Issue/Discussion/PR] #<number>: <title>

**Author:** @<author>
**State:** <state>
**Labels:** <labels>

### 本文

<body>

### コメント

#### @<commenter> (<date>)
<comment body>
```

### 5. 確認

読み込んだコンテキストの要約を表示し、ユーザーに内容を確認させる。

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/music-brain88) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

