github-issues-comments

Create GitHub issues and comments with gh CLI using --body-file.

1|Updated Apr 10, 2024
One-click install
npx skills add https://github.com/EvaLok/schema-org-json-ld --skill github-issues-comments
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: github-issues-comments
Source: https://github.com/EvaLok/schema-org-json-ld/tree/main/.claude/skills/github-issues-comments
Command: npx skills add https://github.com/EvaLok/schema-org-json-ld --skill github-issues-comments

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of shell escaping issues when creating or commenting on GitHub issues and pull requests using the gh CLI, which can mangle markdown formatting like backticks.

Core Features & Use Cases

  • Avoids Shell Escaping: Ensures markdown formatting is preserved in issue bodies and comments.
  • Streamlines Creation: Simplifies creating issues, editing issue bodies, commenting on issues/PRs, and creating pull requests.
  • Use Case: When you need to create a detailed GitHub issue with code snippets or specific formatting, this Skill guides you to use --body-file to prevent the shell from corrupting your markdown.

Quick Start

Use the Write tool to save your markdown content to /tmp/issue-body.md and then create the issue using gh issue create --title "My New Issue" --body-file /tmp/issue-body.md.

Frequently Asked Questions about github-issues-comments

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a GitHub issue with markdown formatting using the gh CLI without shell escaping issues?

Create a GitHub issue with markdown formatting by writing content to a file using the Write tool, then pass it to the `gh` CLI via the `--body-file` flag to prevent shell escaping from corrupting backticks and formatting.

Why does my markdown formatting break when I use the gh CLI to comment on issues?

Markdown formatting breaks because direct shell input mangles special characters like backticks. Using the `--body-file` flag with a saved markdown file preserves the exact formatting when commenting on issues.

What is the best way to write multi-line markdown comments for GitHub pull requests in the terminal?

The best way to write multi-line markdown comments for pull requests is to save the text to a temporary file and use the `--body-file` parameter with the `gh` CLI, bypassing terminal shell escaping problems.

Can I use the --body-file flag to edit existing GitHub issue bodies with the gh CLI?

Yes, you can use the `--body-file` flag to edit existing GitHub issue bodies. Write your updated markdown to a file and pass the file path to the `gh` CLI to ensure accurate markdown rendering.

Does shell escaping affect code snippets in GitHub issue bodies created via the gh CLI?

Yes, shell escaping heavily affects code snippets by altering backticks and indentation. Bypass this by writing the markdown content to a temporary file and supplying it through the `--body-file` argument.