# Draft Issue To External Repository

Draft a GitHub issue targeting a third-party repository (outside this project's owner).

- Repository: https://github.com/dyoshikawa/rulesync (1577 stars)
- Category: Git and review
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dyoshikawa/rulesync --skill draft-issue-to-external-repository -g -a claude-code -y`
Codex: `npx skills add dyoshikawa/rulesync --skill draft-issue-to-external-repository -g -a codex -y`
Cursor: `npx skills add dyoshikawa/rulesync --skill draft-issue-to-external-repository -g -a cursor -y`
Gemini CLI: `npx skills add dyoshikawa/rulesync --skill draft-issue-to-external-repository -g -a gemini-cli -y`

## Description

Draft a GitHub issue targeting a third-party repository (outside this project's owner). Researches the target repo's conventions and the topic in depth, iterates with the user on scope and tone, and produces a final body saved to tmp/external-repository-issues/*.md for the user to post manually when gh auth lacks permission on the target.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

arguments = the user's request

Parse `arguments` as:

- `target_repo`: the target repository in `owner/repo` form (or a URL)
- `intent`: the rough idea the user wants to propose (may be vague, this skill is designed to sharpen it)

If `target_repo` is not provided, ask the user which repository to file against.
If `intent` is not provided, ask the user what they want to propose.

This skill is for proposing a change to a repository **we do not own**. When the target is a repo under the user's own owner, prefer `create-issue` or `create-issue-with-websearch` instead.

## Step 1: Inspect the Target Repository

Before drafting anything, understand the target repo's conventions. Run in parallel:

- `gh repo view <owner/repo> --json description,url,defaultBranchRef,primaryLanguage,latestRelease`
- `gh issue list --repo <owner/repo> --limit 20 --state all --json number,title,labels,state`, read recent titles to learn the house style (prefix tags like `[FEATURE]`, casing, length).
- `gh api repos/<owner/repo>/contents/.github/ISSUE_TEMPLATE`, list templates. If a feature-request template exists, fetch it with `gh api` or a raw URL and note the required sections plus any auto-applied title prefix / labels.
- `gh label list --repo <owner/repo>`, note which labels exist (do not invent labels later).
- Optionally fetch `CONTRIBUTING.md` / `CODE_OF_CONDUCT.md` if present to catch any issue-filing rules.

If no issue template exists, plan to use a light structure (Problem / Proposal / Alternatives / Additional context) that mirrors common feature-request templates.

## Step 2: Research the Topic

Ground the proposal in primary sources before writing anything opinionated.

The rest: https://github.com/dyoshikawa/rulesync/blob/HEAD/.rulesync/skills/draft-issue-to-external-repository/SKILL.md
